Re: perf, ftrace and MCEs

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Steven Rostedt
Date: Monday, May 3, 2010 - 7:41 am

On Sat, 2010-05-01 at 20:12 +0200, Borislav Petkov wrote:

I'm not exactly sure what you goal is, but if you need to do something
directly, you can bypass ftrace and perf. All trace events can be
connected by anything even when ftrace and perf are not enabled.

That is, you need to connect to the tracepoint and write you own
callback. This can be done pretty much at anytime during boot up. To see
how to connect to a trace point, you can look at
register_trace_sched_switch() in kernel/trace/ftrace.c. This registers a
callback to the trace_sched_switch() trace point in sched.c.


This looks like a good reason to have your own handler. More than one
callback may be registered to a tracepoint, so you do not need to worry
about having other handlers affect your code.

-- Steve



--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
perf, ftrace and MCEs, Borislav Petkov, (Sat May 1, 11:12 am)
Re: perf, ftrace and MCEs, Steven Rostedt, (Mon May 3, 7:41 am)
Re: perf, ftrace and MCEs, Borislav Petkov, (Mon May 3, 2:20 pm)
Re: perf, ftrace and MCEs, Andi Kleen, (Tue May 4, 3:15 am)
Re: perf, ftrace and MCEs, Ingo Molnar, (Tue May 4, 4:32 am)
Re: perf, ftrace and MCEs, Borislav Petkov, (Sat May 15, 6:43 am)
Re: perf, ftrace and MCEs, Ingo Molnar, (Sun May 16, 4:26 am)
Re: perf, ftrace and MCEs, Borislav Petkov, (Sun May 16, 9:51 am)