[RFC][PATCH 9/9] perf top: set perf_event_attr->pmu_id

From: Lin Ming
Date: Mon May 10 2010 - 05:30:16 EST


This is just a temporary patch to show the setting of
perf_event_attr->pmu_id.

Signed-off-by: Lin Ming <ming.m.lin@xxxxxxxxx>
---
tools/perf/builtin-top.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index ed9b5b6..f775393 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -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) {


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/