Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf header: Add kerneldoc to 'struct perf_file_header'

Some of the values are a little strange so add documentation to
resolve ambiguity.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Nick Terrell <terrelln@fb.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Yanteng Si <siyanteng@loongson.cn>
Cc: Yicong Yang <yangyicong@hisilicon.com>
Link: https://lore.kernel.org/r/20240829150154.37929-4-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Ian Rogers and committed by
Arnaldo Carvalho de Melo
d71bbe79 d9c99310

+15 -1
+15 -1
tools/perf/util/header.h
··· 61 61 u64 size; 62 62 }; 63 63 64 + /** 65 + * struct perf_file_header: Header representation on disk. 66 + */ 64 67 struct perf_file_header { 68 + /** @magic: Holds "PERFILE2". */ 65 69 u64 magic; 70 + /** @size: Size of this header - sizeof(struct perf_file_header). */ 66 71 u64 size; 72 + /** 73 + * @attr_size: Size of attrs entries - sizeof(struct perf_event_attr) + 74 + * sizeof(struct perf_file_section). 75 + */ 67 76 u64 attr_size; 77 + /** @attrs: Offset and size of file section holding attributes. */ 68 78 struct perf_file_section attrs; 79 + /** @data: Offset and size of file section holding regular event data. */ 69 80 struct perf_file_section data; 70 - /* event_types is ignored */ 81 + /** @event_types: Ignored. */ 71 82 struct perf_file_section event_types; 83 + /** 84 + * @adds_features: Bitmap of features. The features are immediately after the data section. 85 + */ 72 86 DECLARE_BITMAP(adds_features, HEADER_FEAT_BITS); 73 87 }; 74 88