kernel-ark/kernel/trace
Li Zefan e870e9a124 tracing: Allow to disable cmdline recording
We found that even enabling a single trace event that will rarely be
triggered can add big overhead to context switch.

(lmbench context switch test)
 -------------------------------------------------
 2p/0K 2p/16K 2p/64K 8p/16K 8p/64K 16p/16K 16p/64K
 ctxsw  ctxsw  ctxsw ctxsw  ctxsw   ctxsw   ctxsw
------ ------ ------ ------ ------ ------- -------
  2.19   2.3   2.21   2.56   2.13     2.54    2.07
  2.39   2.51  2.35   2.75   2.27     2.81    2.24

The overhead is 6% ~ 11%.

It's because when a trace event is enabled 3 tracepoints (sched_switch,
sched_wakeup, sched_wakeup_new) will be activated to map pid to cmdname.

We'd like to avoid this overhead, so add a trace option '(no)record-cmd'
to allow to disable cmdline recording.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4C2D57F4.2050204@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-07-20 21:52:33 -04:00
..
blktrace.c blktrace: Fix new kernel-doc warnings 2010-05-31 09:58:20 +02:00
ftrace.c tracing: Remove ftrace_preempt_disable/enable 2010-06-03 19:32:38 -04:00
Kconfig tracing: Remove ksym tracer 2010-07-15 23:59:33 +02:00
Makefile tracing: Remove ksym tracer 2010-07-15 23:59:33 +02:00
power-traces.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ring_buffer_benchmark.c ring-buffer: Make benchmark handle missed events 2010-04-27 13:26:58 -04:00
ring_buffer.c Merge branch 'tip/perf/core-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/core 2010-06-08 19:34:40 +02:00
trace_branch.c tracing: Allow events to share their print functions 2010-05-14 14:20:32 -04:00
trace_clock.c tracing: Remove ftrace_preempt_disable/enable 2010-06-03 19:32:38 -04:00
trace_entries.h tracing: Remove ksym tracer 2010-07-15 23:59:33 +02:00
trace_event_perf.c tracing: Use class->reg() for all registering of events 2010-06-28 21:13:14 -04:00
trace_events_filter.c tracing: Remove test of NULL define_fields callback 2010-06-28 17:12:52 -04:00
trace_events.c tracing: Allow to disable cmdline recording 2010-07-20 21:52:33 -04:00
trace_export.c tracing: Remove redundant raw_init callbacks 2010-06-28 17:12:53 -04:00
trace_functions_graph.c tracing/function-graph: Use correct string size for snprintf 2010-06-28 21:11:39 -04:00
trace_functions.c tracing: Remove ftrace_preempt_disable/enable 2010-06-03 19:32:38 -04:00
trace_irqsoff.c tracing: Add graph output support for irqsoff tracer 2010-04-27 12:36:53 -04:00
trace_kprobe.c tracing/kprobes: Support "string" type 2010-07-05 15:54:45 -03:00
trace_mmiotrace.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
trace_nop.c
trace_output.c Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-05-27 15:23:47 -07:00
trace_output.h tracing: Allow events to share their print functions 2010-05-14 14:20:32 -04:00
trace_printk.c
trace_sched_switch.c tracing: Let tracepoints have data passed to tracepoint callbacks 2010-05-14 09:50:34 -04:00
trace_sched_wakeup.c tracing: Remove ftrace_preempt_disable/enable 2010-06-03 19:32:38 -04:00
trace_selftest_dynamic.c
trace_selftest.c tracing: Remove ksym tracer 2010-07-15 23:59:33 +02:00
trace_stack.c tracing: Remove ftrace_preempt_disable/enable 2010-06-03 19:32:38 -04:00
trace_stat.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
trace_stat.h
trace_syscalls.c tracing: Use a global field list for all syscall exit events 2010-06-28 17:12:44 -04:00
trace_sysprof.c x86: Unify dumpstack.h and stacktrace.h 2010-06-08 23:29:52 +02:00
trace_workqueue.c tracing: Let tracepoints have data passed to tracepoint callbacks 2010-05-14 09:50:34 -04:00
trace.c tracing: Allow to disable cmdline recording 2010-07-20 21:52:33 -04:00
trace.h tracing: Allow to disable cmdline recording 2010-07-20 21:52:33 -04:00