diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-06 11:02:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-06 11:02:58 -0500 |
commit | 35b740e4662ef386f0c60e1b60aaf5b44db9914c (patch) | |
tree | 502a8f9499bc1b4cb3300d666dab2d01a1921224 /tools/perf/util/annotate.c | |
parent | 423d091dfe58d3109d84c408810a7cfa82f6f184 (diff) | |
parent | 9e183426bfb52bb44bf3c443d6587e4d02478603 (diff) |
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (106 commits)
perf kvm: Fix copy & paste error in description
perf script: Kill script_spec__delete
perf top: Fix a memory leak
perf stat: Introduce get_ratio_color() helper
perf session: Remove impossible condition check
perf tools: Fix feature-bits rework fallout, remove unused variable
perf script: Add generic perl handler to process events
perf tools: Use for_each_set_bit() to iterate over feature flags
perf tools: Unify handling of features when writing feature section
perf report: Accept fifos as input file
perf tools: Moving code in some files
perf tools: Fix out-of-bound access to struct perf_session
perf tools: Continue processing header on unknown features
perf tools: Improve macros for struct feature_ops
perf: builtin-record: Document and check that mmap_pages must be a power of two.
perf: builtin-record: Provide advice if mmap'ing fails with EPERM.
perf tools: Fix truncated annotation
perf script: look up thread using tid instead of pid
perf tools: Look up thread names for system wide profiling
perf tools: Fix comm for processes with named threads
...
Diffstat (limited to 'tools/perf/util/annotate.c')
-rw-r--r-- | tools/perf/util/annotate.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 119e996035c..011ed267660 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c | |||
@@ -25,17 +25,17 @@ int symbol__annotate_init(struct map *map __used, struct symbol *sym) | |||
25 | return 0; | 25 | return 0; |
26 | } | 26 | } |
27 | 27 | ||
28 | int symbol__alloc_hist(struct symbol *sym, int nevents) | 28 | int symbol__alloc_hist(struct symbol *sym) |
29 | { | 29 | { |
30 | struct annotation *notes = symbol__annotation(sym); | 30 | struct annotation *notes = symbol__annotation(sym); |
31 | size_t sizeof_sym_hist = (sizeof(struct sym_hist) + | 31 | size_t sizeof_sym_hist = (sizeof(struct sym_hist) + |
32 | (sym->end - sym->start) * sizeof(u64)); | 32 | (sym->end - sym->start) * sizeof(u64)); |
33 | 33 | ||
34 | notes->src = zalloc(sizeof(*notes->src) + nevents * sizeof_sym_hist); | 34 | notes->src = zalloc(sizeof(*notes->src) + symbol_conf.nr_events * sizeof_sym_hist); |
35 | if (notes->src == NULL) | 35 | if (notes->src == NULL) |
36 | return -1; | 36 | return -1; |
37 | notes->src->sizeof_sym_hist = sizeof_sym_hist; | 37 | notes->src->sizeof_sym_hist = sizeof_sym_hist; |
38 | notes->src->nr_histograms = nevents; | 38 | notes->src->nr_histograms = symbol_conf.nr_events; |
39 | INIT_LIST_HEAD(¬es->src->source); | 39 | INIT_LIST_HEAD(¬es->src->source); |
40 | return 0; | 40 | return 0; |
41 | } | 41 | } |
@@ -334,7 +334,7 @@ fallback: | |||
334 | disassembler_style ? "-M " : "", | 334 | disassembler_style ? "-M " : "", |
335 | disassembler_style ? disassembler_style : "", | 335 | disassembler_style ? disassembler_style : "", |
336 | map__rip_2objdump(map, sym->start), | 336 | map__rip_2objdump(map, sym->start), |
337 | map__rip_2objdump(map, sym->end), | 337 | map__rip_2objdump(map, sym->end+1), |
338 | symbol_conf.annotate_asm_raw ? "" : "--no-show-raw", | 338 | symbol_conf.annotate_asm_raw ? "" : "--no-show-raw", |
339 | symbol_conf.annotate_src ? "-S" : "", | 339 | symbol_conf.annotate_src ? "-S" : "", |
340 | symfs_filename, filename); | 340 | symfs_filename, filename); |