google / google/benchmark

Perf Counters in Multithread Benchmark

Open
#1,929 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
10.4k
Forks
1.8k
Avg merge
2d 4h
Merged PRs (30d)
8

Description

I found that all State objects use the same PerfCountersMeasurement pointer.

In State::PauseTiming() and State::ResumeTiming(), PerfCountersMeasurement::Start() and PerfCountersMeasurement::Stop() is called.

Each thread has an exclusive State object, but all these object share the same PerfCountersMeasurement pointer.

So is this correct? What happened when PerfCountersMeasurement::Start() and PerfCountersMeasurement::Stop() called multiple times in multiple threads?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.