diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-04-05 01:40:16 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-04-05 01:40:16 -0400 |
commit | 11e445e9b499dfd96d7cbc55b2f22057fcf2804d (patch) | |
tree | 734bd484f042ad0baecf85dee15c2c69c9fc6026 /tools/perf/util/annotate.c | |
parent | fcc309e618c9e9ac4ede010d87522b0689549658 (diff) | |
parent | 99094a5e941fe88d95cbd594e6a41bee24003ecb (diff) |
Merge tag 'perf-core-for-mingo-4.12-20170404' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
User visible changes:
- Add missing number of samples in 'perf annotate --stdio -l --show-total-period'
(Taeung Song)
Vendor events updates:
- Add uncore_arb Intel vendor events in JSON format (Andi Kleen)
- Add uncore vendor events for Intel's Sandy Bridge, Ivy Bridge,
Haswell, Broadwell and Skylake architectures (Andi Kleen)
- Add missing UNC_M_DCLOCKTICKS Intel Broadwell DE uncore vendor event (Andi Kleen)
Infrastructure changes:
- Remove some more die() calls, avoiding sudden death in library code
(Arnaldo Carvalho de Melo)
- Add argument support for SDT events in powerpc (Ravi Bangoria)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/annotate.c')
-rw-r--r-- | tools/perf/util/annotate.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 11af5f0d56cc..a37032bd137d 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c | |||
@@ -1665,7 +1665,7 @@ static int symbol__get_source_line(struct symbol *sym, struct map *map, | |||
1665 | start = map__rip_2objdump(map, sym->start); | 1665 | start = map__rip_2objdump(map, sym->start); |
1666 | 1666 | ||
1667 | for (i = 0; i < len; i++) { | 1667 | for (i = 0; i < len; i++) { |
1668 | u64 offset; | 1668 | u64 offset, nr_samples; |
1669 | double percent_max = 0.0; | 1669 | double percent_max = 0.0; |
1670 | 1670 | ||
1671 | src_line->nr_pcnt = nr_pcnt; | 1671 | src_line->nr_pcnt = nr_pcnt; |
@@ -1674,12 +1674,14 @@ static int symbol__get_source_line(struct symbol *sym, struct map *map, | |||
1674 | double percent = 0.0; | 1674 | double percent = 0.0; |
1675 | 1675 | ||
1676 | h = annotation__histogram(notes, evidx + k); | 1676 | h = annotation__histogram(notes, evidx + k); |
1677 | nr_samples = h->addr[i]; | ||
1677 | if (h->sum) | 1678 | if (h->sum) |
1678 | percent = 100.0 * h->addr[i] / h->sum; | 1679 | percent = 100.0 * nr_samples / h->sum; |
1679 | 1680 | ||
1680 | if (percent > percent_max) | 1681 | if (percent > percent_max) |
1681 | percent_max = percent; | 1682 | percent_max = percent; |
1682 | src_line->samples[k].percent = percent; | 1683 | src_line->samples[k].percent = percent; |
1684 | src_line->samples[k].nr = nr_samples; | ||
1683 | } | 1685 | } |
1684 | 1686 | ||
1685 | if (percent_max <= 0.5) | 1687 | if (percent_max <= 0.5) |