diff mbox series

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

Message ID 46fbe161aa154de9406117ee916b1bd5f549905c.1597760589.git.gitgitgadget@gmail.com (mailing list archive)
State Superseded
Headers show
Series Maintenance I: Command, gc and commit-graph tasks | expand

Commit Message

Philippe Blain via GitGitGadget Aug. 18, 2020, 2:23 p.m. UTC
From: Derrick Stolee <dstolee@microsoft.com>

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
---
 builtin/gc.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jonathan Tan Aug. 19, 2020, 12:11 a.m. UTC | #1
> From: Derrick Stolee <dstolee@microsoft.com>
> 
> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>

Thanks. Overall this looks like a good patch set. As you can see from my
other emails the only issues I have remaining are minor.
diff mbox series

Patch

diff --git a/builtin/gc.c b/builtin/gc.c
index 73e485bfc0..3fdb08655c 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -953,10 +953,12 @@  static int maintenance_run(struct maintenance_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);