From: Daniel Bristot de Oliveira <bristot@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>, linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Jiri Olsa <jolsa@kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
linux-trace-users@vger.kernel.org
Subject: Re: [RFC][PATCH 0/4] tracing: Add event-fork to trace tasks children
Date: Tue, 19 Apr 2016 23:05:28 -0300 [thread overview]
Message-ID: <5716E3E8.7000609@redhat.com> (raw)
In-Reply-To: <20160419143421.829909157@goodmis.org>
On 04/19/2016 11:34 AM, Steven Rostedt wrote:
> This code adds the event-fork option that, when set, will have tasks
> with their PIDs in set_event_pid add their children PIDs when they
> fork. It will also remove their PID from the file on exit.
That is a nice feature! I tested it and it works. But, look this...
Set the event-fork, the current shell pid, and enable the trace:
[root@f23 tracing]# echo event-fork > trace_options
[root@f23 tracing]# echo $$ > set_ftrace_pid
[root@f23 tracing]# echo function > current_tracer
to exercise the feature, start the httpd...
[root@f23 tracing]# httpd
[root@f23 tracing]# cat trace | awk '{print $1}' | sort | uniq
awk-2209
bash-2162
bash-2208
httpd-2196
httpd-2197
httpd-2199
httpd-2200
httpd-2201
httpd-2202
httpd-2203
httpd-2204
httpd-2205
httpd-2206
httpd-2207
sort-2210
uniq-2211
Awesome :-) it works!
But, the set_ftrace_pid only shows the pid of the shell. I thought
it would print all child's pid.
[root@f23 tracing]# cat set_ftrace_pid
2162
Now, lets finish the session:
[root@f23 tracing]# echo 0 > tracing_on
[root@f23 tracing]# echo nop > current_tracer
[root@f23 tracing]# echo > trace
[root@f23 tracing]# echo > set_ftrace_pid
[root@f23 tracing]# echo noevent-fork > trace_options
and start a simple trace again, filtering the watchdog/0 thread:
[root@f23 tracing]# echo 14 > set_ftrace_pid
[root@f23 tracing]# echo function > current_tracer
[root@f23 tracing]# echo 1 > tracing_on
(this is a trick to make httpd work)
[root@f23 tracing]# kill -1 2197
voilà!
[root@f23 tracing]# cat trace | awk '{print $1}' | sort | uniq
httpd-2197
httpd-2501
httpd-2503
httpd-2506
httpd-2507
httpd-2526
httpd-2527
httpd-2528
httpd-2529
httpd-2530
httpd-2531
httpd-2532
httpd-2533
httpd-2534
httpd-2535
watchdog/0-14
The httpd stills being filtered, and I did not find a way to remove
them. Although I see that they will be removed when they exit, I
think it would be nice to remove them when cleaning
set_ftrace_pid.
Am I missing something?
-- Daniel
next prev parent reply other threads:[~2016-04-20 2:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-19 14:34 [RFC][PATCH 0/4] tracing: Add event-fork to trace tasks children Steven Rostedt
2016-04-19 14:34 ` [RFC][PATCH 1/4] tracing: Rename check_ignore_pid() to ignore_this_task() Steven Rostedt
2016-04-19 14:34 ` [RFC][PATCH 2/4] tracing: Use pid bitmap instead of a pid array for set_event_pid Steven Rostedt
2016-04-19 16:55 ` Mathieu Desnoyers
2016-04-19 17:19 ` Steven Rostedt
2016-04-19 18:57 ` H. Peter Anvin
2016-04-19 19:41 ` Steven Rostedt
2016-04-19 20:17 ` Mathieu Desnoyers
2016-04-19 20:50 ` Steven Rostedt
2016-04-19 21:22 ` Mathieu Desnoyers
2016-04-19 22:49 ` Steven Rostedt
2016-04-19 22:59 ` Mathieu Desnoyers
2016-04-19 23:06 ` Steven Rostedt
2016-04-22 2:45 ` Namhyung Kim
2016-04-22 15:30 ` Steven Rostedt
2016-04-19 14:34 ` [RFC][PATCH 3/4] tracing: Add infrastructure to allow set_event_pid to follow children Steven Rostedt
2016-04-19 16:55 ` Mathieu Desnoyers
2016-04-19 17:13 ` Steven Rostedt
2016-04-19 20:30 ` Mathieu Desnoyers
2016-04-19 14:34 ` [RFC][PATCH 4/4] tracing: Update the documentation to describe "event-fork" option Steven Rostedt
2016-04-20 2:05 ` Daniel Bristot de Oliveira [this message]
2016-04-20 2:30 ` [RFC][PATCH 0/4] tracing: Add event-fork to trace tasks children Steven Rostedt
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=5716E3E8.7000609@redhat.com \
--to=bristot@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-users@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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