mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
perf annotate: Add PERCENT_PERIOD_LOCAL percent value
Adding and computing local period percent value for annotation line. Storing it in struct annotation_data percent array under new PERCENT_PERIOD_LOCAL index. At the moment it's not displayed, it's coming in following patches. Signed-off-by: Jiri Olsa <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: David Ahern <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
75a8c1ff28
commit
ab371169fb
2 changed files with 3 additions and 0 deletions
|
|
@ -1781,6 +1781,8 @@ static void calc_percent(struct sym_hist *sym_hist,
|
|||
if (hists->stats.nr_non_filtered_samples)
|
||||
data->percent[PERCENT_HITS_GLOBAL] = 100.0 * hits / hists->stats.nr_non_filtered_samples;
|
||||
|
||||
if (sym_hist->period)
|
||||
data->percent[PERCENT_PERIOD_LOCAL] = 100.0 * period / sym_hist->period;
|
||||
}
|
||||
|
||||
static void annotation__calc_percent(struct annotation *notes,
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ struct sym_hist_entry {
|
|||
enum {
|
||||
PERCENT_HITS_LOCAL,
|
||||
PERCENT_HITS_GLOBAL,
|
||||
PERCENT_PERIOD_LOCAL,
|
||||
PERCENT_MAX,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue