Skip to content

Commit c091c78

Browse files
namhyungacmel
authored andcommitted
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 <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20230825152552.112913-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent f174341 commit c091c78

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tools/lib/perf/include/perf/event.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,13 @@ struct perf_record_switch {
148148
struct perf_record_header_attr {
149149
struct perf_event_header header;
150150
struct perf_event_attr attr;
151-
__u64 id[];
151+
/*
152+
* Array of u64 id follows here but we cannot use a flexible array
153+
* because size of attr in the data can be different then current
154+
* version. Please use perf_record_header_attr_id() below.
155+
*
156+
* __u64 id[]; // do not use this
157+
*/
152158
};
153159

154160
/* Returns the pointer to id array based on the actual attr size. */

0 commit comments

Comments
 (0)