Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146179
b: refs/heads/master
c: b11c53e
h: refs/heads/master
i:
  146177: 40ec52a
  146175: 16d1fe1
v: v3
  • Loading branch information
Zhaolei authored and Frederic Weisbecker committed May 26, 2009
1 parent 043f580 commit 103fecd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 29fcefba8a2f0fea11e2b721fe174a1832801284
refs/heads/master: b11c53e12f94a46b50bccc7a1a953d7ca1d54a31
9 changes: 7 additions & 2 deletions trunk/kernel/trace/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ config FTRACE_NMI_ENTER
default y

config EVENT_TRACING
select CONTEXT_SWITCH_TRACER
bool

config CONTEXT_SWITCH_TRACER
select MARKERS
bool

config TRACING
Expand Down Expand Up @@ -176,10 +181,10 @@ config SCHED_TRACER
This tracer tracks the latency of the highest priority task
to be scheduled in, starting from the point it has woken up.

config CONTEXT_SWITCH_TRACER
config ENABLE_CONTEXT_SWITCH_TRACER
bool "Trace process context switches"
select TRACING
select MARKERS
select CONTEXT_SWITCH_TRACER
help
This tracer gets called from the context switch and records
all switching of tasks.
Expand Down
6 changes: 6 additions & 0 deletions trunk/kernel/trace/trace_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ static void ftrace_clear_events(void)

if (call->enabled) {
call->enabled = 0;
tracing_stop_cmdline_record();
call->unregfunc();
}
}
Expand All @@ -99,12 +100,14 @@ static void ftrace_event_enable_disable(struct ftrace_event_call *call,
case 0:
if (call->enabled) {
call->enabled = 0;
tracing_stop_cmdline_record();
call->unregfunc();
}
break;
case 1:
if (!call->enabled) {
call->enabled = 1;
tracing_start_cmdline_record();
call->regfunc();
}
break;
Expand Down Expand Up @@ -1058,6 +1061,7 @@ static void trace_module_remove_events(struct module *mod)
found = true;
if (call->enabled) {
call->enabled = 0;
tracing_stop_cmdline_record();
call->unregfunc();
}
if (call->event)
Expand Down Expand Up @@ -1262,11 +1266,13 @@ static __init void event_trace_self_tests(void)
}

call->enabled = 1;
tracing_start_cmdline_record();
call->regfunc();

event_test_stuff();

call->unregfunc();
tracing_stop_cmdline_record();
call->enabled = 0;

pr_cont("OK\n");
Expand Down

0 comments on commit 103fecd

Please sign in to comment.