aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-report.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2011-06-29 17:52:52 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2011-06-29 18:26:49 -0400
commitcb1955b86c86782ff20037da42ef030057501c34 (patch)
tree4d4ed06f8ec32ddc4a47259d82fa470673cdf510 /tools/perf/builtin-report.c
parentfd8ea21276adefc7f0133bd42fcf3b2faf0b15f8 (diff)
perf tools: Only display parent field if explictly sorted
We don't need to display the parent field if the parent sorting machinery is only used for parent filtering (as in "-p foo"). However if parent filtering is used in combination with explicit parent sorting ( -s parent), we want to display it. Result with: perf report -p kernel_thread -s parent Before: # Overhead Parent symbol # ........ ............. # 0.07% | --- ioread8 ata_sff_check_status ata_sff_tf_load ata_sff_qc_issue ata_bmdma_qc_issue ata_qc_issue ata_scsi_translate ata_scsi_queuecmd scsi_dispatch_cmd scsi_request_fn __blk_run_queue __make_request generic_make_request submit_bio submit_bh journal_submit_commit_record jbd2_journal_commit_transaction kjournald2 kthread kernel_thread_helpe After: # Overhead Parent symbol # ........ ............. # 0.07% kernel_thread_helper | --- ioread8 ata_sff_check_status ata_sff_tf_load ata_sff_qc_issue ata_bmdma_qc_issue ata_qc_issue ata_scsi_translate ata_scsi_queuecmd scsi_dispatch_cmd scsi_request_fn __blk_run_queue __make_request generic_make_request submit_bio submit_bh journal_submit_commit_record jbd2_journal_commit_transaction kjournald2 kthread kernel_thread_helper Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Stephane Eranian <eranian@google.com> Cc: David Ahern <dsahern@gmail.com> Cc: Sam Liao <phyomh@gmail.com>
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r--tools/perf/builtin-report.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 271e252dc651..5d43d0181d63 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -525,7 +525,14 @@ int cmd_report(int argc, const char **argv, const char *prefix __used)
525 if (parent_pattern != default_parent_pattern) { 525 if (parent_pattern != default_parent_pattern) {
526 if (sort_dimension__add("parent") < 0) 526 if (sort_dimension__add("parent") < 0)
527 return -1; 527 return -1;
528 sort_parent.elide = 1; 528
529 /*
530 * Only show the parent fields if we explicitly
531 * sort that way. If we only use parent machinery
532 * for filtering, we don't want it.
533 */
534 if (!strstr(sort_order, "parent"))
535 sort_parent.elide = 1;
529 } else 536 } else
530 symbol_conf.exclude_other = false; 537 symbol_conf.exclude_other = false;
531 538