diff options
| author | Taeung Song <[email protected]> | 2017-07-19 21:36:51 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2017-07-21 11:23:49 +0000 |
| commit | 8158683da3d30e0346275702a8e08f2b22726c45 (patch) | |
| tree | ab218d3516ffc6a52bbbdbd4b777b4874a3a65ed /tools/perf/ui/gtk/annotate.c | |
| parent | perf annotate: Introduce struct sym_hist_entry (diff) | |
| download | kernel-8158683da3d30e0346275702a8e08f2b22726c45.tar.gz kernel-8158683da3d30e0346275702a8e08f2b22726c45.zip | |
perf annotate: Rename 'sum' to 'nr_samples' in struct sym_hist
To make it more clear that it is the sum of all the nr_samples fields in the
addr[] entries, i.e.:
sym_hist->nr_samples = sum(sym_hist->addr[0 .. symbol__size(sym)]->nr_samples)
Committer notes:
Taeung had renamed it to total_samples, but using nr_samples, as in the
added explanation above, looks clearer and establishes the direct
connection, making clear it is about the _number_ of samples.
Signed-off-by: Taeung Song <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/ui/gtk/annotate.c')
| -rw-r--r-- | tools/perf/ui/gtk/annotate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/ui/gtk/annotate.c b/tools/perf/ui/gtk/annotate.c index d736fd57ab9b..02176193f427 100644 --- a/tools/perf/ui/gtk/annotate.c +++ b/tools/perf/ui/gtk/annotate.c @@ -37,7 +37,7 @@ static int perf_gtk__get_percent(char *buf, size_t size, struct symbol *sym, if (!symbol_conf.event_group && !symhist->addr[dl->offset].nr_samples) return 0; - percent = 100.0 * symhist->addr[dl->offset].nr_samples / symhist->sum; + percent = 100.0 * symhist->addr[dl->offset].nr_samples / symhist->nr_samples; markup = perf_gtk__get_percent_color(percent); if (markup) |
