Skip to content

Commit

Permalink
trace2: fix up a missing "leave" entry point
Browse files Browse the repository at this point in the history
Fix a trivial bug that's been here since the shared/do_write_index
tracing was added in 42fee7a ("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 <[email protected]>
Acked-by: Derrick Stolee <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
avar authored and gitster committed May 10, 2019
1 parent 22a7338 commit c173542
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion read-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c173542

Please sign in to comment.