Re: [RFC] adding of TGID to ftrace output

From: Joel Fernandes
Date: Thu May 11 2017 - 14:57:50 EST


On Thu, May 11, 2017 at 7:23 AM, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
[..]
>> To fix the suggestion I made in the very beginning of this email, I
>> suggest a combination of trace_find_cmdline type of approach to save
>> the tgid of all current threads available, and then using
>> trace_sched_fork to find out what we missed (such as threads that were
>> added and removed.) I think this approach will be robust and not
>> affect any of the existing ftrace users (since we can make it a print
>> option). Thoughts?
>>
>> Update: actually I find that someone already wrote an out-of-tree
>> patch for Android long time back during 3.10 kernel days that added a
>> 'print-tgid' option that saved tgid in the trace_save_cmdline function
>> and then find it later during output time:
>> https://android.googlesource.com/kernel/msm.git/+/0c5363f6a0a89952b0d0072ff4e4c3bd042add9a%5E%21/
>> It will be nice if we can have a more upstream ready version of this
>> patch or some other approach that you think works best. Thanks!
>
> Well, make that patch upstream friendly and post it to LMKL (Ccing me
> of course). And we'll talk about that.
>

Sure, will do. Thanks.

Regards,
Joel