diff mbox series

[v5,11/11] maintenance: add trace2 regions for task execution

Message ID 20a74abd96795d66acc19ea780864cd5f4ea6a2b.1600366313.git.gitgitgadget@gmail.com (mailing list archive)
State Accepted
Commit 25914c4fdeefd99b06e134496dfb9bbb58a5c417
Headers show
Series Maintenance I: Command, gc and commit-graph tasks | expand

Commit Message

Elijah Newren via GitGitGadget Sept. 17, 2020, 6:11 p.m. UTC
From: Derrick Stolee <dstolee@microsoft.com>

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 builtin/gc.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/builtin/gc.c b/builtin/gc.c
index 4db853c561..090959350e 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);