Re: [RFC][PATCH 2/3] perf: Take a hot regs snapshot for traceevents

From: Steven Rostedt
Date: Wed Mar 03 2010 - 12:07:35 EST


On Wed, 2010-03-03 at 17:37 +0100, Peter Zijlstra wrote:

> > > /* Trace events already protected against recursion */
> > > do_perf_sw_event(PERF_TYPE_TRACEPOINT, event_id, count, 1,
> > > - &data, regs);
> > > + &data, &regs);
> >
> > Off-topic: Why is the above a perf sw event? Couldn't that also be a
> > normal TRACE_EVENT()?
>
> Well, no, this is the stuff that transforms TRACE_EVENT() into perf
> software events ;-)
>

oops, my bad :-), I thought this was in the x86 arch directory. For the
University, I was helping them with adding trace points for page faults
when I came across this in arch/x86/mm/fault.c:

perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, address);


This is what I actually was wondering about. Why is it a "perf only"
trace point instead of a TRACE_EVENT()?

-- Steve


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