mirror of
https://github.com/torvalds/linux.git
synced 2026-11-25 07:52:34 +00:00
Impact: new tracing infrastructure feature Provide infrastructure to generate software perf counter events from tracepoints. Signed-off-by: Peter Zijlstra <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Steven Rostedt <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
32 lines
525 B
C
32 lines
525 B
C
/*
|
|
* trace event based perf counter profiling
|
|
*
|
|
* Copyright (C) 2009 Red Hat Inc, Peter Zijlstra <[email protected]>
|
|
*
|
|
*/
|
|
|
|
#include "trace.h"
|
|
|
|
int ftrace_profile_enable(int event_id)
|
|
{
|
|
struct ftrace_event_call *event;
|
|
|
|
for_each_event(event) {
|
|
if (event->id == event_id)
|
|
return event->profile_enable(event);
|
|
}
|
|
|
|
return -EINVAL;
|
|
}
|
|
|
|
void ftrace_profile_disable(int event_id)
|
|
{
|
|
struct ftrace_event_call *event;
|
|
|
|
for_each_event(event) {
|
|
if (event->id == event_id)
|
|
return event->profile_disable(event);
|
|
}
|
|
}
|
|
|