linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Jin Yao <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: yao.jin@intel.com, kan.liang@linux.intel.com, acme@redhat.com,
	peterz@infradead.org, hpa@zytor.com,
	linux-kernel@vger.kernel.org, jolsa@kernel.org,
	alexander.shishkin@linux.intel.com, ak@linux.intel.com,
	yao.jin@linux.intel.com, tglx@linutronix.de, mingo@kernel.org
Subject: [tip:perf/urgent] perf diff: Support --pid/--tid filter options
Date: Sat, 9 Mar 2019 12:01:31 -0800	[thread overview]
Message-ID: <tip-c1d3e633e16db3eb64f519c7099171bfcef94b20@git.kernel.org> (raw)
In-Reply-To: <1551791143-10334-4-git-send-email-yao.jin@linux.intel.com>

Commit-ID:  c1d3e633e16db3eb64f519c7099171bfcef94b20
Gitweb:     https://git.kernel.org/tip/c1d3e633e16db3eb64f519c7099171bfcef94b20
Author:     Jin Yao <yao.jin@linux.intel.com>
AuthorDate: Tue, 5 Mar 2019 21:05:43 +0800
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 6 Mar 2019 18:06:16 -0300

perf diff: Support --pid/--tid filter options

Using the existing symbol_conf.pid_list_str and symbol_conf.tid_list_str
logic.

For example:

  perf diff --tid 13965

It'll only diff the samples for thread 13965.

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jin Yao <yao.jin@intel.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1551791143-10334-4-git-send-email-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-diff.txt | 6 ++++++
 tools/perf/builtin-diff.c              | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/tools/perf/Documentation/perf-diff.txt b/tools/perf/Documentation/perf-diff.txt
index 8c2c229faf50..da7809b15cc9 100644
--- a/tools/perf/Documentation/perf-diff.txt
+++ b/tools/perf/Documentation/perf-diff.txt
@@ -168,6 +168,12 @@ OPTIONS
 	CPUs are specified with -: 0-2. Default is to report samples on all
 	CPUs.
 
+--pid=::
+	Only diff samples for given process ID (comma separated list).
+
+--tid=::
+	Only diff samples for given thread ID (comma separated list).
+
 COMPARISON
 ----------
 The comparison is governed by the baseline file. The baseline perf.data
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index dfe6c7606f5a..6e7920793729 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -985,6 +985,10 @@ static const struct option options[] = {
 	OPT_STRING(0, "time", &pdiff.time_str, "str",
 		   "Time span (time percent or absolute timestamp)"),
 	OPT_STRING(0, "cpu", &cpu_list, "cpu", "list of cpus to profile"),
+	OPT_STRING(0, "pid", &symbol_conf.pid_list_str, "pid[,pid...]",
+		   "only consider symbols in these pids"),
+	OPT_STRING(0, "tid", &symbol_conf.tid_list_str, "tid[,tid...]",
+		   "only consider symbols in these tids"),
 	OPT_END()
 };
 

      reply	other threads:[~2019-03-09 20:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-05 13:05 [PATCH v4 0/3] perf diff: Add new filter options Jin Yao
2019-03-05 12:34 ` Jiri Olsa
2019-03-06 21:07   ` Arnaldo Carvalho de Melo
2019-03-05 13:05 ` [PATCH v4 1/3] perf diff: Support --time filter option Jin Yao
2019-03-09 20:00   ` [tip:perf/urgent] " tip-bot for Jin Yao
2019-03-05 13:05 ` [PATCH v4 2/3] perf diff: Support --cpu " Jin Yao
2019-03-09 20:00   ` [tip:perf/urgent] " tip-bot for Jin Yao
2019-03-05 13:05 ` [PATCH v4 3/3] perf diff: Support --pid/--tid filter options Jin Yao
2019-03-09 20:01   ` tip-bot for Jin Yao [this message]

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-c1d3e633e16db3eb64f519c7099171bfcef94b20@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=yao.jin@intel.com \
    --cc=yao.jin@linux.intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).