struct perf_record_header_attr { struct perf_event_header header; struct perf_event_attr attr; /* * 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. */ #define perf_record_header_attr_id(evt) \
((void *)&(evt)->attr.attr + (evt)->attr.attr.size)
/* * Array encoding of a perf_cpu_map where nr is the number of entries in cpu[] * and each entry is a value for a CPU in the map.
*/ struct cpu_map_entries {
__u16 nr;
__u16 cpu[];
};
/* Bitmap encoding of a perf_cpu_map where bitmap entries are 32-bit. */ struct perf_record_mask_cpu_map32 { /* Number of mask values. */
__u16 nr; /* Constant 4. */
__u16 long_size; /* Bitmap data. */
__u32 mask[];
};
/* Bitmap encoding of a perf_cpu_map where bitmap entries are 64-bit. */ struct perf_record_mask_cpu_map64 { /* Number of mask values. */
__u16 nr; /* Constant 8. */
__u16 long_size; /* Legacy padding. */ char __pad[4]; /* Bitmap data. */
__u64 mask[];
};
/* * 'struct perf_record_cpu_map_data' is packed as unfortunately an earlier * version had unaligned data and we wish to retain file format compatibility. * -irogers
*/ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpacked" #pragma GCC diagnostic ignored "-Wattributes"
/* * An encoding of a CPU map for a range starting at start_cpu through to * end_cpu. If any_cpu is 1, an any CPU (-1) value (aka dummy value) is present.
*/ struct perf_record_range_cpu_map {
__u8 any_cpu;
__u8 __pad;
__u16 start_cpu;
__u16 end_cpu;
};
struct perf_record_cpu_map_data {
__u16 type; union { /* Used when type == PERF_CPU_MAP__CPUS. */ struct cpu_map_entries cpus_data; /* Used when type == PERF_CPU_MAP__MASK and long_size == 4. */ struct perf_record_mask_cpu_map32 mask32_data; /* Used when type == PERF_CPU_MAP__MASK and long_size == 8. */ struct perf_record_mask_cpu_map64 mask64_data; /* Used when type == PERF_CPU_MAP__RANGE_CPUS. */ struct perf_record_range_cpu_map range_cpu_data;
};
} __attribute__((packed));
struct perf_record_event_update { struct perf_event_header header;
__u64 type;
__u64 id; union { /* Used when type == PERF_EVENT_UPDATE__SCALE. */ struct perf_record_event_update_scale scale; /* Used when type == PERF_EVENT_UPDATE__UNIT. */ char unit[0]; /* Used when type == PERF_EVENT_UPDATE__NAME. */ char name[0]; /* Used when type == PERF_EVENT_UPDATE__CPUS. */ struct perf_record_event_update_cpus cpus;
};
};
/* * `header.size` includes the padding we are going to add while writing the record. * `data_size` only includes the size of `data[]` itself.
*/ struct perf_record_compressed2 { struct perf_event_header header;
__u64 data_size; char data[];
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.