mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <>
To: "Derrick Stolee via GitGitGadget" <>
	Derrick Stolee <>
Subject: Re: [PATCH] pack-bitmap: remove trace2 region from hot path
Date: Fri, 23 Sep 2022 10:36:44 -0700	[thread overview]
Message-ID: <xmqq7d1uuh5f.fsf@gitster.g> (raw)
In-Reply-To: <> (Derrick Stolee via GitGitGadget's message of "Fri, 23 Sep 2022 13:00:34 +0000")

"Derrick Stolee via GitGitGadget" <> writes:

>     I noticed this while trying to backport the Abhradeep's lookup table
>     work into GitHub's fork. Something went wrong in that process, causing
>     this region to significantly slow down. It turns out that slow down does
>     not reproduce on current 'master', which is good. I must have missed
>     something while I was backporting.
>     Regardless, the use of trace2_region_enter() here should be removed or
>     replaced. For the sake of 2.38.0, this simple removal is safe enough.

Well, not doing this removal is even safer, if we know that it is
not hurting in the -rc code.  It would be better than breaking our
tests without knowing ;-)  I am not upset that the patch broke the
test, by the way.  Compared to things silently breaking without
surfacing, a loud breakage in tests is a much easier thing to

My test run with the attached just finished, so that's what I am
going to queue tentatively on top.


 pack-bitmap.c           | 1 +
 t/ | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git c/pack-bitmap.c w/pack-bitmap.c
index 13457dd77e..a2bbbbd811 100644
--- c/pack-bitmap.c
+++ w/pack-bitmap.c
@@ -830,6 +830,7 @@ struct ewah_bitmap *bitmap_for_commit(struct bitmap_index *bitmap_git,
 		if (!bitmap_git->table_lookup)
 			return NULL;
+		/* this is a fairly hot codepath - no trace2_region please */
 		/* NEEDSWORK: cache misses aren't recorded */
 		bitmap = lazy_bitmap_for_commit(bitmap_git, commit);
 		if (!bitmap)
diff --git c/t/ w/t/
index 7e50f8e765..2b1efc923b 100755
--- c/t/
+++ w/t/
@@ -455,7 +455,7 @@ test_expect_success 'verify writing bitmap lookup table when enabled' '
 	grep "\"label\":\"writing_lookup_table\"" trace2
-test_expect_success 'lookup table is actually used to traverse objects' '
+: test_expect_success 'lookup table is actually used to traverse objects' '
 	git repack -adb &&
 	GIT_TRACE2_EVENT="$(pwd)/trace3" \
 		git rev-list --use-bitmap-index --count --all &&

  parent reply	other threads:[~2022-09-23 17:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-23 13:00 [PATCH] pack-bitmap: remove trace2 region from hot path Derrick Stolee via GitGitGadget
2022-09-23 17:05 ` Junio C Hamano
2022-09-23 17:25   ` Junio C Hamano
2022-09-23 17:36 ` Junio C Hamano [this message]
2022-09-23 18:07   ` Derrick Stolee
2022-09-23 19:17   ` Taylor Blau
2022-09-26 13:17 ` [PATCH v2] " Derrick Stolee via GitGitGadget
2022-09-26 15:01   ` Ævar Arnfjörð Bjarmason
2022-09-26 17:31     ` Derrick Stolee
2022-09-27 18:37 ` [PATCH] " Jeff Hostetler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq7d1uuh5f.fsf@gitster.g \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).