https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121420

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I think this patch fixes the issue:
```
diff --git a/tools/perf/util/bpf_skel/sample_filter.bpf.c
b/tools/perf/util/bpf_skel/sample_filter.bpf.c
index b195e6efeb8b..f1ffef44f603 100644
--- a/tools/perf/util/bpf_skel/sample_filter.bpf.c
+++ b/tools/perf/util/bpf_skel/sample_filter.bpf.c
@@ -76,7 +76,7 @@ static inline __u64 perf_get_sample(struct
bpf_perf_event_data_kern *kctx,
 {
        struct perf_sample_data___new *data = (void *)kctx->data;

-       if (!bpf_core_field_exists(data->sample_flags))
+       if (!__builtin_preserve_field_info(data->sample_flags,
FIELD_EXISTENCE))
                return 0;

 #define BUILD_CHECK_SAMPLE(x)     
```

Reply via email to