2009-12-14 20:09:31 -02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-11-28 07:56:39 -02:00
|
|
|
|
2012-09-06 17:46:55 +02:00
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
2011-11-28 08:30:20 -02:00
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-15 16:27:32 +02:00
|
|
|
|
2017-02-10 16:36:12 +09:00
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
2017-04-18 10:46:11 -03:00
|
|
|
|
2017-04-17 15:23:08 -03:00
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:36:11 +09:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
|
|
|
|
|
2013-10-15 16:27:32 +02:00
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
2012-12-01 22:00:00 +01:00
|
|
|
|
2012-12-01 21:57:04 +01:00
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-01 22:00:00 +01:00
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:44 +02:00
|
|
|
|
2012-10-05 16:44:45 +02:00
|
|
|
|
2012-10-05 16:44:40 +02:00
|
|
|
|
2017-02-11 01:18:56 +09:00
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
2012-10-05 16:44:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:43 +02:00
|
|
|
|
2017-02-10 16:36:11 +09:00
|
|
|
|
2012-10-05 16:44:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:36:11 +09:00
|
|
|
|
2012-10-05 16:44:41 +02:00
|
|
|
|
2012-10-05 16:44:43 +02:00
|
|
|
|
2012-10-05 16:44:41 +02:00
|
|
|
|
|
|
|
|
|
2017-02-11 01:18:56 +09:00
|
|
|
|
2012-10-05 16:44:41 +02:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:36:11 +09:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:36:11 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:43 +02:00
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:41 +02:00
|
|
|
|
2012-10-05 16:44:43 +02:00
|
|
|
|
2012-10-05 16:44:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:41 +02:00
|
|
|
|
2012-10-05 16:44:43 +02:00
|
|
|
|
2012-10-05 16:44:41 +02:00
|
|
|
|
2012-10-05 16:44:43 +02:00
|
|
|
|
2012-10-05 16:44:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:43 +02:00
|
|
|
|
2012-10-05 16:44:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-21 23:31:51 +02:00
|
|
|
|
2012-10-05 16:44:42 +02:00
|
|
|
|
2014-02-07 12:06:07 +09:00
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-21 23:31:51 +02:00
|
|
|
|
2012-10-05 16:44:42 +02:00
|
|
|
|
2012-10-21 23:31:51 +02:00
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:42 +02:00
|
|
|
|
2012-12-01 21:15:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:42 +02:00
|
|
|
|
|
|
|
|
|
2012-10-21 23:31:51 +02:00
|
|
|
|
2012-10-05 16:44:42 +02:00
|
|
|
|
2012-12-01 21:15:40 +01:00
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:42 +02:00
|
|
|
|
2012-12-01 21:15:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:42 +02:00
|
|
|
|
|
|
|
|
|
2012-10-21 23:31:51 +02:00
|
|
|
|
2012-10-05 16:44:43 +02:00
|
|
|
|
2012-12-01 21:15:40 +01:00
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:43 +02:00
|
|
|
|
2012-12-01 21:15:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:43 +02:00
|
|
|
|
2012-12-01 21:15:40 +01:00
|
|
|
|
2012-10-05 16:44:43 +02:00
|
|
|
|
|
|
|
|
|
2012-11-28 14:52:41 +01:00
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:45 +02:00
|
|
|
|
2014-02-07 12:06:07 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-07 12:06:07 +09:00
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:45 +02:00
|
|
|
|
|
|
|
|
|
2012-11-28 14:52:41 +01:00
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:45 +02:00
|
|
|
|
2012-12-01 21:15:40 +01:00
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-28 14:52:41 +01:00
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:45 +02:00
|
|
|
|
2012-12-01 21:15:40 +01:00
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-21 23:31:51 +02:00
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:36:11 +09:00
|
|
|
|
2012-11-28 14:52:41 +01:00
|
|
|
|
2012-10-05 16:44:45 +02:00
|
|
|
|
2012-11-28 14:52:41 +01:00
|
|
|
|
2012-10-05 16:44:45 +02:00
|
|
|
|
2012-11-28 14:52:41 +01:00
|
|
|
|
2012-10-05 16:44:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-11 01:15:03 +03:00
|
|
|
|
2011-11-25 08:19:45 -02:00
|
|
|
|
2011-01-29 13:02:00 -02:00
|
|
|
|
2012-09-06 17:46:55 +02:00
|
|
|
|
2011-11-28 07:56:39 -02:00
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
|
|
|
|
|
2014-10-09 13:13:41 -03:00
|
|
|
|
perf machine: Protect the machine->threads with a rwlock
In addition to using refcounts for the struct thread lifetime
management, we need to protect access to machine->threads from
concurrent access.
That happens in 'perf top', where a thread processes events, inserting
and deleting entries from that rb_tree while another thread decays
hist_entries, that end up dropping references and ultimately deleting
threads from the rb_tree and releasing its resources when no further
hist_entry (or other data structures, like in 'perf sched') references
it.
So the rule is the same for refcounts + protected trees in the kernel,
get the tree lock, find object, bump the refcount, drop the tree lock,
return, use object, drop the refcount if no more use of it is needed,
keep it if storing it in some other data structure, drop when releasing
that data structure.
I.e. pair "t = machine__find(new)_thread()" with a "thread__put(t)", and
"perf_event__preprocess_sample(&al)" with "addr_location__put(&al)".
The addr_location__put() one is because as we return references to
several data structures, we may end up adding more reference counting
for the other data structures and then we'll drop it at
addr_location__put() time.
Acked-by: David Ahern <dsahern@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-bs9rt4n0jw3hi9f3zxyy3xln@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-04-06 20:43:22 -03:00
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
2016-03-22 18:39:09 -03:00
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-14 20:19:21 +02:00
|
|
|
|
2010-05-14 14:19:35 -03:00
|
|
|
|
perf machine: Protect the machine->threads with a rwlock
In addition to using refcounts for the struct thread lifetime
management, we need to protect access to machine->threads from
concurrent access.
That happens in 'perf top', where a thread processes events, inserting
and deleting entries from that rb_tree while another thread decays
hist_entries, that end up dropping references and ultimately deleting
threads from the rb_tree and releasing its resources when no further
hist_entry (or other data structures, like in 'perf sched') references
it.
So the rule is the same for refcounts + protected trees in the kernel,
get the tree lock, find object, bump the refcount, drop the tree lock,
return, use object, drop the refcount if no more use of it is needed,
keep it if storing it in some other data structure, drop when releasing
that data structure.
I.e. pair "t = machine__find(new)_thread()" with a "thread__put(t)", and
"perf_event__preprocess_sample(&al)" with "addr_location__put(&al)".
The addr_location__put() one is because as we return references to
several data structures, we may end up adding more reference counting
for the other data structures and then we'll drop it at
addr_location__put() time.
Acked-by: David Ahern <dsahern@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-bs9rt4n0jw3hi9f3zxyy3xln@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-04-06 20:43:22 -03:00
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
|
|
|
|
|
2014-04-22 11:44:21 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-09 13:13:41 -03:00
|
|
|
|
2014-04-22 11:44:21 +09:00
|
|
|
|
2014-10-09 13:13:41 -03:00
|
|
|
|
perf machine: Protect the machine->threads with a rwlock
In addition to using refcounts for the struct thread lifetime
management, we need to protect access to machine->threads from
concurrent access.
That happens in 'perf top', where a thread processes events, inserting
and deleting entries from that rb_tree while another thread decays
hist_entries, that end up dropping references and ultimately deleting
threads from the rb_tree and releasing its resources when no further
hist_entry (or other data structures, like in 'perf sched') references
it.
So the rule is the same for refcounts + protected trees in the kernel,
get the tree lock, find object, bump the refcount, drop the tree lock,
return, use object, drop the refcount if no more use of it is needed,
keep it if storing it in some other data structure, drop when releasing
that data structure.
I.e. pair "t = machine__find(new)_thread()" with a "thread__put(t)", and
"perf_event__preprocess_sample(&al)" with "addr_location__put(&al)".
The addr_location__put() one is because as we return references to
several data structures, we may end up adding more reference counting
for the other data structures and then we'll drop it at
addr_location__put() time.
Acked-by: David Ahern <dsahern@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-bs9rt4n0jw3hi9f3zxyy3xln@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-04-06 20:43:22 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
|
|
|
|
|
2012-09-06 17:46:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-18 11:38:18 -05:00
|
|
|
|
2012-09-06 17:46:55 +02:00
|
|
|
|
2012-10-06 15:44:59 -03:00
|
|
|
|
|
|
|
|
|
2012-09-06 17:46:55 +02:00
|
|
|
|
perf tools: Add PERF_RECORD_NAMESPACES to include namespaces related info
Introduce a new option to record PERF_RECORD_NAMESPACES events emitted
by the kernel when fork, clone, setns or unshare are invoked. And update
perf-record documentation with the new option to record namespace
events.
Committer notes:
Combined it with a later patch to allow printing it via 'perf report -D'
and be able to test the feature introduced in this patch. Had to move
here also perf_ns__name(), that was introduced in another later patch.
Also used PRIu64 and PRIx64 to fix the build in some enfironments wrt:
util/event.c:1129:39: error: format '%lx' expects argument of type 'long unsigned int', but argument 6 has type 'long long unsigned int' [-Werror=format=]
ret += fprintf(fp, "%u/%s: %lu/0x%lx%s", idx
^
Testing it:
# perf record --namespaces -a
^C[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 1.083 MB perf.data (423 samples) ]
#
# perf report -D
<SNIP>
3 2028902078892 0x115140 [0xa0]: PERF_RECORD_NAMESPACES 14783/14783 - nr_namespaces: 7
[0/net: 3/0xf0000081, 1/uts: 3/0xeffffffe, 2/ipc: 3/0xefffffff, 3/pid: 3/0xeffffffc,
4/user: 3/0xeffffffd, 5/mnt: 3/0xf0000000, 6/cgroup: 3/0xeffffffb]
0x1151e0 [0x30]: event: 9
.
. ... raw event: size 48 bytes
. 0000: 09 00 00 00 02 00 30 00 c4 71 82 68 0c 7f 00 00 ......0..q.h....
. 0010: a9 39 00 00 a9 39 00 00 94 28 fe 63 d8 01 00 00 .9...9...(.c....
. 0020: 03 00 00 00 00 00 00 00 ce c4 02 00 00 00 00 00 ................
<SNIP>
NAMESPACES events: 1
<SNIP>
#
Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
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/148891930386.25309.18412039920746995488.stgit@hbathini.in.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-03-08 02:11:43 +05:30
|
|
|
|
2014-07-06 14:18:21 +02:00
|
|
|
|
2012-09-06 17:46:55 +02:00
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
|
|
|
|
|
2012-09-06 17:46:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-23 11:26:15 -03:00
|
|
|
|
2012-09-06 17:46:55 +02:00
|
|
|
|
|
|
|
|
|
2014-01-10 10:37:27 -03:00
|
|
|
|
2012-09-06 17:46:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-10 17:29:55 +09:00
|
|
|
|
2012-10-04 21:49:36 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-23 11:26:15 -03:00
|
|
|
|
2014-10-09 13:13:41 -03:00
|
|
|
|
2012-10-04 21:49:36 +09:00
|
|
|
|
2013-10-11 14:15:38 +09:00
|
|
|
|
2012-10-04 21:49:36 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-08 09:45:45 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-25 23:10:20 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-08 09:45:45 +09:00
|
|
|
|
2012-11-25 23:10:20 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:40 +02:00
|
|
|
|
|
|
|
|
|
2012-12-10 17:29:55 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-03 13:54:42 +02:00
|
|
|
|
2012-12-10 17:29:55 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:40 +02:00
|
|
|
|
2012-12-10 17:29:55 +09:00
|
|
|
|
2012-10-05 16:44:40 +02:00
|
|
|
|
2012-12-10 17:29:55 +09:00
|
|
|
|
2012-10-05 16:44:40 +02:00
|
|
|
|
2012-12-10 17:29:55 +09:00
|
|
|
|
2012-10-25 14:42:45 -02:00
|
|
|
|
2012-12-10 17:29:55 +09:00
|
|
|
|
2014-12-19 12:31:40 -03:00
|
|
|
|
2012-10-05 16:44:40 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:42 +02:00
|
|
|
|
|
|
|
|
|
2012-12-13 14:08:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-03 13:54:42 +02:00
|
|
|
|
2012-12-13 14:08:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:42 +02:00
|
|
|
|
2012-12-13 14:08:59 +01:00
|
|
|
|
2012-10-05 16:44:42 +02:00
|
|
|
|
2012-11-25 23:10:20 +01:00
|
|
|
|
2015-01-08 09:45:47 +09:00
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:42 +02:00
|
|
|
|
2012-11-25 23:10:20 +01:00
|
|
|
|
2012-12-13 14:08:59 +01:00
|
|
|
|
2012-11-25 23:10:20 +01:00
|
|
|
|
2015-01-08 09:45:47 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:36:11 +09:00
|
|
|
|
2015-01-08 09:45:47 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-25 23:10:20 +01:00
|
|
|
|
2012-10-05 16:44:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:36:11 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-25 23:10:20 +01:00
|
|
|
|
|
|
|
|
|
2015-01-08 09:45:47 +09:00
|
|
|
|
2012-11-25 23:10:20 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-08 09:45:47 +09:00
|
|
|
|
|
|
|
|
|
2012-11-25 23:10:20 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-08 09:45:48 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:36:11 +09:00
|
|
|
|
2015-01-08 09:45:48 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-27 14:06:29 +09:00
|
|
|
|
2015-01-08 09:45:46 +09:00
|
|
|
|
|
|
|
|
|
2014-12-27 14:06:29 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-08 09:45:46 +09:00
|
|
|
|
|
|
|
|
|
2014-12-27 14:06:29 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-08 09:45:47 +09:00
|
|
|
|
2015-01-08 09:45:46 +09:00
|
|
|
|
2014-12-27 14:06:29 +09:00
|
|
|
|
2015-01-08 09:45:47 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-27 14:06:29 +09:00
|
|
|
|
|
|
|
|
|
2017-02-10 16:36:11 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-27 14:06:29 +09:00
|
|
|
|
2015-01-08 09:45:47 +09:00
|
|
|
|
2015-01-08 09:45:46 +09:00
|
|
|
|
2014-12-27 14:06:29 +09:00
|
|
|
|
2015-01-08 09:45:47 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-27 14:06:29 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-08 09:45:47 +09:00
|
|
|
|
2015-01-08 09:45:46 +09:00
|
|
|
|
2014-12-27 14:06:29 +09:00
|
|
|
|
2015-01-08 09:45:47 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-27 14:06:29 +09:00
|
|
|
|
|
|
|
|
|
2015-01-08 09:45:48 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:36:11 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-08 09:45:48 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-01 22:00:00 +01:00
|
|
|
|
2012-10-05 16:44:40 +02:00
|
|
|
|
|
|
|
|
|
2012-12-01 22:00:00 +01:00
|
|
|
|
2012-10-05 16:44:40 +02:00
|
|
|
|
2015-01-08 09:45:47 +09:00
|
|
|
|
2014-12-27 14:06:30 +09:00
|
|
|
|
2012-10-05 16:44:42 +02:00
|
|
|
|
2017-02-17 17:17:40 +09:00
|
|
|
|
2016-06-14 20:19:18 +02:00
|
|
|
|
2012-10-05 16:44:40 +02:00
|
|
|
|
|
|
|
|
|
2012-12-01 21:56:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-15 16:27:32 +02:00
|
|
|
|
2012-12-01 21:56:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
2012-12-01 22:00:00 +01:00
|
|
|
|
|
|
|
|
|
2012-09-06 17:46:55 +02:00
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
2016-06-23 11:26:15 -03:00
|
|
|
|
2014-10-09 13:13:41 -03:00
|
|
|
|
2012-12-01 22:00:00 +01:00
|
|
|
|
|
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
2012-12-01 22:00:00 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-09 13:13:41 -03:00
|
|
|
|
2012-12-01 22:00:00 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-09 13:13:41 -03:00
|
|
|
|
|
|
|
|
|
2012-12-01 22:00:00 +01:00
|
|
|
|
2014-10-09 13:13:41 -03:00
|
|
|
|
2012-12-01 22:00:00 +01:00
|
|
|
|
|
|
|
|
|
2014-10-09 13:13:41 -03:00
|
|
|
|
2012-12-01 22:00:00 +01:00
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
2017-02-17 17:17:40 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-06 17:46:55 +02:00
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
2012-09-06 17:46:55 +02:00
|
|
|
|
2017-02-17 17:17:40 +09:00
|
|
|
|
2012-12-01 21:56:03 +01:00
|
|
|
|
|
|
|
|
|
2015-08-11 06:30:48 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-09 13:13:41 -03:00
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
|
|
|
|
|
2012-09-06 17:46:55 +02:00
|
|
|
|
2012-12-01 21:57:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-27 16:55:14 -03:00
|
|
|
|
2012-12-01 21:57:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-15 16:27:32 +02:00
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
2013-10-15 16:27:32 +02:00
|
|
|
|
2014-09-24 10:33:37 +09:00
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
|
|
|
|
|
2012-09-06 17:46:55 +02:00
|
|
|
|
2015-03-03 11:58:45 -03:00
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
2013-10-15 16:27:32 +02:00
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
|
|
|
|
|
2012-09-06 17:46:55 +02:00
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-06 17:46:55 +02:00
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
|
|
|
|
|
2016-06-22 10:02:16 -03:00
|
|
|
|
2012-12-01 21:57:04 +01:00
|
|
|
|
2012-09-06 17:46:55 +02:00
|
|
|
|
2009-12-28 22:48:36 -02:00
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-18 16:35:58 -02:00
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
2009-12-18 16:35:58 -02:00
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-13 18:37:33 +10:00
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
2017-02-17 17:17:40 +09:00
|
|
|
|
2012-10-05 16:44:40 +02:00
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:43 +02:00
|
|
|
|
2017-02-11 01:18:56 +09:00
|
|
|
|
2012-10-05 16:44:41 +02:00
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:44 +02:00
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:45 +02:00
|
|
|
|
|
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-24 09:51:57 -06:00
|
|
|
|
|
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
|
|
|
|
|
2009-12-15 20:04:41 -02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
perf diff: Use perf_session__fprintf_hists just like 'perf record'
That means that almost everything you can do with 'perf report'
can be done with 'perf diff', for instance:
$ perf record -f find / > /dev/null
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.062 MB perf.data (~2699
samples) ] $ perf record -f find / > /dev/null
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.062 MB perf.data (~2687
samples) ] perf diff | head -8
9.02% +1.00% find libc-2.10.1.so [.] _IO_vfprintf_internal
2.91% -1.00% find [kernel] [k] __kmalloc
2.85% -1.00% find [kernel] [k] ext4_htree_store_dirent
1.99% -1.00% find [kernel] [k] _atomic_dec_and_lock
2.44% find [kernel] [k] half_md4_transform
$
So if you want to zoom into libc:
$ perf diff --dsos libc-2.10.1.so | head -8
37.34% find [.] _IO_vfprintf_internal
10.34% find [.] __GI_memmove
8.25% +2.00% find [.] _int_malloc
5.07% -1.00% find [.] __GI_mempcpy
7.62% +2.00% find [.] _int_free
$
And if there were multiple commands using libc, it is also
possible to aggregate them all by using --sort symbol:
$ perf diff --dsos libc-2.10.1.so --sort symbol | head -8
37.34% [.] _IO_vfprintf_internal
10.34% [.] __GI_memmove
8.25% +2.00% [.] _int_malloc
5.07% -1.00% [.] __GI_mempcpy
7.62% +2.00% [.] _int_free
$
The displacement column now is off by default, to use it:
perf diff -m --dsos libc-2.10.1.so --sort symbol | head -8
37.34% [.] _IO_vfprintf_internal
10.34% [.] __GI_memmove
8.25% +2.00% [.] _int_malloc
5.07% -1.00% +2 [.] __GI_mempcpy
7.62% +2.00% -1 [.] _int_free
$
Using -t/--field-separator can be used for scripting:
$ perf diff -t, -m --dsos libc-2.10.1.so --sort symbol | head -8
37.34, , ,[.] _IO_vfprintf_internal
10.34, , ,[.] __GI_memmove
8.25,+2.00%, ,[.] _int_malloc
5.07,-1.00%, +2,[.] __GI_mempcpy
7.62,+2.00%, -1,[.] _int_free
6.99,+1.00%, -1,[.] _IO_new_file_xsputn
1.89,-2.00%, +4,[.] __readdir64
$
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1260978567-550-1-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-12-16 13:49:27 -02:00
|
|
|
|
2014-03-04 09:06:42 +09:00
|
|
|
|
|
|
|
|
|
2015-03-20 02:57:52 +00:00
|
|
|
|
perf diff: Use perf_session__fprintf_hists just like 'perf record'
That means that almost everything you can do with 'perf report'
can be done with 'perf diff', for instance:
$ perf record -f find / > /dev/null
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.062 MB perf.data (~2699
samples) ] $ perf record -f find / > /dev/null
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.062 MB perf.data (~2687
samples) ] perf diff | head -8
9.02% +1.00% find libc-2.10.1.so [.] _IO_vfprintf_internal
2.91% -1.00% find [kernel] [k] __kmalloc
2.85% -1.00% find [kernel] [k] ext4_htree_store_dirent
1.99% -1.00% find [kernel] [k] _atomic_dec_and_lock
2.44% find [kernel] [k] half_md4_transform
$
So if you want to zoom into libc:
$ perf diff --dsos libc-2.10.1.so | head -8
37.34% find [.] _IO_vfprintf_internal
10.34% find [.] __GI_memmove
8.25% +2.00% find [.] _int_malloc
5.07% -1.00% find [.] __GI_mempcpy
7.62% +2.00% find [.] _int_free
$
And if there were multiple commands using libc, it is also
possible to aggregate them all by using --sort symbol:
$ perf diff --dsos libc-2.10.1.so --sort symbol | head -8
37.34% [.] _IO_vfprintf_internal
10.34% [.] __GI_memmove
8.25% +2.00% [.] _int_malloc
5.07% -1.00% [.] __GI_mempcpy
7.62% +2.00% [.] _int_free
$
The displacement column now is off by default, to use it:
perf diff -m --dsos libc-2.10.1.so --sort symbol | head -8
37.34% [.] _IO_vfprintf_internal
10.34% [.] __GI_memmove
8.25% +2.00% [.] _int_malloc
5.07% -1.00% +2 [.] __GI_mempcpy
7.62% +2.00% -1 [.] _int_free
$
Using -t/--field-separator can be used for scripting:
$ perf diff -t, -m --dsos libc-2.10.1.so --sort symbol | head -8
37.34, , ,[.] _IO_vfprintf_internal
10.34, , ,[.] __GI_memmove
8.25,+2.00%, ,[.] _int_malloc
5.07,-1.00%, +2,[.] __GI_mempcpy
7.62,+2.00%, -1,[.] _int_free
6.99,+1.00%, -1,[.] _IO_new_file_xsputn
1.89,-2.00%, +4,[.] __readdir64
$
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1260978567-550-1-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-12-16 13:49:27 -02:00
|
|
|
|
|
|
|
|
|
2016-05-19 11:47:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-25 23:10:20 +01:00
|
|
|
|
2014-02-07 12:06:07 +09:00
|
|
|
|
|
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
2012-10-04 21:49:39 +09:00
|
|
|
|
2014-02-07 12:06:07 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
2012-10-05 16:44:41 +02:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-30 13:04:19 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-30 13:32:35 +05:30
|
|
|
|
2013-12-30 13:04:19 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-27 14:06:31 +09:00
|
|
|
|
2013-12-30 13:04:19 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-30 13:04:20 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-30 13:32:35 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-30 13:04:19 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-27 14:06:31 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-30 13:04:19 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-30 13:04:20 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-30 13:32:35 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:41 +02:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:43 +02:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:36:11 +09:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-21 23:31:51 +02:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
2014-12-27 14:06:31 +09:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-27 14:06:31 +09:00
|
|
|
|
|
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
2014-12-27 14:06:31 +09:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-21 23:31:51 +02:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-27 14:06:31 +09:00
|
|
|
|
|
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
2014-12-27 14:06:31 +09:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-21 23:31:51 +02:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-21 23:31:51 +02:00
|
|
|
|
2012-10-05 16:44:41 +02:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-01 22:00:00 +01:00
|
|
|
|
|
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
2012-11-25 23:10:20 +01:00
|
|
|
|
2012-12-01 22:00:00 +01:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-01 22:00:00 +01:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-10 16:43:52 +09:00
|
|
|
|
2016-08-07 17:28:27 +02:00
|
|
|
|
2016-08-07 17:28:30 +02:00
|
|
|
|
|
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-10 16:43:52 +09:00
|
|
|
|
2016-06-14 20:19:20 +02:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-01 22:00:00 +01:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-01 22:00:00 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-01 21:57:04 +01:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
2012-12-01 21:57:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-27 14:06:29 +09:00
|
|
|
|
|
|
|
|
|
2012-12-01 21:57:04 +01:00
|
|
|
|
|
|
|
|
|
2013-12-30 13:04:19 +05:30
|
|
|
|
|
|
|
|
|
2012-12-01 21:57:04 +01:00
|
|
|
|
2014-12-27 14:06:29 +09:00
|
|
|
|
2013-12-30 13:04:19 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-27 14:06:29 +09:00
|
|
|
|
2013-12-30 13:04:19 +05:30
|
|
|
|
2013-12-30 13:04:20 +05:30
|
|
|
|
|
|
|
|
|
2014-12-27 14:06:29 +09:00
|
|
|
|
2013-12-30 13:04:20 +05:30
|
|
|
|
2013-12-30 13:32:35 +05:30
|
|
|
|
|
|
|
|
|
2014-12-27 14:06:29 +09:00
|
|
|
|
2013-12-30 13:32:35 +05:30
|
|
|
|
2017-02-10 16:36:11 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-30 13:04:19 +05:30
|
|
|
|
2014-12-27 14:06:29 +09:00
|
|
|
|
2013-12-30 13:04:19 +05:30
|
|
|
|
|
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
2012-12-01 22:00:00 +01:00
|
|
|
|
2012-12-01 21:57:04 +01:00
|
|
|
|
2014-12-27 14:06:29 +09:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
|
|
|
|
|
2015-01-08 09:45:48 +09:00
|
|
|
|
2013-02-03 20:08:34 +01:00
|
|
|
|
2012-12-01 21:57:04 +01:00
|
|
|
|
2015-01-08 09:45:48 +09:00
|
|
|
|
2012-12-01 21:57:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-04 21:49:39 +09:00
|
|
|
|
2012-12-01 21:57:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:45 +02:00
|
|
|
|
2012-12-01 21:57:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-05 16:44:44 +02:00
|
|
|
|
2015-01-08 09:45:48 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:36:11 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-08 09:45:48 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-18 14:14:57 +09:00
|
|
|
|
2015-01-08 09:45:48 +09:00
|
|
|
|
2012-10-04 21:49:39 +09:00
|
|
|
|
|
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-01 22:00:00 +01:00
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
2012-12-01 22:00:00 +01:00
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
2012-12-01 22:00:00 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-06 17:25:52 -05:00
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
|
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
|
|
|
|
|
2012-11-25 23:10:20 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-15 16:27:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:36:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:36:13 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:36:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-27 11:47:20 -03:00
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
2014-10-22 15:02:41 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 16:36:12 +09:00
|
|
|
|
|
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
|
|
|
|
|
2017-02-17 17:17:40 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-12 15:40:45 +09:00
|
|
|
|
2009-12-15 20:04:40 -02:00
|
|
|
|
|
|
|
|
|
2013-03-25 00:02:01 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-08 09:45:48 +09:00
|
|
|
|
|
|
|
|
|
2012-10-04 21:49:39 +09:00
|
|
|
|
2014-03-18 11:31:39 +09:00
|
|
|
|
|
|
|
|
|
2015-12-23 02:07:01 +09:00
|
|
|
|
2013-02-06 14:57:16 +09:00
|
|
|
|
|
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
perf diff: Use perf_session__fprintf_hists just like 'perf record'
That means that almost everything you can do with 'perf report'
can be done with 'perf diff', for instance:
$ perf record -f find / > /dev/null
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.062 MB perf.data (~2699
samples) ] $ perf record -f find / > /dev/null
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.062 MB perf.data (~2687
samples) ] perf diff | head -8
9.02% +1.00% find libc-2.10.1.so [.] _IO_vfprintf_internal
2.91% -1.00% find [kernel] [k] __kmalloc
2.85% -1.00% find [kernel] [k] ext4_htree_store_dirent
1.99% -1.00% find [kernel] [k] _atomic_dec_and_lock
2.44% find [kernel] [k] half_md4_transform
$
So if you want to zoom into libc:
$ perf diff --dsos libc-2.10.1.so | head -8
37.34% find [.] _IO_vfprintf_internal
10.34% find [.] __GI_memmove
8.25% +2.00% find [.] _int_malloc
5.07% -1.00% find [.] __GI_mempcpy
7.62% +2.00% find [.] _int_free
$
And if there were multiple commands using libc, it is also
possible to aggregate them all by using --sort symbol:
$ perf diff --dsos libc-2.10.1.so --sort symbol | head -8
37.34% [.] _IO_vfprintf_internal
10.34% [.] __GI_memmove
8.25% +2.00% [.] _int_malloc
5.07% -1.00% [.] __GI_mempcpy
7.62% +2.00% [.] _int_free
$
The displacement column now is off by default, to use it:
perf diff -m --dsos libc-2.10.1.so --sort symbol | head -8
37.34% [.] _IO_vfprintf_internal
10.34% [.] __GI_memmove
8.25% +2.00% [.] _int_malloc
5.07% -1.00% +2 [.] __GI_mempcpy
7.62% +2.00% -1 [.] _int_free
$
Using -t/--field-separator can be used for scripting:
$ perf diff -t, -m --dsos libc-2.10.1.so --sort symbol | head -8
37.34, , ,[.] _IO_vfprintf_internal
10.34, , ,[.] __GI_memmove
8.25,+2.00%, ,[.] _int_malloc
5.07,-1.00%, +2,[.] __GI_mempcpy
7.62,+2.00%, -1,[.] _int_free
6.99,+1.00%, -1,[.] _IO_new_file_xsputn
1.89,-2.00%, +4,[.] __readdir64
$
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1260978567-550-1-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-12-16 13:49:27 -02:00
|
|
|
|
2013-04-03 21:26:19 +09:00
|
|
|
|
perf diff: Use perf_session__fprintf_hists just like 'perf record'
That means that almost everything you can do with 'perf report'
can be done with 'perf diff', for instance:
$ perf record -f find / > /dev/null
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.062 MB perf.data (~2699
samples) ] $ perf record -f find / > /dev/null
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.062 MB perf.data (~2687
samples) ] perf diff | head -8
9.02% +1.00% find libc-2.10.1.so [.] _IO_vfprintf_internal
2.91% -1.00% find [kernel] [k] __kmalloc
2.85% -1.00% find [kernel] [k] ext4_htree_store_dirent
1.99% -1.00% find [kernel] [k] _atomic_dec_and_lock
2.44% find [kernel] [k] half_md4_transform
$
So if you want to zoom into libc:
$ perf diff --dsos libc-2.10.1.so | head -8
37.34% find [.] _IO_vfprintf_internal
10.34% find [.] __GI_memmove
8.25% +2.00% find [.] _int_malloc
5.07% -1.00% find [.] __GI_mempcpy
7.62% +2.00% find [.] _int_free
$
And if there were multiple commands using libc, it is also
possible to aggregate them all by using --sort symbol:
$ perf diff --dsos libc-2.10.1.so --sort symbol | head -8
37.34% [.] _IO_vfprintf_internal
10.34% [.] __GI_memmove
8.25% +2.00% [.] _int_malloc
5.07% -1.00% [.] __GI_mempcpy
7.62% +2.00% [.] _int_free
$
The displacement column now is off by default, to use it:
perf diff -m --dsos libc-2.10.1.so --sort symbol | head -8
37.34% [.] _IO_vfprintf_internal
10.34% [.] __GI_memmove
8.25% +2.00% [.] _int_malloc
5.07% -1.00% +2 [.] __GI_mempcpy
7.62% +2.00% -1 [.] _int_free
$
Using -t/--field-separator can be used for scripting:
$ perf diff -t, -m --dsos libc-2.10.1.so --sort symbol | head -8
37.34, , ,[.] _IO_vfprintf_internal
10.34, , ,[.] __GI_memmove
8.25,+2.00%, ,[.] _int_malloc
5.07,-1.00%, +2,[.] __GI_mempcpy
7.62,+2.00%, -1,[.] _int_free
6.99,+1.00%, -1,[.] _IO_new_file_xsputn
1.89,-2.00%, +4,[.] __readdir64
$
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1260978567-550-1-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-12-16 13:49:27 -02:00
|
|
|
|
2009-12-14 20:09:31 -02:00
|
|
|
|
|
|
|
|
|