Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 757DCC636D6 for ; Wed, 22 Feb 2023 19:49:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232599AbjBVTt3 (ORCPT ); Wed, 22 Feb 2023 14:49:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229705AbjBVTt1 (ORCPT ); Wed, 22 Feb 2023 14:49:27 -0500 Received: from mail-vs1-f54.google.com (mail-vs1-f54.google.com [209.85.217.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 726482C648; Wed, 22 Feb 2023 11:49:25 -0800 (PST) Received: by mail-vs1-f54.google.com with SMTP id u14so10658810vsp.8; Wed, 22 Feb 2023 11:49:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jPwmrZMQEF/WqljDsqQcVQAbBSuSNPhojo4n19aTh9s=; b=RxKnw91l53egv9x4eQ1xpjnfQYA9cxhJNJ1Avx1FMUfgLavyXzYxG8nSJVtQYhqmcu l/QM/7dpMEuW7Mnurxjpql9d253Ttm+JNLtTr56a1M1N4Mq5cB91HSDHh3DJJ2mloMqY 3pEBzEWGQmDnM/qQ083CgffpUgT4EYDpakC3oxpo0lKsxUDA/HUnzXteT0/6lLm5EDaB xLBRU8Ly3ALIz4odQjlxG/7ydrpZFuN0rMpgbCIVezGxD+tzwcBjNaddQDz24vBfvbqW rlsIEyA83/tc968Olqfa1nts/jX+1Km2hyeyurDrlntP4Qc2ze3IEBNWtmOw7ZibIkt/ 8aLw== X-Gm-Message-State: AO0yUKWqLkhNQRrNzaBSM+nCu5wK6+vC9gipPWCaNUEtwDjdjJ3OKh0z MR4oCqPuWu5iNuofmnzQJedxfReRJ9aOeiiHkfw= X-Google-Smtp-Source: AK7set8RYEDZQ1ZJVf/Cd883h0wazdej2RHkrYUvMC8AirqpmQ3FZMCdQA99Yv0BF6PHO/+1LqSFbbGCR3gWYsLOGNg= X-Received: by 2002:a05:6102:334a:b0:411:ac85:c5d0 with SMTP id j10-20020a056102334a00b00411ac85c5d0mr2362279vse.8.1677095364554; Wed, 22 Feb 2023 11:49:24 -0800 (PST) MIME-Version: 1.0 References: <20230219061329.1001079-1-namhyung@kernel.org> <20230219061329.1001079-3-namhyung@kernel.org> In-Reply-To: From: Namhyung Kim Date: Wed, 22 Feb 2023 11:49:13 -0800 Message-ID: Subject: Re: [PATCH 2/8] perf bpf filter: Implement event sample filtering To: Jiri Olsa Cc: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Ian Rogers , Adrian Hunter , Andi Kleen , Kan Liang , Song Liu , Stephane Eranian , Ravi Bangoria , Leo Yan , James Clark , Hao Luo , LKML , linux-perf-users@vger.kernel.org, bpf@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 21, 2023 at 3:54 AM Jiri Olsa wrote: > > On Sat, Feb 18, 2023 at 10:13:23PM -0800, Namhyung Kim wrote: > > SNIP > > > +#define FD(e, x, y) (*(int *)xyarray__entry(e->core.fd, x, y)) > > + > > +int perf_bpf_filter__prepare(struct evsel *evsel) > > +{ > > + int i, x, y, fd; > > + struct sample_filter_bpf *skel; > > + struct bpf_program *prog; > > + struct bpf_link *link; > > + struct perf_bpf_filter_expr *expr; > > + > > + skel = sample_filter_bpf__open(); > > + if (!skel) { > > + pr_err("Failed to open perf sample-filter BPF skeleton\n"); > > + return -1; > > + } > > + > > + bpf_map__set_max_entries(skel->maps.filters, MAX_FILTERS); > > is this needed? max_entries is defined in the bpf object Nop, will remove. Thanks, Namhyung