From: Jeff Hostetler Date: Tue, 27 Sep 2022 18:37:19 GMT Subject: Re: [PATCH] pack-bitmap: remove trace2 region from hot path Message-ID: <4c4954d8-82ea-8674-542e-865c514a7ae5@jeffhostetler.com> In-Reply-To: On 9/23/22 9:00 AM, Derrick Stolee via GitGitGadget wrote: > From: Derrick Stolee > > The trace2 region around the call to lazy_bitmap_for_commit() in > bitmap_for_commit() was added in 28cd730680d (pack-bitmap: prepare to > read lookup table extension, 2022-08-14). While adding trace2 regions is > typically helpful for tracking performance, this method is called > possibly thousands of times as a commit walk explores commit history > looking for a matching bitmap. When trace2 output is enabled, this > region is emitted many times and performance is throttled by that > output. > > For now, remove these regions entirely. > > 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. > > [1] https://lore.kernel.org/git/pull.1099.v2.git.1640720202.gitgitgadget@gmail.com/ I'll dust off my "timers and counters" series, address the various issues that were raised back in December, and resubmit. Thanks for the reminder. Jeff