[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130823101249.GR31370@twins.programming.kicks-ass.net>
Date: Fri, 23 Aug 2013 12:12:49 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Jiejing Zhang <jiejzhang@...dia.com>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Jiejing Zhang <kzjeef@...il.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Eric Miao <emiao@...dia.com>
Subject: Re: [PATCH] ftrace: add tgid information in task switch event.
On Fri, Aug 23, 2013 at 04:33:19PM +0800, Jiejing Zhang wrote:
>
> On 08/21/2013 11:23 PM, Peter Zijlstra wrote:
> >On Wed, Aug 21, 2013 at 11:09:44AM -0400, Steven Rostedt wrote:
> >>>From: Jiejing Zhang <jiejzhang@...dia.com>
> >>>
> >>>ftrace only report pid in task switch event, which is
> >>>actually thread ID in user space view, the comm of
> >>>the thread will be like "Thread-1", "Compiler", etc
> >>>in android system, it's useful if we can add tgid
> >>>information in ftrace event to find out the process
> >>>id, and the process id's comm will help us to figure
> >>>out the application, which was useful on data analysis
> >>>tools.
> >Meh.. are you telling me you really can't do that otherwise?
> >
> >Adding this information makes the tracepoint slower for everybody else.
> >How about you enable trace_sched_process_fork() and track things that
> >way?
> Thanks for the tip, I have tried fix this by avoid add tgid in ftrace,
> actually the relationship between thread and process can be figure by
> analysis these two command's output:
> `ps aTH -F` and `ps a -F`
Yeah, or prod around in /proc yourself.
> also with fork event, it can totally avoid add such a patch in kernel.
Kinda depends on when you start tracing, if you start tracing when
everything is already running you'll need a /proc state dump for the
current state and the fork tracepoint can then update you on new tasks.
Anyway, good to hear this works for you.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists