aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-diff.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-02 19:15:23 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-02 19:15:23 -0400
commitf0bb4c0ab064a8aeeffbda1cee380151a594eaab (patch)
tree14d55a89c5db455aa10ff9a96ca14c474a9c4d55 /tools/perf/builtin-diff.c
parenta4883ef6af5e513a1e8c2ab9aab721604aa3a4f5 (diff)
parent983433b5812c5cf33a9008fa38c6f9b407fedb76 (diff)
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf updates from Ingo Molnar: "Kernel improvements: - watchdog driver improvements by Li Zefan - Power7 CPI stack events related improvements by Sukadev Bhattiprolu - event multiplexing via hrtimers and other improvements by Stephane Eranian - kernel stack use optimization by Andrew Hunter - AMD IOMMU uncore PMU support by Suravee Suthikulpanit - NMI handling rate-limits by Dave Hansen - various hw_breakpoint fixes by Oleg Nesterov - hw_breakpoint overflow period sampling and related signal handling fixes by Jiri Olsa - Intel Haswell PMU support by Andi Kleen Tooling improvements: - Reset SIGTERM handler in workload child process, fix from David Ahern. - Makefile reorganization, prep work for Kconfig patches, from Jiri Olsa. - Add automated make test suite, from Jiri Olsa. - Add --percent-limit option to 'top' and 'report', from Namhyung Kim. - Sorting improvements, from Namhyung Kim. - Expand definition of sysfs format attribute, from Michael Ellerman. Tooling fixes: - 'perf tests' fixes from Jiri Olsa. - Make Power7 CPI stack events available in sysfs, from Sukadev Bhattiprolu. - Handle death by SIGTERM in 'perf record', fix from David Ahern. - Fix printing of perf_event_paranoid message, from David Ahern. - Handle realloc failures in 'perf kvm', from David Ahern. - Fix divide by 0 in variance, from David Ahern. - Save parent pid in thread struct, from David Ahern. - Handle JITed code in shared memory, from Andi Kleen. - Fixes for 'perf diff', from Jiri Olsa. - Remove some unused struct members, from Jiri Olsa. - Add missing liblk.a dependency for python/perf.so, fix from Jiri Olsa. - Respect CROSS_COMPILE in liblk.a, from Rabin Vincent. - No need to do locking when adding hists in perf report, only 'top' needs that, from Namhyung Kim. - Fix alignment of symbol column in in the hists browser (top, report) when -v is given, from NAmhyung Kim. - Fix 'perf top' -E option behavior, from Namhyung Kim. - Fix bug in isupper() and islower(), from Sukadev Bhattiprolu. - Fix compile errors in bp_signal 'perf test', from Sukadev Bhattiprolu. ... and more things" * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (102 commits) perf/x86: Disable PEBS-LL in intel_pmu_pebs_disable() perf/x86: Fix shared register mutual exclusion enforcement perf/x86/intel: Support full width counting x86: Add NMI duration tracepoints perf: Drop sample rate when sampling is too slow x86: Warn when NMI handlers take large amounts of time hw_breakpoint: Introduce "struct bp_cpuinfo" hw_breakpoint: Simplify *register_wide_hw_breakpoint() hw_breakpoint: Introduce cpumask_of_bp() hw_breakpoint: Simplify the "weight" usage in toggle_bp_slot() paths hw_breakpoint: Simplify list/idx mess in toggle_bp_slot() paths perf/x86/intel: Add mem-loads/stores support for Haswell perf/x86/intel: Support Haswell/v4 LBR format perf/x86/intel: Move NMI clearing to end of PMI handler perf/x86/intel: Add Haswell PEBS support perf/x86/intel: Add simple Haswell PMU support perf/x86/intel: Add Haswell PEBS record support perf/x86/intel: Fix sparse warning perf/x86/amd: AMD IOMMU Performance Counter PERF uncore PMU implementation perf/x86/amd: Add IOMMU Performance Counter resource management ...
Diffstat (limited to 'tools/perf/builtin-diff.c')
-rw-r--r--tools/perf/builtin-diff.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index 2d0462d89a97..da8f8eb383a0 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -323,13 +323,20 @@ static void hists__baseline_only(struct hists *hists)
323 323
324static void hists__precompute(struct hists *hists) 324static void hists__precompute(struct hists *hists)
325{ 325{
326 struct rb_node *next = rb_first(&hists->entries); 326 struct rb_root *root;
327 struct rb_node *next;
328
329 if (sort__need_collapse)
330 root = &hists->entries_collapsed;
331 else
332 root = hists->entries_in;
327 333
334 next = rb_first(root);
328 while (next != NULL) { 335 while (next != NULL) {
329 struct hist_entry *he = rb_entry(next, struct hist_entry, rb_node); 336 struct hist_entry *he = rb_entry(next, struct hist_entry, rb_node_in);
330 struct hist_entry *pair = hist_entry__next_pair(he); 337 struct hist_entry *pair = hist_entry__next_pair(he);
331 338
332 next = rb_next(&he->rb_node); 339 next = rb_next(&he->rb_node_in);
333 if (!pair) 340 if (!pair)
334 continue; 341 continue;
335 342
@@ -457,7 +464,7 @@ static void hists__process(struct hists *old, struct hists *new)
457 hists__output_resort(new); 464 hists__output_resort(new);
458 } 465 }
459 466
460 hists__fprintf(new, true, 0, 0, stdout); 467 hists__fprintf(new, true, 0, 0, 0, stdout);
461} 468}
462 469
463static int __cmd_diff(void) 470static int __cmd_diff(void)
@@ -611,9 +618,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix __maybe_unused)
611 618
612 setup_pager(); 619 setup_pager();
613 620
614 sort_entry__setup_elide(&sort_dso, symbol_conf.dso_list, "dso", NULL); 621 sort__setup_elide(NULL);
615 sort_entry__setup_elide(&sort_comm, symbol_conf.comm_list, "comm", NULL);
616 sort_entry__setup_elide(&sort_sym, symbol_conf.sym_list, "symbol", NULL);
617 622
618 return __cmd_diff(); 623 return __cmd_diff();
619} 624}