Re: perf: regression -- missing /sys/devices/system/cpu/perf_events

From: Ingo Molnar
Date: Tue May 24 2011 - 15:48:30 EST



* Vince Weaver <vweaver1@xxxxxxxxxxxx> wrote:

> On Tue, 24 May 2011, Peter Zijlstra wrote:
>
> > A much more reliable way is simply doing the syscall and seeing what
> > happens. But if you want to poke around in sysfs, /sys/bus/event_source/
> > is the new location.
>
> It's been suggested that they can look for the existence of:
> /proc/sys/kernel/perf_event_paranoid
>
> is that something not likely to go away?

Well, we indeed do not remove kernel parameters, but checking for that would
break on systems (or chroot environments) that do not have /proc mounted or
visible.

So, what is wrong with the method Peter suggested: the presence of the perf
syscall (it not returning -ENOSYS) is bona fide evidence that perf is
available.

Thanks,

Ingo
--
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/