Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1382996
| From | Daniel Bristot de Oliveira <bristot@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC][PATCH 0/4] tracing: Add event-fork to trace tasks children |
| Date | 2016-04-20 04:10 +0200 |
| Message-ID | <rpPKx-d8-3@gated-at.bofh.it> (permalink) |
| References | <rpEYO-8k2-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC][PATCH 0/4] tracing: Add event-fork to trace tasks children Steven Rostedt <rostedt@goodmis.org> - 2016-04-19 16:40 +0200
[RFC][PATCH 2/4] tracing: Use pid bitmap instead of a pid array for set_event_pid Steven Rostedt <rostedt@goodmis.org> - 2016-04-19 16:40 +0200
Re: [RFC][PATCH 2/4] tracing: Use pid bitmap instead of a pid array for set_event_pid Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-04-19 19:00 +0200
Re: [RFC][PATCH 2/4] tracing: Use pid bitmap instead of a pid array for set_event_pid Steven Rostedt <rostedt@goodmis.org> - 2016-04-19 19:20 +0200
Re: [RFC][PATCH 2/4] tracing: Use pid bitmap instead of a pid array for set_event_pid "H. Peter Anvin" <hpa@zytor.com> - 2016-04-19 21:00 +0200
Re: [RFC][PATCH 2/4] tracing: Use pid bitmap instead of a pid array for set_event_pid Steven Rostedt <rostedt@goodmis.org> - 2016-04-19 21:50 +0200
Re: [RFC][PATCH 2/4] tracing: Use pid bitmap instead of a pid array for set_event_pid Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-04-19 22:20 +0200
Re: [RFC][PATCH 2/4] tracing: Use pid bitmap instead of a pid array for set_event_pid Steven Rostedt <rostedt@goodmis.org> - 2016-04-19 23:00 +0200
Re: [RFC][PATCH 2/4] tracing: Use pid bitmap instead of a pid array for set_event_pid Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-04-19 23:30 +0200
Re: [RFC][PATCH 2/4] tracing: Use pid bitmap instead of a pid array for set_event_pid Steven Rostedt <rostedt@goodmis.org> - 2016-04-20 00:50 +0200
Re: [RFC][PATCH 2/4] tracing: Use pid bitmap instead of a pid array for set_event_pid Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-04-20 01:00 +0200
Re: [RFC][PATCH 2/4] tracing: Use pid bitmap instead of a pid array for set_event_pid Steven Rostedt <rostedt@goodmis.org> - 2016-04-20 01:10 +0200
Re: [RFC][PATCH 2/4] tracing: Use pid bitmap instead of a pid array for set_event_pid Namhyung Kim <namhyung@kernel.org> - 2016-04-22 04:50 +0200
Re: [RFC][PATCH 2/4] tracing: Use pid bitmap instead of a pid array for set_event_pid Steven Rostedt <rostedt@goodmis.org> - 2016-04-22 17:40 +0200
[RFC][PATCH 1/4] tracing: Rename check_ignore_pid() to ignore_this_task() Steven Rostedt <rostedt@goodmis.org> - 2016-04-19 16:40 +0200
Re: [RFC][PATCH 0/4] tracing: Add event-fork to trace tasks children Daniel Bristot de Oliveira <bristot@redhat.com> - 2016-04-20 04:10 +0200
Re: [RFC][PATCH 0/4] tracing: Add event-fork to trace tasks children Steven Rostedt <rostedt@goodmis.org> - 2016-04-20 04:40 +0200
csiph-web