Skip to content

Commit

Permalink
tracing/sysprof: add missing tracing_{start,stop}_record_cmdline()
Browse files Browse the repository at this point in the history
Add the missing pair tracing_{start,stop}_record_cmdline() to record well
the cmdline associated with pid.

Changes in v2:

- fix a build error, the sched_switch tracer is needed to record the
  cmdline.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Feb 11, 2009
1 parent d524e03 commit b22f485
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions kernel/trace/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ config SYSPROF_TRACER
bool "Sysprof Tracer"
depends on X86
select TRACING
select CONTEXT_SWITCH_TRACER
help
This tracer provides the trace needed by the 'Sysprof' userspace
tool.
Expand Down
3 changes: 3 additions & 0 deletions kernel/trace/trace_sysprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ static int stack_trace_init(struct trace_array *tr)
{
sysprof_trace = tr;

tracing_start_cmdline_record();

mutex_lock(&sample_timer_lock);
start_stack_timers();
tracer_enabled = 1;
Expand All @@ -247,6 +249,7 @@ static int stack_trace_init(struct trace_array *tr)

static void stack_trace_reset(struct trace_array *tr)
{
tracing_stop_cmdline_record();
stop_stack_trace(tr);
}

Expand Down

0 comments on commit b22f485

Please sign in to comment.