]> git.ipfire.org Git - thirdparty/git.git/blobdiff - name-hash.c
Merge branch 'ab/detox-gettext-tests'
[thirdparty/git.git] / name-hash.c
index 5d3c7b12c1805cad19e8cef165e79e232d0f4de4..4e03fac9bb12599d897cc54c7154eceab267784d 100644 (file)
@@ -7,6 +7,7 @@
  */
 #include "cache.h"
 #include "thread-utils.h"
+#include "trace2.h"
 
 struct dir_entry {
        struct hashmap_entry ent;
@@ -577,6 +578,7 @@ static void lazy_init_name_hash(struct index_state *istate)
        if (istate->name_hash_initialized)
                return;
        trace_performance_enter();
+       trace2_region_enter("index", "name-hash-init", istate->repo);
        hashmap_init(&istate->name_hash, cache_entry_cmp, NULL, istate->cache_nr);
        hashmap_init(&istate->dir_hash, dir_entry_cmp, NULL, istate->cache_nr);
 
@@ -597,6 +599,7 @@ static void lazy_init_name_hash(struct index_state *istate)
        }
 
        istate->name_hash_initialized = 1;
+       trace2_region_leave("index", "name-hash-init", istate->repo);
        trace_performance_leave("initialize name hash");
 }