diff options
| author | Ingo Molnar <mingo@elte.hu> | 2011-02-17 14:46:35 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2011-02-17 14:46:35 +0100 |
| commit | bee96907383e71d3996ba2bd0682fefaa492d942 (patch) | |
| tree | 3233fb93a559eabd05581373ce41d342e956d79e /tools/perf/util/annotate.c | |
| parent | 5beda5f6e4e4523e8dbe596bf163a01b45776808 (diff) | |
| parent | 8737ebdea02315eaffaebb3b73d55f2f726a4fe0 (diff) | |
Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/core
Diffstat (limited to 'tools/perf/util/annotate.c')
| -rw-r--r-- | tools/perf/util/annotate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 02976b895f2..70ec422ddb6 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -541,11 +541,12 @@ void symbol__annotate_decay_histogram(struct symbol *sym, int evidx) struct annotation *notes = symbol__annotation(sym); struct sym_hist *h = annotation__histogram(notes, evidx); struct objdump_line *pos; + int len = sym->end - sym->start; h->sum = 0; list_for_each_entry(pos, ¬es->src->source, node) { - if (pos->offset != -1) { + if (pos->offset != -1 && pos->offset < len) { h->addr[pos->offset] = h->addr[pos->offset] * 7 / 8; h->sum += h->addr[pos->offset]; } |
