Ingo Molnar
0b73da3f40
perf_counter tools: Add 'perf annotate' feature
Add new perf sub-command to display annotated source code:
$ perf annotate decode_tree_entry
------------------------------------------------
Percent | Source code & Disassembly of /home/mingo/git/git
------------------------------------------------
:
: /home/mingo/git/git: file format elf64-x86-64
:
:
: Disassembly of section .text:
:
: 00000000004a0da0 <decode_tree_entry>:
: *modep = mode;
: return str;
: }
:
: static void decode_tree_entry(struct tree_desc *desc, const char *buf, unsigned long size)
: {
3.82 : 4a0da0: 41 54 push %r12
: const char *path;
: unsigned int mode, len;
:
: if (size < 24 || buf[size - 21])
0.17 : 4a0da2: 48 83 fa 17 cmp $0x17,%rdx
: *modep = mode;
: return str;
: }
:
: static void decode_tree_entry(struct tree_desc *desc, const char *buf, unsigned long size)
: {
0.00 : 4a0da6: 49 89 fc mov %rdi,%r12
0.00 : 4a0da9: 55 push %rbp
3.37 : 4a0daa: 53 push %rbx
: const char *path;
: unsigned int mode, len;
:
: if (size < 24 || buf[size - 21])
0.08 : 4a0dab: 76 73 jbe 4a0e20 <decode_tree_entry+0x80>
0.00 : 4a0dad: 80 7c 16 eb 00 cmpb $0x0,-0x15(%rsi,%rdx,1)
3.48 : 4a0db2: 75 6c jne 4a0e20 <decode_tree_entry+0x80>
: static const char *get_mode(const char *str, unsigned int *modep)
: {
: unsigned char c;
: unsigned int mode = 0;
:
: if (*str == ' ')
1.94 : 4a0db4: 0f b6 06 movzbl (%rsi),%eax
0.39 : 4a0db7: 3c 20 cmp $0x20,%al
0.00 : 4a0db9: 74 65 je 4a0e20 <decode_tree_entry+0x80>
: return NULL;
:
: while ((c = *str++) != ' ') {
0.06 : 4a0dbb: 89 c2 mov %eax,%edx
: if (c < '0' || c > '7')
1.99 : 4a0dbd: 31 ed xor %ebp,%ebp
: unsigned int mode = 0;
:
: if (*str == ' ')
: return NULL;
:
: while ((c = *str++) != ' ') {
1.74 : 4a0dbf: 48 8d 5e 01 lea 0x1(%rsi),%rbx
: if (c < '0' || c > '7')
0.00 : 4a0dc3: 8d 42 d0 lea -0x30(%rdx),%eax
0.17 : 4a0dc6: 3c 07 cmp $0x7,%al
0.00 : 4a0dc8: 76 0d jbe 4a0dd7 <decode_tree_entry+0x37>
0.00 : 4a0dca: eb 54 jmp 4a0e20 <decode_tree_entry+0x80>
0.00 : 4a0dcc: 0f 1f 40 00 nopl 0x0(%rax)
16.57 : 4a0dd0: 8d 42 d0 lea -0x30(%rdx),%eax
0.14 : 4a0dd3: 3c 07 cmp $0x7,%al
0.00 : 4a0dd5: 77 49 ja 4a0e20 <decode_tree_entry+0x80>
: return NULL;
: mode = (mode << 3) + (c - '0');
3.12 : 4a0dd7: 0f b6 c2 movzbl %dl,%eax
: unsigned int mode = 0;
:
: if (*str == ' ')
: return NULL;
:
: while ((c = *str++) != ' ') {
0.00 : 4a0dda: 0f b6 13 movzbl (%rbx),%edx
16.74 : 4a0ddd: 48 83 c3 01 add $0x1,%rbx
: if (c < '0' || c > '7')
: return NULL;
: mode = (mode << 3) + (c - '0');
The first column is the percentage of samples that arrived on that
particular line - relative to the total cost of the function.
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-06-06 18:58:31 +02:00
..
2009-04-28 14:30:35 +03:00
2009-01-15 16:39:37 -08:00
2008-11-07 21:45:29 -05:00
2008-02-08 09:22:31 -08:00
2009-03-26 22:44:43 +00:00
2008-10-30 11:38:45 -07:00
2009-01-07 23:14:38 +08:00
2009-04-15 08:28:11 +02:00
2009-04-07 08:12:38 +02:00
2008-10-10 08:22:44 +02:00
2009-04-13 15:04:33 -07:00
2009-02-12 16:47:01 -08:00
2007-07-19 10:04:47 -07:00
2009-02-24 22:47:31 -05:00
2008-02-14 00:16:13 -05:00
2008-10-16 11:21:30 -07:00
2009-01-05 18:10:19 -07:00
2009-01-08 16:32:13 -07:00
2008-04-25 13:27:03 +01:00
2009-05-15 07:56:25 -05:00
2009-04-16 16:17:10 -07:00
2009-03-30 12:43:31 -03:00
2008-04-21 22:19:05 +00:00
2007-07-16 09:05:45 -07:00
2009-04-07 08:31:09 -07:00
2009-05-21 13:14:32 -07:00
2008-04-21 22:23:30 +00:00
2008-02-03 15:54:28 +02:00
2009-04-07 08:31:03 -07:00
2009-03-30 21:46:43 +02:00
2007-05-09 08:58:19 +02:00
2009-03-30 15:21:59 +02:00
2009-01-06 17:21:00 +01:00
2009-04-08 13:52:01 -07:00
2009-05-23 09:53:26 -07:00
2009-03-30 12:43:15 -03:00
2009-04-27 05:37:39 -07:00
2009-01-28 15:55:48 -08:00
2009-04-19 11:12:12 +02:00
2008-10-22 15:01:22 +11:00
2007-12-17 10:33:19 -08:00
2009-04-18 01:19:54 -04:00
2009-04-19 23:14:02 +09:30
2008-01-11 18:22:30 -06:00
2007-10-17 08:43:05 -07:00
2009-01-14 19:19:03 +01:00
2009-04-01 08:59:18 -07:00
2008-02-08 09:22:30 -08:00
2008-08-16 10:55:33 +01:00
2007-11-29 09:24:53 -08:00
2007-05-09 08:57:56 +02:00
2009-05-17 21:19:31 -07:00
2009-03-20 11:35:04 -07:00
2008-10-30 11:38:45 -07:00
2009-06-06 18:58:31 +02:00
2008-10-16 11:21:29 -07:00
2009-04-22 13:02:09 +10:00
2008-04-19 19:19:55 +02:00
2009-04-02 01:33:51 -07:00
2009-01-06 15:59:28 -08:00
2009-03-30 15:22:02 +02:00
2009-04-03 09:23:11 -05:00
2008-11-14 17:28:53 +00:00
2008-12-22 18:44:05 +09:00
2009-05-27 16:51:27 +02:00
2008-08-29 02:15:25 -07:00
2009-04-21 13:41:50 -07:00
2009-05-15 11:32:24 +02:00
2008-07-22 19:24:29 +10:00
2008-04-29 02:49:47 -04:00
2008-07-31 18:45:41 +02:00
2009-04-09 07:28:10 +02:00
2009-03-24 16:20:36 -07:00
2009-04-06 21:44:24 -03:00
2009-04-13 15:04:32 -07:00
2009-01-08 08:31:14 -08:00
2008-10-30 11:38:45 -07:00
2009-01-07 10:00:18 -08:00
2009-04-03 15:24:35 -07:00
2008-01-24 20:40:04 -08:00
2009-03-30 15:22:02 +02:00
2008-02-23 17:52:36 -08:00
2008-12-03 16:09:53 -07:00
2007-05-09 08:58:19 +02:00
2008-04-30 08:29:52 -07:00
2008-07-25 10:53:30 -07:00
2008-02-06 10:41:09 -08:00
2008-11-12 17:17:18 -08:00
2007-10-19 11:53:34 -07:00
2009-01-29 18:19:30 -08:00
2009-01-29 18:19:29 -08:00
2008-12-18 12:08:05 +01:00
2007-03-01 14:53:39 -08:00
2009-01-11 19:12:49 +01:00
2008-11-14 10:39:26 +11:00
2008-02-03 15:27:38 +02:00
2008-04-18 17:55:33 +02:00
2009-01-06 11:28:07 +01:00
2009-04-07 08:44:05 -07:00
2009-03-17 12:56:47 +01:00
2008-07-22 10:39:36 +10:00
2009-04-07 08:31:12 -07:00
2009-01-05 18:10:19 -07:00
2009-03-26 15:45:43 -07:00
2009-03-24 16:38:27 -07:00
2008-07-26 12:00:06 -07:00
2008-11-06 15:41:19 -08:00
2009-04-13 17:02:13 +02:00
2009-04-02 19:04:51 -07:00
2008-04-21 15:10:15 -07:00
2008-10-16 11:21:32 -07:00
2008-03-24 19:22:19 -07:00
2008-11-12 17:17:18 -08:00
2008-02-03 14:54:41 +02:00
2008-07-26 12:00:06 -07:00
2008-11-03 18:21:44 +01:00
2009-01-29 18:19:29 -08:00
2008-07-26 12:00:06 -07:00
2007-10-18 14:37:32 -07:00
2008-06-05 15:18:30 +02:00
2007-10-20 02:37:21 +02:00
2009-05-02 15:36:10 -07:00
2008-06-06 11:29:10 -07:00
2009-05-22 13:10:54 -07:00
2008-04-29 08:06:16 -07:00
2008-07-26 12:00:06 -07:00
2009-01-06 10:44:32 -08:00
2009-04-07 08:31:08 -07:00
2008-02-06 10:41:09 -08:00
2007-05-21 09:58:40 -07:00
2008-07-26 12:00:06 -07:00
2008-12-01 13:51:26 +01:00
2009-04-26 18:21:24 +02:00
2008-10-20 15:43:10 +02:00
2009-04-27 12:00:27 -07:00
2009-04-27 12:00:27 -07:00
2009-01-06 15:59:28 -08:00
2008-08-12 16:07:30 -07:00
2008-10-30 11:38:46 -07:00
2008-11-28 16:47:41 +01:00
2008-03-17 09:03:05 +01:00
2009-03-31 15:18:37 +11:00
2008-05-14 10:05:18 -07:00
2009-01-06 15:59:00 -08:00
2007-10-20 00:15:26 +02:00
2008-10-30 19:07:04 +01:00
2009-01-08 12:04:47 +00:00
2008-04-29 08:05:59 -07:00
2007-11-26 19:39:01 -08:00
2008-01-24 20:40:04 -08:00
2008-11-12 17:17:17 -08:00
2007-02-11 10:51:35 -08:00
2008-10-31 19:00:09 -04:00
2008-02-06 10:41:14 -08:00
2008-10-16 11:21:32 -07:00
2008-08-27 08:54:08 +10:00
2009-04-03 16:42:35 +01:00
2007-10-17 08:43:06 -07:00
2009-03-28 15:01:37 +11:00
2009-04-11 08:18:11 +02:00
2008-04-11 13:21:14 -06:00
2007-07-30 14:25:12 -07:00
2008-10-29 15:03:49 -07:00
2008-10-16 11:21:32 -07:00
2008-10-16 11:21:32 -07:00
2008-10-16 12:18:16 -07:00
2009-05-08 19:22:20 -07:00
2009-04-02 00:49:02 +02:00
2009-04-14 09:14:58 +10:00
2008-07-25 10:53:27 -07:00
2006-12-20 01:46:58 -05:00
2008-07-26 12:00:06 -07:00