trace.h: support nested performance tracing
[gitweb.git] / preload-index.c
index 2a83255e4eeaf8e8ce74516880b0333b23d6f583..d7f7919ba2ec828fce3fe95fc58884923568ea26 100644 (file)
@@ -87,6 +87,7 @@ static void preload_index(struct index_state *index,
                threads = 2;
        if (threads < 2)
                return;
+       trace_performance_enter();
        if (threads > MAX_PARALLEL)
                threads = MAX_PARALLEL;
        offset = 0;
@@ -108,6 +109,7 @@ static void preload_index(struct index_state *index,
                if (pthread_join(p->pthread, NULL))
                        die("unable to join threaded lstat");
        }
+       trace_performance_leave("preload index");
 }
 #endif