diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-03-07 09:59:56 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-03-07 09:59:56 +0900 |
commit | 32038fef00b02fb52f362d1d0cf1c25c6c382abb (patch) | |
tree | 45b41a51c59dc7fbaae9a0414ef6b0e9b4579b31 /builtin/pack-objects.c | |
parent | Merge branch 'js/doc-symref-in-proto-v1' (diff) | |
parent | trace2: add for_each macros to clang-format (diff) | |
download | tgif-32038fef00b02fb52f362d1d0cf1c25c6c382abb.tar.xz |
Merge branch 'jh/trace2'
A more structured way to obtain execution trace has been added.
* jh/trace2:
trace2: add for_each macros to clang-format
trace2: t/helper/test-trace2, t0210.sh, t0211.sh, t0212.sh
trace2:data: add subverb for rebase
trace2:data: add subverb to reset command
trace2:data: add subverb to checkout command
trace2:data: pack-objects: add trace2 regions
trace2:data: add trace2 instrumentation to index read/write
trace2:data: add trace2 hook classification
trace2:data: add trace2 transport child classification
trace2:data: add trace2 sub-process classification
trace2:data: add editor/pager child classification
trace2:data: add trace2 regions to wt-status
trace2: collect Windows-specific process information
trace2: create new combined trace facility
trace2: Documentation/technical/api-trace2.txt
Diffstat (limited to 'builtin/pack-objects.c')
-rw-r--r-- | builtin/pack-objects.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index a9fac7c128..a154fc29f6 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -33,6 +33,7 @@ #include "object-store.h" #include "dir.h" #include "midx.h" +#include "trace2.h" #define IN_PACK(obj) oe_in_pack(&to_pack, obj) #define SIZE(obj) oe_size(&to_pack, obj) @@ -3473,6 +3474,8 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix) } } + trace2_region_enter("pack-objects", "enumerate-objects", + the_repository); prepare_packing_data(the_repository, &to_pack); if (progress) @@ -3487,12 +3490,23 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix) if (include_tag && nr_result) for_each_ref(add_ref_tag, NULL); stop_progress(&progress_state); + trace2_region_leave("pack-objects", "enumerate-objects", + the_repository); if (non_empty && !nr_result) return 0; - if (nr_result) + if (nr_result) { + trace2_region_enter("pack-objects", "prepare-pack", + the_repository); prepare_pack(window, depth); + trace2_region_leave("pack-objects", "prepare-pack", + the_repository); + } + + trace2_region_enter("pack-objects", "write-pack-file", the_repository); write_pack_file(); + trace2_region_leave("pack-objects", "write-pack-file", the_repository); + if (progress) fprintf_ln(stderr, _("Total %"PRIu32" (delta %"PRIu32")," |