public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Namhyung Kim <namhyung@kernel.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>, Ian Rogers <irogers@google.com>,
	Andi Kleen <ak@linux.intel.com>,
	Kan Liang <kan.liang@linux.intel.com>, Song Liu <song@kernel.org>,
	Stephane Eranian <eranian@google.com>,
	Ravi Bangoria <ravi.bangoria@amd.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: [PATCH 1/8] perf bpf filter: Introduce basic BPF filter expression
Date: Tue, 7 Mar 2023 15:03:17 +0200	[thread overview]
Message-ID: <bf7a4d48-ebf5-301e-5142-e728242c8b6a@intel.com> (raw)
In-Reply-To: <20230222230141.1729048-2-namhyung@kernel.org>

On 23/02/23 01:01, Namhyung Kim wrote:
> This implements a tiny parser for the filter expressions used for BPF.
> Each expression will be converted to struct perf_bpf_filter_expr and
> be passed to a BPF map.
> 
> For now, I'd like to start with the very basic comparisons like EQ or
> GT.  The LHS should be a term for sample data and the RHS is a number.
> The expressions are connected by a comma.  For example,
> 
>     period > 10000
>     ip < 0x1000000000000, cpu == 3
> 
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
>  tools/perf/util/Build        | 16 +++++++
>  tools/perf/util/bpf-filter.c | 37 ++++++++++++++++
>  tools/perf/util/bpf-filter.h | 36 ++++++++++++++++
>  tools/perf/util/bpf-filter.l | 82 ++++++++++++++++++++++++++++++++++++
>  tools/perf/util/bpf-filter.y | 54 ++++++++++++++++++++++++
>  5 files changed, 225 insertions(+)
>  create mode 100644 tools/perf/util/bpf-filter.c
>  create mode 100644 tools/perf/util/bpf-filter.h
>  create mode 100644 tools/perf/util/bpf-filter.l
>  create mode 100644 tools/perf/util/bpf-filter.y
> 
> diff --git a/tools/perf/util/bpf-filter.h b/tools/perf/util/bpf-filter.h
> new file mode 100644
> index 000000000000..fd5b1164a322
> --- /dev/null
> +++ b/tools/perf/util/bpf-filter.h
> @@ -0,0 +1,36 @@
> +// SPDX-License-Identifier: GPL-2.0

/* */ is preferred SPDX comment style for header files

  reply	other threads:[~2023-03-07 13:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22 23:01 [RFC/PATCHSET 0/8] perf record: Implement BPF sample filter (v3) Namhyung Kim
2023-02-22 23:01 ` [PATCH 1/8] perf bpf filter: Introduce basic BPF filter expression Namhyung Kim
2023-03-07 13:03   ` Adrian Hunter [this message]
2023-02-22 23:01 ` [PATCH 2/8] perf bpf filter: Implement event sample filtering Namhyung Kim
2023-03-07 13:03   ` Adrian Hunter
2023-03-07 20:57     ` Namhyung Kim
2023-02-22 23:01 ` [PATCH 3/8] perf record: Add BPF event filter support Namhyung Kim
2023-03-07 13:04   ` Adrian Hunter
2023-03-07 21:05     ` Namhyung Kim
2023-02-22 23:01 ` [PATCH 4/8] perf record: Record dropped sample count Namhyung Kim
2023-03-07 13:04   ` Adrian Hunter
2023-02-22 23:01 ` [PATCH 5/8] perf bpf filter: Add 'pid' sample data support Namhyung Kim
2023-02-22 23:01 ` [PATCH 6/8] perf bpf filter: Add more weight " Namhyung Kim
2023-02-22 23:01 ` [PATCH 7/8] perf bpf filter: Add data_src " Namhyung Kim
2023-02-22 23:01 ` [PATCH 8/8] perf bpf filter: Add logical OR operator Namhyung Kim
2023-03-07  4:53 ` [RFC/PATCHSET 0/8] perf record: Implement BPF sample filter (v3) Namhyung Kim
2023-03-07 22:33 ` Jiri Olsa
2023-03-07 23:06   ` Namhyung Kim
  -- strict thread matches above, loose matches on Subject: below --
2023-02-19  6:13 [RFC/PATCHSET 0/8] perf record: Implement BPF sample filter (v2) Namhyung Kim
2023-02-19  6:13 ` [PATCH 1/8] perf bpf filter: Introduce basic BPF filter expression 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=bf7a4d48-ebf5-301e-5142-e728242c8b6a@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=acme@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox