summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2020-09-17 18:11:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-09-17 18:30:05 (GMT)
commit25914c4fdeefd99b06e134496dfb9bbb58a5c417 (patch)
treeaea73225d1a1284468051493741503662682ccf6
parent4ddc79b2dac18189e7ff18e99a6fabdd161f866c (diff)
downloadgit-25914c4fdeefd99b06e134496dfb9bbb58a5c417.zip
git-25914c4fdeefd99b06e134496dfb9bbb58a5c417.tar.gz
git-25914c4fdeefd99b06e134496dfb9bbb58a5c417.tar.bz2
maintenance: add trace2 regions for task execution
Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/gc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/gc.c b/builtin/gc.c
index 4db853c..0909593 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -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);