From: Namhyung Kim <namhyung@kernel.org>
To: Hao Luo <haoluo@google.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Jiri Olsa <jolsa@kernel.org>, Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
linux-perf-users <linux-perf-users@vger.kernel.org>,
Song Liu <songliubraving@fb.com>, bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH v2] perf tools: Get a perf cgroup more portably in BPF
Date: Thu, 22 Sep 2022 13:42:08 -0700 [thread overview]
Message-ID: <CAM9d7cjpZVeh4D27PWNv4Z=PEH+2TajNte-GkvWJiAuXz5AhBQ@mail.gmail.com> (raw)
In-Reply-To: <CA+khW7gQPqoBSi5bSQXFdnkVyjMpu4A=vzFXRLvWDjZww0brEA@mail.gmail.com>
Hi Hao,
On Thu, Sep 22, 2022 at 12:36 PM Hao Luo <haoluo@google.com> wrote:
>
> On Wed, Sep 21, 2022 at 9:40 PM Namhyung Kim <namhyung@kernel.org> wrote:
> >
> > The perf_event_cgrp_id can be different on other configurations.
> > To be more portable as CO-RE, it needs to get the cgroup subsys id
> > using the bpf_core_enum_value() helper.
> >
>
> I remember using bpf_core_enum_value requires a compiler built-in. So
> the build will fail on old compiler such as clang-11. See [1]. Maybe
> we should surround it with #if
> __has_builtin(__builtin_preserve_enum_value) to be sure.
>
> [1] https://www.spinics.net/lists/bpf/msg30859.html
Thanks for pointing this out. As this is a kind of optimization
I think we can fallback to using the existing value if not available.
Will send v3.
Thanks,
Namhyung
prev parent reply other threads:[~2022-09-22 20:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 4:40 [PATCH v2] perf tools: Get a perf cgroup more portably in BPF Namhyung Kim
2022-09-22 19:23 ` Arnaldo Carvalho de Melo
2022-09-22 19:35 ` Hao Luo
2022-09-22 20:42 ` Namhyung Kim [this message]
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='CAM9d7cjpZVeh4D27PWNv4Z=PEH+2TajNte-GkvWJiAuXz5AhBQ@mail.gmail.com' \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=bpf@vger.kernel.org \
--cc=haoluo@google.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=songliubraving@fb.com \
/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).