Hari Bathini
e907caf3a0
perf record: Synthesize namespace events for current processes
...
Synthesize PERF_RECORD_NAMESPACES events for processes that were running prior
to invocation of perf record. The data for this is taken from /proc/$PID/ns.
These changes make way for analyzing events with regard to namespaces.
Committer notes:
Check if 'tool' is NULL in perf_event__synthesize_namespaces(), as in the
test__mmap_thread_lookup case, i.e. 'perf test Lookup mmap thread".
Testing it:
# ps axH > /tmp/allthreads
# perf record -a --namespaces usleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 1.169 MB perf.data (8 samples) ]
# perf report -D | grep PERF_RECORD_NAMESPACES | wc -l
602
# wc -l /tmp/allthreads
601 /tmp/allthreads
# tail /tmp/allthreads
16951 pts/4 T 0:00 git rebase -i a033bf1bfacdaa25642e6bcc857a7d0f67cc3c92^
16952 pts/4 T 0:00 /bin/sh /usr/libexec/git-core/git-rebase -i a033bf1bfacdaa25642e6bcc857a7d0f67cc3c92^
17176 pts/4 T 0:00 git commit --amend --no-post-rewrite
17204 pts/4 T 0:00 vim /home/acme/git/linux/.git/COMMIT_EDITMSG
18939 ? S 0:00 [kworker/2:1]
18947 ? S 0:00 [kworker/3:0]
18974 ? S 0:00 [kworker/1:0]
19047 ? S 0:00 [kworker/0:1]
19152 pts/6 S+ 0:00 weechat
19153 pts/7 R+ 0:00 ps axH
# perf report -D | grep PERF_RECORD_NAMESPACES | tail
0 0 0x125068 [0xa0]: PERF_RECORD_NAMESPACES 17176/17176 - nr_namespaces: 7
0 0 0x1255b8 [0xa0]: PERF_RECORD_NAMESPACES 17204/17204 - nr_namespaces: 7
0 0 0x125df0 [0xa0]: PERF_RECORD_NAMESPACES 18939/18939 - nr_namespaces: 7
0 0 0x125f00 [0xa0]: PERF_RECORD_NAMESPACES 18947/18947 - nr_namespaces: 7
0 0 0x126010 [0xa0]: PERF_RECORD_NAMESPACES 18974/18974 - nr_namespaces: 7
0 0 0x126120 [0xa0]: PERF_RECORD_NAMESPACES 19047/19047 - nr_namespaces: 7
0 0 0x126230 [0xa0]: PERF_RECORD_NAMESPACES 19152/19152 - nr_namespaces: 7
0 0 0x129330 [0xa0]: PERF_RECORD_NAMESPACES 19154/19154 - nr_namespaces: 7
0 0 0x12a1f8 [0xa0]: PERF_RECORD_NAMESPACES 19155/19155 - nr_namespaces: 7
0 0 0x12b0b8 [0xa0]: PERF_RECORD_NAMESPACES 19155/19155 - nr_namespaces: 7
#
Humm, investigate why we got two record for the 19155 pid/tid...
Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexei Starovoitov <ast@fb.com>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sargun Dhillon <sargun@sargun.me>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/148891931111.25309.11073854609798681633.stgit@hbathini.in.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-03-14 15:16:09 -03:00
..
2017-02-08 08:55:01 -03:00
2017-03-06 12:39:30 -03:00
2017-03-14 11:38:23 -03:00
2016-11-14 12:42:56 -03:00
2017-03-03 19:07:13 -03:00
2016-07-12 16:23:35 -03:00
2016-08-04 11:02:38 +02:00
2017-03-03 19:07:16 -03:00
2016-12-20 09:37:40 -03:00
2017-03-13 11:58:57 -03:00
2017-03-14 15:16:09 -03:00
2017-03-13 10:59:36 -03:00
2017-01-26 11:43:01 -03:00
2017-03-14 11:38:23 -03:00
2016-07-12 15:19:47 -03:00
2017-03-07 12:48:46 -03:00
2016-11-14 13:10:37 -03:00
2017-03-14 11:38:23 -03:00
2017-03-03 19:07:17 -03:00
2017-01-27 12:23:33 -03:00
2017-03-14 11:38:23 -03:00
2017-01-11 16:48:01 -03:00
2017-03-14 11:38:23 -03:00
2017-03-14 11:38:23 -03:00
2017-02-08 08:55:04 -03:00
2017-03-14 11:38:23 -03:00
2017-03-14 11:38:23 -03:00
2017-02-08 09:41:10 -03:00
2017-03-14 15:16:09 -03:00
2017-03-14 11:38:23 -03:00
2017-03-14 11:38:23 -03:00
2017-03-14 11:38:23 -03:00
2017-03-03 19:07:19 -03:00
2016-08-23 15:37:33 -03:00
2017-02-20 11:35:54 -03:00
2017-03-14 11:38:23 -03:00
2017-01-26 11:43:01 -03:00
2016-12-15 16:25:44 -03:00
2017-03-13 10:59:31 -03:00
2017-03-03 19:07:19 -03:00
2017-02-17 16:04:38 -03:00
2017-03-03 19:07:14 -03:00
2016-09-08 13:44:07 -03:00
2017-01-27 12:23:33 -03:00
2017-03-14 11:38:23 -03:00