Skip to content

Do not pass PerfCountersMeasurement to RunMemoryManager(). - #2379

Merged
dmah42 merged 2 commits into
google:mainfrom
mhansen:no_mem_counters
Nov 12, 2026
Merged

dmah42 merged 2 commits into
google:mainfrom
mhansen:no_mem_counters

Conversation

@mhansen

@mhansen mhansen commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Just a tiny fix I found and extracted out from other changes.

BenchmarkRunner::RunMemoryManager() only returns MemoryManager::Result and discards manager->results.counters (reported perf counters come from the timed DoNIterations() pass). Passing perf_counters_measurement_ptr here did unnecessary PMU reads and allocated a
std::vector<std::pair<std::string, double>> inside State::PauseTimingImpl() during the memory pass.

Pass nullptr instead, matching BenchmarkRunner::RunProfilerManager().

Not a big deal, just a little tightening up.

AI-assisted: this change was written with the help of an AI coding tool.

BenchmarkRunner::RunMemoryManager() only returns MemoryManager::Result
and discards manager->results.counters (reported perf counters come from
the timed DoNIterations() pass). Passing perf_counters_measurement_ptr
here did unnecessary PMU reads and allocated a
std::vector<std::pair<std::string, double>> inside
State::PauseTimingImpl() during the memory pass.

Pass nullptr instead, matching BenchmarkRunner::RunProfilerManager().

AI-assisted: this change was written with the help of an AI coding tool.
@dmah42
dmah42 merged commit d886e31 into google:main Nov 12, 2026
108 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants