]> git.ipfire.org Git - thirdparty/git.git/commit
midx.c: instrument MIDX and bitmap generation with trace2 regions
authorTaylor Blau <me@ttaylorr.com>
Wed, 12 Oct 2022 22:01:55 +0000 (18:01 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Oct 2022 20:35:07 +0000 (13:35 -0700)
commit2dcff52524e611413cb0cb49015f0d105f5f8dfa
treee36498bcc59df40715bcf4a9794cdd385e9971a2
parent1dc4f1ef0d2528f405d71850d73d80ff1a571abd
midx.c: instrument MIDX and bitmap generation with trace2 regions

When debugging MIDX and MIDX-bitmap related issues, it is useful to
figure out where Git is spending its time.

GitHub has been using the below trace2 regions to instrument various
components of generating a MIDX itself, as well time spent preparing to
build a MIDX bitmap.

These are limited to instrumenting the following functions:

  - midx.c::find_commits_for_midx_bitmap()
  - midx.c::midx_pack_order()
  - midx.c::prepare_midx_packing_data()
  - midx.c::write_midx_bitmap()
  - midx.c::write_midx_internal()
  - midx.c::write_midx_reverse_index()

to start and end with a trace2_region_enter() and trace2_region_leave(),
respectively.

The category for all of these is "midx", which matches the existing
convention. The region description matches the name of the function.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
midx.c