perf top: set perf_event_attr->pmu_id
RFC PATCH 9/9 perf top: set perf_event_attr->pmu_id
This is just a temporary patch to show the setting of perf_event_attr->pmu_id.
Signed-off-by Lin Ming <[email protected]>
--- tools/perf/builtin-top.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
tools/perf/builtin-top.c +5 -0
@@ -1213,6 +1213,11 @@ static void start_counter(int i, int counter) attr = attrs + counter; +/* +* TBD: in the future, may read /sys/devices/system/cpu/pmus/<pmu_id> +* to get the pmu id +*/ + attr.pmu_id =0 ; attr->sample_type =PERF_SAMPLE_IP |PERF_SAMPLE_TID ;if (freq) {
Peter Zijlstra
maintainerQuoted 13 lines · Lin Ming
This is just a temporary patch to show the setting of
perf_event_attr->pmu_id.Signed-off-by Lin Ming <[email protected]>--- tools/perf/builtin-top.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)tools/perf/builtin-top.c +0
-0
tools/perf/builtin-top.c static void start_counter(int i, int counter) · line 1220
Quoted 8 lines
tools/perf/builtin-top.c +5
-0@@ -1213,6 +1213,11 @@ static void start_counter(int i, int counter) attr = attrs + counter; +/* +* TBD: in the future, may read /sys/devices/system/cpu/pmus/<pmu_id> +* to get the pmu id +*/ + attr.pmu_id =0 ;
No, cpu PMUs must always be pmu_id 0.