Re: Fwd: [RFC][PATCH v1 11/15] perf: export tracepoint events via sysfs: power

From: Rafael J. Wysocki
Date: Fri Jul 23 2010 - 08:03:02 EST


On Friday, July 23, 2010, Lin Ming wrote:
>
> > From: Rafael J. Wysocki <rjw@xxxxxxx>
> > Date: Fri, Jul 23, 2010 at 5:53 AM
> > Subject: Re: [RFC][PATCH v1 11/15] perf: export tracepoint events via
> > sysfs: power
> >
> >
> > On Thursday, July 22, 2010, Lin Ming wrote:
> > > power tracepoint events are exported like below,
> > >
> > > /sys/power/events/
> > > |-- power_end
> > > | |-- config
> > > | `-- type
> > > |-- power_frequency
> > > | |-- config
> > > | `-- type
> > > `-- power_start
> > > |-- config
> > > `-- type
> >
> > Any details?
>
> Sorry that I didn't include you in the patch description.
>
> [RFC][PATCH v1 00/15] perf: export events in a structured way via sysfs
> http://lkml.org/lkml/2010/7/22/141

Thanks, I'll have a look at this later today.

> > > ---
> > > kernel/power/main.c | 4 ++++
> > > 1 files changed, 4 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/kernel/power/main.c b/kernel/power/main.c
> > > index b58800b..6749374 100644
> > > --- a/kernel/power/main.c
> > > +++ b/kernel/power/main.c
> > > @@ -12,6 +12,7 @@
> > > #include <linux/string.h>
> > > #include <linux/resume-trace.h>
> > > #include <linux/workqueue.h>
> > > +#include <linux/perf_event.h>
> > >
> > > #include "power.h"
> > >
> > > @@ -269,6 +270,9 @@ static int __init pm_init(void)
> > > power_kobj = kobject_create_and_add("power", NULL);
> > > if (!power_kobj)
> > > return -ENOMEM;
> > > +
> > > + perf_sys_add_tp(power_kobj, "power");
> > > +
> >
> > Why isn't it done in drivers/base/power/sysfs.c ?
>
> The sysfs thing in drivers/base/power/sysfs.c is per device.
> But the power tracepoint events are not per device, right?

Right, sorry.

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