diff options
| author | Arnaldo Carvalho de Melo <[email protected]> | 2011-11-12 00:17:32 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2011-11-28 12:37:11 +0000 |
| commit | d04b35f8085f0d4c5c874515b8f65e7664357148 (patch) | |
| tree | 8115d7e30c274756097ce27742338438a14fabd5 /tools/perf/util/annotate.c | |
| parent | perf ui progress: Fix divide by zero (diff) | |
| download | kernel-d04b35f8085f0d4c5c874515b8f65e7664357148.tar.gz kernel-d04b35f8085f0d4c5c874515b8f65e7664357148.zip | |
perf symbols: Add nr_events to symbol_conf
Since symbol__alloc_hists need it, to avoid passing it around in many
functions have it in the symbol_conf struct.
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
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) return 0; } -int symbol__alloc_hist(struct symbol *sym, int nevents) +int symbol__alloc_hist(struct symbol *sym) { struct annotation *notes = symbol__annotation(sym); size_t sizeof_sym_hist = (sizeof(struct sym_hist) + (sym->end - sym->start) * sizeof(u64)); - notes->src = zalloc(sizeof(*notes->src) + nevents * sizeof_sym_hist); + notes->src = zalloc(sizeof(*notes->src) + symbol_conf.nr_events * sizeof_sym_hist); if (notes->src == NULL) return -1; notes->src->sizeof_sym_hist = sizeof_sym_hist; - notes->src->nr_histograms = nevents; + notes->src->nr_histograms = symbol_conf.nr_events; INIT_LIST_HEAD(¬es->src->source); return 0; } |
