diff options
Diffstat (limited to 'tools/perf/util/annotate.c')
-rw-r--r-- | tools/perf/util/annotate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 119e996035c8..376e643f7066 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 | } |