trace2: fix up a missing "leave" entry point
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 10 May 2019 13:37:38 +0000 (15:37 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 May 2019 14:14:09 +0000 (23:14 +0900)
Fix a trivial bug that's been here since the shared/do_write_index
tracing was added in 42fee7a388 ("trace2:data: add trace2
instrumentation to index read/write", 2019-02-22). We should have
enter/leave points, not two enter/enter points. This resulted in an
"enter" event without a corresponding "leave" event.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Acked-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
read-cache.c
index eee8351d8e9f5f8d13188dc046b36433185e7064..49329a1fb112df989cb69d6e95fd70a6f4392d21 100644 (file)
@@ -3127,7 +3127,7 @@ static int write_shared_index(struct index_state *istate,
        trace2_region_enter_printf("index", "shared/do_write_index",
                                   the_repository, "%s", (*temp)->filename.buf);
        ret = do_write_index(si->base, *temp, 1);
-       trace2_region_enter_printf("index", "shared/do_write_index",
+       trace2_region_leave_printf("index", "shared/do_write_index",
                                   the_repository, "%s", (*temp)->filename.buf);
 
        if (ret)