From: Jack Henschel <jackdev@mailbox.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: linux-perf-users@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@kernel.org>
Subject: Re: Filter option should follow a tracer option
Date: Wed, 23 Aug 2017 10:51:15 +0200 (CEST) [thread overview]
Message-ID: <98754540.17249.1503478275998@office.mailbox.org> (raw)
In-Reply-To: <a214874a-a271-729e-d253-731e648a10e6@intel.com>
> Adrian Hunter <adrian.hunter@intel.com> hat am 23. August 2017 um 08:06 geschrieben:
>
>
> On 22/08/17 22:00, Arnaldo Carvalho de Melo wrote:
> > Em Fri, Aug 18, 2017 at 11:43:51AM +0200, Jack Henschel escreveu:
> >> Hi everyone,
> >>
> >> I'm experimenting with Intel PT and perf, but I am currently stuck at getting filters to work with `perf record`.
> >>
> >> I have the following command:
> >>> perf record -e intel_pt// --filter 'filter main @ /bin/sleep' /bin/sleep 1
> >> But it throws this error message:
> >>> --filter option should follow a -e tracepoint or HW tracer option
> >>
> >> Maybe this is a trivial mistake, but I don't understand the error, because as far as I'm concerned the --filter options *is* following a -e HW tracer option.
> >>
> >> I'm using perf version 4.9.30 with kernel 4.9.30-2+deb9u3 on Debian 9 Stretch.
>
> It looks like either your CPU does not support Intel PT at all, or it does not support address filtering.
My CPU (Xeon CPU E5-2680 v4) supports Intel PT (intel_pt flag is present in /proc/cpuinfo), but this is not an issue with Intel PT. Here are some more examples (with various syntaxes):
> $ perf list | grep -E 'intel_pt|branch-loads|cache-misses'
> cache-misses [Hardware event]
> branch-loads [Hardware cache event]
> cache-misses OR cpu/cache-misses/ [Kernel PMU event]
> intel_pt// [Kernel PMU event]
> $ perf record --event intel_pt// --exclude-perf -a
> --exclude-perf option should follow a -e tracepoint option
> $ perf record --event=branch-loads --filter 'filter main @ /bin/sleep' -- /bin/sleep 1
> --filter option should follow a -e tracepoint or HW tracer option
> $ perf record -e cache-misses --filter 'filter main @ /bin/sleep' -- /bin/sleep 1
> --filter option should follow a -e tracepoint or HW tracer option
> Have you checked the value of /sys/bus/event_source/devices/intel_pt/nr_addr_filters ?
I don't have that file:
> $ ls -l /sys/bus/event_source/devices/intel_pt/
> total 0
> drwxr-xr-x 2 root root 0 Aug 22 06:32 caps
> drwxr-xr-x 2 root root 0 Aug 22 06:32 format
> -r--r--r-- 1 root root 4096 Aug 23 04:47 max_nonturbo_ratio
> -rw-r--r-- 1 root root 4096 Aug 23 04:47 perf_event_mux_interval_ms
> drwxr-xr-x 2 root root 0 Aug 23 04:47 power
> lrwxrwxrwx 1 root root 0 Aug 22 06:30 subsystem -> ../../bus/event_source
> -r--r--r-- 1 root root 4096 Aug 23 04:47 tsc_art_ratio
> -r--r--r-- 1 root root 4096 Aug 22 06:32 type
> -rw-r--r-- 1 root root 4096 Aug 22 06:30 uevent
The above commands were ran on linux kernel 4.13-rc6 along with perf 4.13 (both compiled from git):
> $ uname -r
> 4.13.0-rc6+
> $ perf version
> perf version 4.13.rc6.g647081
Greetings
Jack
next prev parent reply other threads:[~2017-08-23 9:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-18 9:43 Filter option should follow a tracer option Jack Henschel
2017-08-22 19:00 ` Arnaldo Carvalho de Melo
2017-08-23 6:06 ` Adrian Hunter
2017-08-23 8:51 ` Jack Henschel [this message]
2017-08-23 10:33 ` Adrian Hunter
2017-08-23 12:11 ` Jack Henschel
2017-08-23 13:22 ` Arnaldo Carvalho de Melo
[not found] ` <f142538f-b403-2f15-5dbe-f2d2b07ab777@mailbox.org>
[not found] ` <20170823190757.GA10477@kernel.org>
2017-08-24 8:36 ` Jack Henschel
2017-09-19 23:16 ` Kim Phillips
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=98754540.17249.1503478275998@office.mailbox.org \
--to=jackdev@mailbox.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.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).