git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] pack-bitmap: remove trace2 region from hot path

From
Derrick Stolee <derrickstolee@github.com>
Date
Sep 26, 2022, 17:31 UTC
Message-ID
<e1aab606-fdde-e10f-ed00-2af67bbfec27@github.com>
In-Reply-To
<220926.868rm618ds.gmgdl@evledraar.gmail.com>
On 9/26/2022 11:01 AM, Ævar Arnfjörð Bjarmason wrote:
Show 19 quoted lines
> 
> 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

Previous: Ævar Arnfjörð BjarmasonNext: Jeff Hostetler
Message 9 of 10 in “pack-bitmap: remove trace2 region from hot path”
  1. pack-bitmap: remove trace2 region from hot pathDerrick Stolee via GitGitGadget, Sep 23, 2022
  2. Junio C HamanoSep 23, 2022
  3. Junio C HamanoSep 23, 2022
  4. Junio C HamanoSep 23, 2022
  5. Derrick StoleeSep 23, 2022
  6. Taylor BlauSep 23, 2022
  7. pack-bitmap: remove trace2 region from hot pathDerrick Stolee via GitGitGadget, Sep 26, 2022
  8. Ævar Arnfjörð BjarmasonSep 26, 2022
  9. Derrick StoleeSep 26, 2022
  10. Jeff HostetlerSep 27, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.