lkml.org 
[lkml]   [2022]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] perf tools: Get a perf cgroup more portably in BPF
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

> Suggested-by: Ian Rogers <irogers@google.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
[...]

\
 
 \ /
  Last update: 2022-09-22 21:37    [W:0.056 / U:3.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site