From 96c47f19846742bdfa3c153c8d26ccca5945586b Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Fri, 5 Oct 2012 16:44:42 +0200 Subject: perf diff: Add option to sort entries based on diff computation Adding support to sort hist entries based on the outcome of selected computation. It's now possible to specify '+' as a first character of '-c' option value to make such sort. Example: $ perf diff -c ratio -b # Event 'cache-misses' # # Baseline Ratio Shared Object Symbol # ........ .............. ................. ................................ # 19.64% 0.69 [kernel.kallsyms] [k] clear_page 0.30% 0.17 [kernel.kallsyms] [k] mm_alloc 0.04% 0.20 [kernel.kallsyms] [k] kmem_cache_alloc $ perf diff -c +ratio -b # Event 'cache-misses' # # Baseline Ratio Shared Object Symbol # ........ .............. ................. ................................ # 19.64% 0.69 [kernel.kallsyms] [k] clear_page 0.04% 0.20 [kernel.kallsyms] [k] kmem_cache_alloc 0.30% 0.17 [kernel.kallsyms] [k] mm_alloc Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: Corey Ashford Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1349448287-18919-4-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/hist.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/perf/util/hist.h') diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index 7e4d4c262213..a7ea28a1d502 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h @@ -205,4 +205,6 @@ int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist __maybe_unused, unsigned int hists__sort_list_width(struct hists *self); +double perf_diff__compute_delta(struct hist_entry *he); +double perf_diff__compute_ratio(struct hist_entry *he); #endif /* __PERF_HIST_H */ -- cgit v1.2.3