/* * Versioning header in case things need to change in the future. That way * decoding of old snapshot is still possible.
*/ enum { /* Starting with 0x0 */
CS_HEADER_VERSION, /* PMU->type (32 bit), total # of CPUs (32 bit) */
CS_PMU_TYPE_CPUS,
CS_ETM_SNAPSHOT,
CS_HEADER_VERSION_MAX,
};
/* * Update the version for new format. * * Version 1: format adds a param count to the per cpu metadata. * This allows easy adding of new metadata parameters. * Requires that new params always added after current ones. * Also allows client reader to handle file versions that are different by * checking the number of params in the file vs the number expected. * * Version 2: Drivers will use PERF_RECORD_AUX_OUTPUT_HW_ID to output * CoreSight Trace ID. ...TRACEIDR metadata will be set to legacy values * but with addition flags.
*/ #define CS_HEADER_CURRENT_VERSION 2
/* Beginning of header common to both ETMv3 and V4 */ enum {
CS_ETM_MAGIC,
CS_ETM_CPU, /* Number of trace config params in following ETM specific block */
CS_ETM_NR_TRC_PARAMS,
CS_ETM_COMMON_BLK_MAX_V1,
};
/* define fixed version 0 length - allow new format reader to read old files. */ #define CS_ETMV4_NR_TRC_PARAMS_V0 (CS_ETMV4_TRCAUTHSTATUS - CS_ETMV4_TRCCONFIGR + 1)
/* * ETE metadata is ETMv4 plus TRCDEVARCH register and doesn't support header V0 since it was * added in header V1
*/ enum { /* Dynamic, configurable parameters */
CS_ETE_TRCCONFIGR = CS_ETM_COMMON_BLK_MAX_V1,
CS_ETE_TRCTRACEIDR, /* RO, taken from sysFS */
CS_ETE_TRCIDR0,
CS_ETE_TRCIDR1,
CS_ETE_TRCIDR2,
CS_ETE_TRCIDR8,
CS_ETE_TRCAUTHSTATUS,
CS_ETE_TRCDEVARCH,
CS_ETE_TS_SOURCE,
CS_ETE_PRIV_MAX
};
/* * Check for valid CoreSight trace ID. If an invalid value is present in the metadata, * then IDs are present in the hardware ID packet in the data file.
*/ #define CS_IS_VALID_TRACE_ID(id) ((id > 0) && (id < 0x70))
/* * When working with per-thread scenarios the process under trace can * be scheduled on any CPU and as such, more than one traceID may be * associated with the same process. Since a traceID of '0' is illegal * as per the CoreSight architecture, use that specific value to * identify the queue where all packets (with any traceID) are * aggregated.
*/ #define CS_ETM_PER_THREAD_TRACEID 0
struct cs_etm_packet_queue {
u32 packet_count;
u32 head;
u32 tail;
u32 instr_count;
u64 cs_timestamp; /* Timestamp from trace data, converted to ns if possible */
u64 next_cs_timestamp; struct cs_etm_packet packet_buffer[CS_ETM_PACKET_MAX_BUFFER];
};
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.