From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Andi Kleen <ak@linux.intel.com>,
Kan Liang <kan.liang@linux.intel.com>, Song Liu <song@kernel.org>,
Stephane Eranian <eranian@google.com>,
Leo Yan <leo.yan@linaro.org>, James Clark <james.clark@arm.com>,
Hao Luo <haoluo@google.com>, LKML <linux-kernel@vger.kernel.org>,
linux-perf-users@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [RFC/PATCHSET 0/9] perf record: Implement BPF sample filter (v4)
Date: Fri, 10 Mar 2023 12:04:03 -0300 [thread overview]
Message-ID: <ZAtG43JZkUoO9XkF@kernel.org> (raw)
In-Reply-To: <f5b3de20-797c-4ff6-a85b-06c85b4eaa1b@amd.com>
Em Fri, Mar 10, 2023 at 03:28:03PM +0530, Ravi Bangoria escreveu:
> > It requires samples satisfy all the filter expressions otherwise it'd
> > drop the sample. IOW filter expressions are connected with logical AND
> > operations unless they used "||" explicitly. So if user has something
> > like 'A, B || C, D', then BOTH A and D should be true AND either B or C
> > also needs to be true.
> >
> > Essentially the BPF filter expression is:
> >
> > <term> <operator> <value> (("," | "||") <term> <operator> <value>)*
> >
> > The <term> can be one of:
> > ip, id, tid, pid, cpu, time, addr, period, txn, weight, phys_addr,
> > code_pgsz, data_pgsz, weight1, weight2, weight3, ins_lat, retire_lat,
> > p_stage_cyc, mem_op, mem_lvl, mem_snoop, mem_remote, mem_lock,
> > mem_dtlb, mem_blk, mem_hops
> >
> > The <operator> can be one of:
> > ==, !=, >, >=, <, <=, &
> >
> > The <value> can be one of:
> > <number> (for any term)
> > na, load, store, pfetch, exec (for mem_op)
> > l1, l2, l3, l4, cxl, io, any_cache, lfb, ram, pmem (for mem_lvl)
> > na, none, hit, miss, hitm, fwd, peer (for mem_snoop)
> > remote (for mem_remote)
> > na, locked (for mem_locked)
> > na, l1_hit, l1_miss, l2_hit, l2_miss, any_hit, any_miss, walk, fault (for mem_dtlb)
> > na, by_data, by_addr (for mem_blk)
> > hops0, hops1, hops2, hops3 (for mem_hops)
>
> I think this and few examples should be added in perf-record man page.
Agreed, and even mentioning cases where it overcome problems like the
filtering you mentioned for AMD systems.
- Arnaldo
next prev parent reply other threads:[~2023-03-10 15:12 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-07 23:33 [RFC/PATCHSET 0/9] perf record: Implement BPF sample filter (v4) Namhyung Kim
2023-03-07 23:33 ` [PATCH 1/9] perf bpf filter: Introduce basic BPF filter expression Namhyung Kim
2023-03-07 23:33 ` [PATCH 2/9] perf bpf filter: Implement event sample filtering Namhyung Kim
2023-03-07 23:33 ` [PATCH 3/9] perf record: Add BPF event filter support Namhyung Kim
2023-03-07 23:33 ` [PATCH 4/9] perf record: Record dropped sample count Namhyung Kim
2023-03-14 21:42 ` Arnaldo Carvalho de Melo
2023-03-14 22:18 ` Namhyung Kim
2023-03-07 23:33 ` [PATCH 5/9] perf bpf filter: Add 'pid' sample data support Namhyung Kim
2023-03-07 23:33 ` [PATCH 6/9] perf bpf filter: Add more weight " Namhyung Kim
2023-03-07 23:33 ` [PATCH 7/9] perf bpf filter: Add data_src " Namhyung Kim
2023-03-07 23:33 ` [PATCH 8/9] perf bpf filter: Add logical OR operator Namhyung Kim
2023-03-07 23:33 ` [PATCH 9/9] perf bpf filter: Show warning for missing sample flags Namhyung Kim
2023-03-10 6:40 ` [RFC/PATCHSET 0/9] perf record: Implement BPF sample filter (v4) Ravi Bangoria
2023-03-10 21:52 ` Namhyung Kim
2023-03-13 15:51 ` Ravi Bangoria
2023-03-10 9:58 ` Ravi Bangoria
2023-03-10 15:04 ` Arnaldo Carvalho de Melo [this message]
2023-03-10 21:53 ` Namhyung Kim
2023-03-14 11:39 ` Arnaldo Carvalho de Melo
2023-03-14 15:27 ` Ravi Bangoria
2023-03-14 17:57 ` 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=ZAtG43JZkUoO9XkF@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=bpf@vger.kernel.org \
--cc=eranian@google.com \
--cc=haoluo@google.com \
--cc=irogers@google.com \
--cc=james.clark@arm.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=leo.yan@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=ravi.bangoria@amd.com \
--cc=song@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 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.