aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hist.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2012-11-28 08:52:41 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-12-09 06:46:07 -0500
commitf4c8bae1920c459b7b9c12363d11e8a588862e42 (patch)
tree923d0b943153198760e473261480666ea36dca05 /tools/perf/util/hist.h
parent05472daa4d8ab88a071bfcaa3bb47473e4071848 (diff)
perf diff: Change formula methods to work with pair directly
Changing formula methods to operate over hist entry and its pair directly. This makes the code more obvious and readable, instead of all time checking for pair being != NULL. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1354110769-2998-7-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/hist.h')
-rw-r--r--tools/perf/util/hist.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index 235503aac08c..c1b2fade8e70 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -229,6 +229,7 @@ unsigned int hists__sort_list_width(struct hists *self);
229double perf_diff__compute_delta(struct hist_entry *he, struct hist_entry *pair); 229double perf_diff__compute_delta(struct hist_entry *he, struct hist_entry *pair);
230double perf_diff__compute_ratio(struct hist_entry *he, struct hist_entry *pair); 230double perf_diff__compute_ratio(struct hist_entry *he, struct hist_entry *pair);
231s64 perf_diff__compute_wdiff(struct hist_entry *he, struct hist_entry *pair); 231s64 perf_diff__compute_wdiff(struct hist_entry *he, struct hist_entry *pair);
232int perf_diff__formula(char *buf, size_t size, struct hist_entry *he); 232int perf_diff__formula(struct hist_entry *he, struct hist_entry *pair,
233 char *buf, size_t size);
233double perf_diff__period_percent(struct hist_entry *he, u64 period); 234double perf_diff__period_percent(struct hist_entry *he, u64 period);
234#endif /* __PERF_HIST_H */ 235#endif /* __PERF_HIST_H */