[v3,20/20] maintenance: add trace2 regions for task execution
diff mbox series

Message ID 39eb83ad1efe4dc521f5fc3838f47c7cdb507fc7.1596147867.git.gitgitgadget@gmail.com
State New
Headers show
Series
  • Maintenance builtin, allowing 'gc --auto' customization
Related show

Commit Message

Han-Wen Nienhuys via GitGitGadget July 30, 2020, 10:24 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(+)

Patch
diff mbox series

diff --git a/builtin/gc.c b/builtin/gc.c
index 6ccc0cca19..33e889bc71 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -1312,10 +1312,12 @@  static int maintenance_run(void)
 		     !tasks[i].auto_condition()))
 			continue;
 
+		trace2_region_enter("maintenance", tasks[i].name, r);
 		if (tasks[i].fn()) {
 			error(_("task '%s' failed"), tasks[i].name);
 			result = 1;
 		}
+		trace2_region_leave("maintenance", tasks[i].name, r);
 	}
 
 	rollback_lock_file(&lk);