]> git.ipfire.org Git - thirdparty/git.git/commitdiff
maintenance: add trace2 regions for task execution
authorDerrick Stolee <dstolee@microsoft.com>
Thu, 17 Sep 2020 18:11:52 +0000 (18:11 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 17 Sep 2020 18:30:05 +0000 (11:30 -0700)
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/gc.c

index 4db853c5619071463ee353066968d455915539c1..090959350e06c0821889cab4d3a217ef814e5618 100644 (file)
@@ -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);