Re: [RFC][PATCH 3/9] perf: export registerred pmus via sysfs
From: Peter Zijlstra
Date: Tue May 11 2010 - 05:49:43 EST
On Tue, 2010-05-11 at 17:40 +0800, Lin Ming wrote:
> /sys/devices/system/cpu/cpu0/cpu_hw_events/*
> /sys/devices/system/cpu/cpu0/cpu_hw_cache_events/*
> /sys/devices/system/cpu/cpu0/cpu_raw_events/*
> ....
> ....
> /sys/devices/system/cpu/cpuN/cpu_hw_events/*
> /sys/devices/system/cpu/cpuN/cpu_hw_cache_events/*
> /sys/devices/system/cpu/cpuN/cpu_raw_events/*
>
> Is /sys/class/event_sources/* looks like,
>
> /sys/class/event_sources/cpu_hw_events0
> -> /sys/devices/system/cpu/cpu0/cpu_hw_events
> ...
> /sys/class/event_sources/cpu_hw_eventsN
> -> /sys/devices/system/cpu/cpuN/cpu_hw_events
>
> /sys/class/event_sources/cpu_hw_cache_events0
> -> /sys/devices/system/cpu/cpu0/cpu_hw_events
> ...
> /sys/class/event_sources/cpu_hw_cache_eventsN
> -> /sys/devices/system/cpu/cpuN/cpu_hw_events
Hmm, good question.
No all the cpus would have the same event sources. I'm not sure if we
can make sysfs understand that though (added GregKH and Kay to CC).
Possibly we'd have to place them at the cpu level, like:
/sys/devices/system/cpu/cpu_*_events/
and have links like:
/sys/devices/system/cpu/cpuN/cpu_*_events ->
/sys/devices/system/cpu/cpu_*_events/
as well as
/sys/class/event_sources/cpu_*_events ->
/sys/devices/system/cpu/cpu_*_events/
--
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/