projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a3d7ce
)
tracing: change CPU ring buffer state from tracing_cpumask
author
Vaibhav Nagarnaik
<
[email protected]
>
Fri, 4 May 2012 01:59:52 +0000
(18:59 -0700)
committer
Steven Rostedt
<
[email protected]
>
Wed, 16 May 2012 23:50:38 +0000
(19:50 -0400)
According to Documentation/trace/ftrace.txt:
tracing_cpumask:
This is a mask that lets the user only trace
on specified CPUS. The format is a hex string
representing the CPUS.
The tracing_cpumask currently doesn't affect the tracing state of
per-CPU ring buffers.
This patch enables/disables CPU recording as its corresponding bit in
tracing_cpumask is set/unset.
Link:
http://lkml.kernel.org/r/
[email protected]
Cc: Frederic Weisbecker <
[email protected]
>
Cc: Ingo Molnar <
[email protected]
>
Cc: Laurent Chavey <
[email protected]
>
Cc: Justin Teravest <
[email protected]
>
Cc: David Sharp <
[email protected]
>
Signed-off-by: Vaibhav Nagarnaik <
[email protected]
>
Signed-off-by: Steven Rostedt <
[email protected]
>
kernel/trace/trace.c
patch
|
blob
|
history
diff --git
a/kernel/trace/trace.c
b/kernel/trace/trace.c
index 0ed4df0c6a39fd8c507a79f95a0e87fbccd3d34a..08a08bab57a3f104d658291fd873ade6b786d34b 100644
(file)
--- a/
kernel/trace/trace.c
+++ b/
kernel/trace/trace.c
@@
-2669,10
+2669,12
@@
tracing_cpumask_write(struct file *filp, const char __user *ubuf,
if (cpumask_test_cpu(cpu, tracing_cpumask) &&
!cpumask_test_cpu(cpu, tracing_cpumask_new)) {
atomic_inc(&global_trace.data[cpu]->disabled);
+ ring_buffer_record_disable_cpu(global_trace.buffer, cpu);
}
if (!cpumask_test_cpu(cpu, tracing_cpumask) &&
cpumask_test_cpu(cpu, tracing_cpumask_new)) {
atomic_dec(&global_trace.data[cpu]->disabled);
+ ring_buffer_record_enable_cpu(global_trace.buffer, cpu);
}
}
arch_spin_unlock(&ftrace_max_lock);