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

From: Peter Zijlstra
Date: Mon May 10 2010 - 05:43:38 EST


On Mon, 2010-05-10 at 17:29 +0800, Lin Ming wrote:
> 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;

No, cpu PMUs must always be pmu_id 0.
--
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/