diff options
Diffstat (limited to 'tools/perf/util/event.c')
-rw-r--r-- | tools/perf/util/event.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 6ceed46acd5a..c23b77f8f854 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -771,6 +771,12 @@ int machine__resolve(struct machine *machine, struct addr_location *al, al->parallelism = max(1, min(machine->parallelism, machine__nr_cpus_avail(machine))); if (test_bit(al->parallelism, symbol_conf.parallelism_filter)) al->filtered |= (1 << HIST_FILTER__PARALLELISM); + /* + * Multiply it by some const to avoid precision loss or dealing + * with floats. The multiplier does not matter otherwise since + * we only print it as percents. + */ + al->latency = sample->period * 1000 / al->parallelism; if (al->map) { if (symbol_conf.dso_list && |