Skip to content

Commit

Permalink
maintenance: add trace2 regions for task execution
Browse files Browse the repository at this point in the history
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
derrickstolee authored and gitster committed Sep 17, 2020
1 parent 4ddc79b commit 25914c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions builtin/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -927,10 +927,12 @@ static int maintenance_run_tasks(struct maintenance_run_opts *opts)
!tasks[i].auto_condition()))
continue;

trace2_region_enter("maintenance", tasks[i].name, r);
if (tasks[i].fn(opts)) {
error(_("task '%s' failed"), tasks[i].name);
result = 1;
}
trace2_region_leave("maintenance", tasks[i].name, r);
}

rollback_lock_file(&lk);
Expand Down

0 comments on commit 25914c4

Please sign in to comment.