git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Derrick Stolee <derrickstolee@github.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, git@jeffhostetler.com,
	me@ttaylorr.com, chakrabortyabhradeep79@gmail.com
Subject: Re: [PATCH v2] pack-bitmap: remove trace2 region from hot path
Date: Mon, 26 Sep 2022 13:31:47 -0400	[thread overview]
Message-ID: <e1aab606-fdde-e10f-ed00-2af67bbfec27@github.com> (raw)
In-Reply-To: <220926.868rm618ds.gmgdl@evledraar.gmail.com>

On 9/26/2022 11:01 AM, Ævar Arnfjörð Bjarmason wrote:
> 
> On Mon, Sep 26 2022, Derrick Stolee via GitGitGadget wrote:
> 
>> This is a critical path, and it would be valuable to measure that the
>> time spent in bitmap_for_commit() does not increase when using the
>> commit lookup table. The best way to do that would be to use a mechanism
>> that sums the time spent in a region and reports a single value at the
>> end of the process. This technique was introduced but not merged by [1]
>> so maybe this example presents some justification to revisit that
>> approach.
> 
> Just getting rid of this seems like a good thing for now.
> 
> But aside: Yes, one way to mitigate this rather than removing the
> tracing would be to make it really fast.
> 
> But just skimming pack-bitmap.c do we really need trace2 at the
> granularity of a single commit? Looking at who calls bitmap_for_commit()
> wouldn't something like this sketch-out be much more useful?:

The point of it being where it was to check that we hit the path
custom to the commit lookup extension, hence the test that is removed.

You are proposing a different region entirely, meant to measure the
cost of the entire walk. Maybe that's valuable, but not critical to
this topic.

If you're proposing the high-level traces as an alternative to my
prototype using the trace2 timers, then I'll point out that the timer
approach allows us to determine how much time is being spent checking
for bitmaps versus walking commits, which the regions you provided don't.

Thanks,
-Stolee

  reply	other threads:[~2022-09-26 17:55 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
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 [this message]
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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=e1aab606-fdde-e10f-ed00-2af67bbfec27@github.com \
    --to=derrickstolee@github.com \
    --cc=avarab@gmail.com \
    --cc=chakrabortyabhradeep79@gmail.com \
    --cc=git@jeffhostetler.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=me@ttaylorr.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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.
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 NNTP newsgroup(s).