All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Jin Yao <yao.jin@linux.intel.com>
Cc: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org,
	mingo@redhat.com, alexander.shishkin@linux.intel.com,
	Linux-kernel@vger.kernel.org, ak@linux.intel.com,
	kan.liang@intel.com, yao.jin@intel.com
Subject: Re: [PATCH 2/2] perf script: Support dso filter
Date: Wed, 27 Jan 2021 23:15:24 +0100	[thread overview]
Message-ID: <20210127221524.GC284633@krava> (raw)
In-Reply-To: <20210124232750.19170-2-yao.jin@linux.intel.com>

On Mon, Jan 25, 2021 at 07:27:50AM +0800, Jin Yao wrote:
> Other perf tool builtins have already supported dso filter.
> 
> For example,
> perf report --dso, which only considers symbols in these dsos.
> 
> Now dso filter is supported for perf-script.
> 
> root@kbl-ppc:~# ./perf script --dso "[kernel.kallsyms]"
>             perf 18123 [000] 6142863.075104:          1   cycles:  ffffffff9ca77308 native_write_msr+0x8 ([kernel.kallsyms])
>             perf 18123 [000] 6142863.075107:          1   cycles:  ffffffff9ca77308 native_write_msr+0x8 ([kernel.kallsyms])
>             perf 18123 [000] 6142863.075108:         10   cycles:  ffffffff9ca77308 native_write_msr+0x8 ([kernel.kallsyms])
>             perf 18123 [000] 6142863.075109:        273   cycles:  ffffffff9ca7730a native_write_msr+0xa ([kernel.kallsyms])
>             perf 18123 [000] 6142863.075110:       7684   cycles:  ffffffff9ca3c9c0 native_sched_clock+0x50 ([kernel.kallsyms])
>             perf 18123 [000] 6142863.075112:     213017   cycles:  ffffffff9d765a92 syscall_exit_to_user_mode+0x32 ([kernel.kallsyms])
>             perf 18123 [001] 6142863.075156:          1   cycles:  ffffffff9ca77308 native_write_msr+0x8 ([kernel.kallsyms])
>             perf 18123 [001] 6142863.075158:          1   cycles:  ffffffff9ca77308 native_write_msr+0x8 ([kernel.kallsyms])
>             perf 18123 [001] 6142863.075159:         17   cycles:  ffffffff9ca77308 native_write_msr+0x8 ([kernel.kallsyms])
> 
> Signed-off-by: Jin Yao <yao.jin@linux.intel.com>

Acked-by: Jiri Olsa <jolsa@redhat.com>

thanks,
jirka

> ---
>  tools/perf/Documentation/perf-script.txt | 3 +++
>  tools/perf/builtin-script.c              | 2 ++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt
> index 0ef2261baeb9..6e32b2f9b828 100644
> --- a/tools/perf/Documentation/perf-script.txt
> +++ b/tools/perf/Documentation/perf-script.txt
> @@ -444,6 +444,9 @@ include::itrace.txt[]
>  	[0x4007a0, 0x0x4007a9]:
>  	perf script -S 0x4007a0 --addr-range 10
>  
> +--dsos=::
> +	Only consider symbols in these dsos.
> +
>  --call-trace::
>  	Show call stream for intel_pt traces. The CPUs are interleaved, but
>  	can be filtered with -C.
> diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
> index e0feda33dbb9..f8d3d8582ea2 100644
> --- a/tools/perf/builtin-script.c
> +++ b/tools/perf/builtin-script.c
> @@ -3523,6 +3523,8 @@ int cmd_script(int argc, const char **argv)
>  		     parse_output_fields),
>  	OPT_BOOLEAN('a', "all-cpus", &system_wide,
>  		    "system-wide collection from all CPUs"),
> +	OPT_STRING(0, "dsos", &symbol_conf.dso_list_str, "dso[,dso...]",
> +		   "only consider symbols in these dsos"),
>  	OPT_STRING('S', "symbols", &symbol_conf.sym_list_str, "symbol[,symbol...]",
>  		   "only consider these symbols"),
>  	OPT_INTEGER(0, "addr-range", &symbol_conf.addr_range,
> -- 
> 2.17.1
> 


  reply	other threads:[~2021-01-27 22:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-24 23:27 [PATCH 1/2] perf script: Support filtering by hex address Jin Yao
2021-01-24 23:27 ` [PATCH 2/2] perf script: Support dso filter Jin Yao
2021-01-27 22:15   ` Jiri Olsa [this message]
2021-01-28 13:12   ` Arnaldo Carvalho de Melo
2021-01-29  0:37     ` Jin, Yao
2021-01-27 23:13 ` [PATCH 1/2] perf script: Support filtering by hex address Jiri Olsa
2021-01-28  3:31   ` Jin, Yao
2021-01-28 12:43     ` Arnaldo Carvalho de Melo
2021-01-29  0:42       ` Jin, Yao

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=20210127221524.GC284633@krava \
    --to=jolsa@redhat.com \
    --cc=Linux-kernel@vger.kernel.org \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@intel.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.