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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> 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..83b5b13ebe1d 100644
--- a/tools/perf/util/bpf_skel/sample_filter.bpf.c
+++ b/tools/perf/util/bpf_skel/sample_filter.bpf.c
@@ -164,7 +164,7 @@ static inline __u64 perf_get_sample(struct
bpf_perf_event_data_kern *kctx,
                if (entry->part == 8) {
                        union perf_mem_data_src___new *data = (void
*)&kctx->data->data_src;

-                       if (bpf_core_field_exists(data->mem_hops))
+                       if (__builtin_preserve_field_info(data->mem_hops,
FIELD_EXISTENCE))
                                return data->mem_hops;

                        return 0;

Reply via email to