diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2013-03-05 00:53:22 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-03-15 12:06:04 -0400 |
commit | 3aec150af3de6c00570bdacf45bf5a999ab9cf1d (patch) | |
tree | 099309e8a56a39fca45d7e466e49d198f7d7fbbe /tools/perf/util | |
parent | db8fd07a541fc2d5e8076f0151286e19591465b3 (diff) |
perf annotate: Add a comment on the symbol__parse_objdump_line()
The symbol__parse_objdump_line() parses result of the objdump run but
it's hard to follow if one doesn't know the output format of the
objdump. Add a head comment on the function to help her.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1362462812-30885-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/annotate.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 7eac5f0895ee..fa347b169e27 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c | |||
@@ -689,6 +689,26 @@ static int disasm_line__print(struct disasm_line *dl, struct symbol *sym, u64 st | |||
689 | return 0; | 689 | return 0; |
690 | } | 690 | } |
691 | 691 | ||
692 | /* | ||
693 | * symbol__parse_objdump_line() parses objdump output (with -d --no-show-raw) | ||
694 | * which looks like following | ||
695 | * | ||
696 | * 0000000000415500 <_init>: | ||
697 | * 415500: sub $0x8,%rsp | ||
698 | * 415504: mov 0x2f5ad5(%rip),%rax # 70afe0 <_DYNAMIC+0x2f8> | ||
699 | * 41550b: test %rax,%rax | ||
700 | * 41550e: je 415515 <_init+0x15> | ||
701 | * 415510: callq 416e70 <__gmon_start__@plt> | ||
702 | * 415515: add $0x8,%rsp | ||
703 | * 415519: retq | ||
704 | * | ||
705 | * it will be parsed and saved into struct disasm_line as | ||
706 | * <offset> <name> <ops.raw> | ||
707 | * | ||
708 | * The offset will be a relative offset from the start of the symbol and -1 | ||
709 | * means that it's not a disassembly line so should be treated differently. | ||
710 | * The ops.raw part will be parsed further according to type of the instruction. | ||
711 | */ | ||
692 | static int symbol__parse_objdump_line(struct symbol *sym, struct map *map, | 712 | static int symbol__parse_objdump_line(struct symbol *sym, struct map *map, |
693 | FILE *file, size_t privsize) | 713 | FILE *file, size_t privsize) |
694 | { | 714 | { |