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

From: Peter Zijlstra
Date: Tue May 24 2011 - 10:12:27 EST


On Tue, 2011-05-24 at 09:59 -0400, Vince Weaver wrote:
> I know this is a bit late, but for some reason our users sit on these
> things and then they aren't willing to take it up with linux-kernel
> themselves
>
> > > > commit 15ac9a395a753cb28c674e7ea80386ffdff21785
> > > > Author: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
> > > > Date: Mon Sep 6 15:51:45 2010 +0200
> > > >
> > > > perf: Remove the sysfs bits
>
> removed the /sys/devices/system/cpu/perf_events
> I thought things in /sys were stable ABI?

if only.. that stuff changes way too often (not to say that's a good
thing).

> Apparently it's common for people to have scripts to check if
> perf_events is available in a kernel by checking the existence of
> /sys/devices/system/cpu/perf_events, even if they didn't use the
> files within.

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.

> Now that 2.6.38 kernels are starting to hit the distros we're getting
> complaints that it's missing.

Urgh, they'd been broken long before.. and I hadn't received any
complaints from people about that. I didn't see the point in keeping
broken interfaces around, esp. since with moving to multiple-pmu they
don't make any sense at all.

Ingo, any idea what to do here?
--
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/