public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Namhyung Kim <namhyung.kim@lge.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, paulus@samba.org,
	hpa@zytor.com, mingo@kernel.org, a.p.zijlstra@chello.nl,
	namhyung.kim@lge.com, namhyung@gmail.com, tglx@linutronix.de,
	mingo@elte.hu
Subject: [tip:perf/core] perf report: Treat an argument as a symbol filter
Date: Mon, 19 Mar 2012 13:05:33 -0700	[thread overview]
Message-ID: <tip-6db6127c4dad634ab98709b81e2f2770890b0d53@git.kernel.org> (raw)
In-Reply-To: <1331887855-874-5-git-send-email-namhyung.kim@lge.com>

Commit-ID:  6db6127c4dad634ab98709b81e2f2770890b0d53
Gitweb:     http://git.kernel.org/tip/6db6127c4dad634ab98709b81e2f2770890b0d53
Author:     Namhyung Kim <namhyung.kim@lge.com>
AuthorDate: Fri, 16 Mar 2012 17:50:55 +0900
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 16 Mar 2012 16:44:36 -0300

perf report: Treat an argument as a symbol filter

As Ingo requested, it'd be better off treating first (and the only)
argument as a symbol filter, so that user doesn't need to input the
symbol on the dialog window on TUI.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1331887855-874-5-git-send-email-namhyung.kim@lge.com
Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-report.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 80fb907..c005458 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -715,11 +715,16 @@ int cmd_report(int argc, const char **argv, const char *prefix __used)
 	} else
 		symbol_conf.exclude_other = false;
 
-	/*
-	 * Any (unrecognized) arguments left?
-	 */
-	if (argc)
-		usage_with_options(report_usage, options);
+	if (argc) {
+		/*
+		 * Special case: if there's an argument left then assume that
+		 * it's a symbol filter:
+		 */
+		if (argc > 1)
+			usage_with_options(report_usage, options);
+
+		report.symbol_filter_str = argv[0];
+	}
 
 	sort_entry__setup_elide(&sort_comm, symbol_conf.comm_list, "comm", stdout);
 

  reply	other threads:[~2012-03-19 20:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-16  8:50 [PATCH v2 1/5] perf hists: Add hists__filter_by_symbol Namhyung Kim
2012-03-16  8:50 ` [PATCH v2 2/5] perf ui browser: Introduce ui_browser__input_window Namhyung Kim
2012-03-16 19:40   ` Arnaldo Carvalho de Melo
2012-03-19  2:46     ` [PATCH] perf ui browser: Clean lines inside of the input window Namhyung Kim
2012-03-19 20:06       ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-03-19 20:03   ` [tip:perf/core] perf ui browser: Introduce ui_browser__input_window tip-bot for Namhyung Kim
2012-03-16  8:50 ` [PATCH v2 3/5] perf ui browser: Add 's' key to filter by symbol name Namhyung Kim
2012-03-19 20:03   ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-03-16  8:50 ` [PATCH v2 4/5] perf report: Add --symbol-filter option Namhyung Kim
2012-03-16 19:42   ` Arnaldo Carvalho de Melo
2012-03-19  2:53     ` [PATCH] perf report: Document " Namhyung Kim
2012-03-19 20:07       ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-03-19 20:04   ` [tip:perf/core] perf report: Add " tip-bot for Namhyung Kim
2012-03-16  8:50 ` [PATCH v2 5/5] perf report: Treat an argument as a symbol filter Namhyung Kim
2012-03-19 20:05   ` tip-bot for Namhyung Kim [this message]
2012-03-19 20:02 ` [tip:perf/core] perf hists: Add hists__filter_by_symbol tip-bot for Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-6db6127c4dad634ab98709b81e2f2770890b0d53@git.kernel.org \
    --to=namhyung.kim@lge.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@kernel.org \
    --cc=namhyung@gmail.com \
    --cc=paulus@samba.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox