add PERF_FORMAT_TOTAL_TIME_{ENABLED,RUNNING} to support multiplexing (#1814)

This commit is contained in:
dominic 2024-07-12 10:28:16 +01:00 committed by GitHub
parent 71f4218c1a
commit 38df9daf48
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -157,7 +157,8 @@ PerfCounters PerfCounters::Create(
attr.exclude_hv = true;
// Read all counters in a group in one read.
attr.read_format = PERF_FORMAT_GROUP;
attr.read_format = PERF_FORMAT_GROUP | PERF_FORMAT_TOTAL_TIME_ENABLED |
PERF_FORMAT_TOTAL_TIME_RUNNING;
int id = -1;
while (id < 0) {