From: "Liang, Kan" <kan.liang@linux.intel.com>
To: Hongtao Yu <Hongtao.Yu@outlook.com>,
"linux-perf-users@vger.kernel.org"
<linux-perf-users@vger.kernel.org>
Subject: Re: Cannot use address filtering with user register sampling
Date: Fri, 26 Aug 2022 10:28:20 -0400 [thread overview]
Message-ID: <9b3f785e-1370-cf23-2ba4-2b0163185b2e@linux.intel.com> (raw)
In-Reply-To: <MW4PR18MB503443512239B3F40267004C8A729@MW4PR18MB5034.namprd18.prod.outlook.com>
On 2022-08-24 8:14 p.m., Hongtao Yu wrote:
> Hi,
>
> I was exploring address filtering together with user reg sampling on Intel Skylake hardware. The idea behind it is to make reg sampling more selectively. Unfortunately, I hit ` This CPU does not support address filtering` error. The command I ran is:
>
> perf record -e br_inst_retired.all_branches:uppp --user-regs=DI --filter 'filter * @/bin/ls' ls
>
> This CPU does not support address filtering
>
> IIUC, the br_inst_retired event is also hardware-based, similarly with the intel_pt event. But the latter works with address filtering while the former doesn’t. What is rational behind this?
The --filter only supports the tracepoint event(s) or or a hardware
trace, e.g., Intel PT. They trace and dump each single instruction. You
can use the --filter option to choose and only retrieve the
data/instructions you are interested.
Perf record -e br_inst_retired.all_branches event does sampling. I would
recommend you to use "-c" option to control the event period.(The number
of events that triggers a single sample.) For example, -c1000 means 1000
events occur then the HW dumps a sample (only for the 1000th event).
e.g.,
perf record -e br_inst_retired.all_branches:uppp --user-regs=DI
-c1000 ls
Then you can use the post-processing tools, e.g., perf report or perf
script, to filter and output the results.
e.g.,
perf script --dsos ls -F+uregs
Thanks,
Kan
next prev parent reply other threads:[~2022-08-26 14:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 0:14 Cannot use address filtering with user register sampling Hongtao Yu
2022-08-26 14:28 ` Liang, Kan [this message]
2022-08-26 22:03 ` Hongtao Yu
2022-08-28 16:30 ` Ian Rogers
2022-08-29 4:50 ` Hongtao Yu
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=9b3f785e-1370-cf23-2ba4-2b0163185b2e@linux.intel.com \
--to=kan.liang@linux.intel.com \
--cc=Hongtao.Yu@outlook.com \
--cc=linux-perf-users@vger.kernel.org \
/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).