On Fri, Jul 27, 2012 at 01:56:36PM +0200, Frederic Weisbecker wrote: SNIP
> > The problem is more general than that I think. > We need to be able to define finer grained contexts than just > "task" and/or "CPU". > > And reusing events themselves would be a nice interface. > > For example create 3 events: > > A = irq entry tracepoint > B = irq exit tracepoint > C = cpu-cycles > > And say: I want to count cpu-cycles when event A fires and stop counting > when B fires. > > With that you can count cpu cycles on irqs. > > You could use any event you want to define your contexts: lock, functions, > etc... > > And even uprobes to define areas in userspace to profile. Would that solve > the initial problem in the thread? Like hook on function library entry/exit? > > I talked about that to Jiri Olsa several times. May be he would be interested > in implementing this. I posted some patchets one year ago but got sidetracked. > > This can give you an idea from where we can start: > https://lkml.org/lkml/2011/3/14/346 > > Jiri, would you be interested in working on this? yep, I remember also talking about A/B being functions entry/exit I think that was also the initial push for having ftrace perf events support, which already got in. I'll check ;) jirka -- To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
