public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Subject: Re: [PATCH 1/2] tracing/sysprof: add missing tracing_{start,stop}_record_cmdline()
Date: Tue, 10 Feb 2009 15:49:11 +0100	[thread overview]
Message-ID: <20090210144910.GE5836@nowhere> (raw)
In-Reply-To: <20090210142543.GF16147@elte.hu>

On Tue, Feb 10, 2009 at 03:25:43PM +0100, Ingo Molnar wrote:
> 
> * Frederic Weisbecker <fweisbec@gmail.com> wrote:
> 
> > On Tue, Feb 10, 2009 at 01:31:45PM +0100, Ingo Molnar wrote:
> > > 
> > > * Ingo Molnar <mingo@elte.hu> wrote:
> > > 
> > > > * Frederic Weisbecker <fweisbec@gmail.com> wrote:
> > > > 
> > > > > Add the missing pair tracing_{start,stop}_record_cmdline() to record well
> > > > > the cmdline associated with pid.
> > > > > 
> > > > > Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
> > > > > ---
> > > > >  kernel/trace/trace_sysprof.c |    3 +++
> > > > >  1 files changed, 3 insertions(+), 0 deletions(-)
> > > > 
> > > > applied to tip/tracing/sysprof, thanks Frederic!
> > > 
> > > hm, causes a build failure:
> > > 
> > > kernel/built-in.o: In function `stack_trace_reset':
> > > trace_sysprof.c:(.text+0x3e91a): undefined reference to `tracing_stop_cmdline_record'
> > > kernel/built-in.o: In function `stack_trace_init':
> > > trace_sysprof.c:(.text+0x3e953): undefined reference to `tracing_start_cmdline_record'
> > > 
> > > 	Ingo
> > 
> > Sorry, this fixlet solves the problem:
> 
> Could you please send one combo patch? The patch was so small and was at
> the tail of tracing/sysprof that i didnt apply it after all.
> 
> 	Ingo


Ok.
I've dropped the build error example in the changelog, keeping only the reason
of the error, as this is a V2.
Tell me if you are fine with it.

--
>From 1656ef9b22049a0d93c7c3946e28774876df535b Mon Sep 17 00:00:00 2001
From: Frederic Weisbecker <fweisbec@gmail.com>
Date: Tue, 10 Feb 2009 15:33:43 +0100
Subject: [PATCH v2] tracing/sysprof: add missing tracing_{start,stop}_record_cmdline()

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.

Reported-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
 kernel/trace/Kconfig         |    1 +
 kernel/trace/trace_sysprof.c |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 79be773..620f9cd 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -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.
diff --git a/kernel/trace/trace_sysprof.c b/kernel/trace/trace_sysprof.c
index 84ca9d8..9902c15 100644
--- a/kernel/trace/trace_sysprof.c
+++ b/kernel/trace/trace_sysprof.c
@@ -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;
@@ -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);
 }
 
-- 
1.6.1




  reply	other threads:[~2009-02-10 14:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-10  3:43 [PATCH 1/2] tracing/sysprof: add missing tracing_{start,stop}_record_cmdline() Frederic Weisbecker
2009-02-10 12:27 ` Ingo Molnar
2009-02-10 12:31   ` Ingo Molnar
2009-02-10 14:10     ` Frederic Weisbecker
2009-02-10 14:25       ` Ingo Molnar
2009-02-10 14:49         ` Frederic Weisbecker [this message]
2009-02-11 12:04           ` Ingo Molnar
2009-02-11 12:10             ` Ingo Molnar
2009-02-11 12:15               ` Ingo Molnar
2009-02-10 14:26       ` Steven Rostedt
2009-02-10 14:39         ` Frederic Weisbecker
2009-02-10 12:54 ` Arnaldo Carvalho de Melo
2009-02-10 14:26   ` Frederic Weisbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090210144910.GE5836@nowhere \
    --to=fweisbec@gmail.com \
    --cc=acme@ghostprotocols.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox