From: Namhyung Kim Date: Fri, 25 Aug 2023 15:25:52 +0000 (-0700) Subject: libperf: Get rid of attr.id field X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c091c78b73c82f1e2811ab19b8e287ddc7807651;p=linux.git libperf: Get rid of attr.id field Now there's no in-tree user of the field. To remove the possible bug later, let's get rid of the 'id' field and add a comment for that. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230825152552.112913-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/lib/perf/include/perf/event.h b/tools/lib/perf/include/perf/event.h index e563dd8c3628f..ae64090184d32 100644 --- a/tools/lib/perf/include/perf/event.h +++ b/tools/lib/perf/include/perf/event.h @@ -148,7 +148,13 @@ struct perf_record_switch { struct perf_record_header_attr { struct perf_event_header header; struct perf_event_attr attr; - __u64 id[]; + /* + * Array of u64 id follows here but we cannot use a flexible array + * because size of attr in the data can be different then current + * version. Please use perf_record_header_attr_id() below. + * + * __u64 id[]; // do not use this + */ }; /* Returns the pointer to id array based on the actual attr size. */