From 38df9daf489f7e359bbe6709099f0102398261d6 Mon Sep 17 00:00:00 2001 From: dominic <510002+dmah42@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:28:16 +0100 Subject: [PATCH] add PERF_FORMAT_TOTAL_TIME_{ENABLED,RUNNING} to support multiplexing (#1814) --- src/perf_counters.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/perf_counters.cc b/src/perf_counters.cc index 2eb97eb4..e2758afb 100644 --- a/src/perf_counters.cc +++ b/src/perf_counters.cc @@ -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) {