struct sqtt_spm_counter_info {
enum ac_pc_gpu_block block;
uint32_t instance;
- uint32_t data_offset; /* offset of counter from the beginning of the chunk */
uint32_t event_index; /* index of counter within the block */
+ uint32_t data_offset; /* offset of counter from the beginning of the chunk */
+ uint32_t data_size; /* size in bytes of a single counter data item */
};
struct sqtt_file_chunk_spm_db {
struct sqtt_file_chunk_header header;
uint32_t flags;
+ uint32_t preamble_size;
uint32_t num_timestamps;
uint32_t num_spm_counter_info;
+ uint32_t spm_counter_info_size;
uint32_t sample_interval;
};
-static_assert(sizeof(struct sqtt_file_chunk_spm_db) == 32,
+static_assert(sizeof(struct sqtt_file_chunk_spm_db) == 40,
"sqtt_file_chunk_spm_db doesn't match RGP spec");
static void ac_sqtt_fill_spm_db(const struct ac_spm_trace *spm_trace,
{
chunk->header.chunk_id.type = SQTT_FILE_CHUNK_TYPE_SPM_DB;
chunk->header.chunk_id.index = 0;
- chunk->header.major_version = 1;
- chunk->header.minor_version = 3;
+ chunk->header.major_version = 2;
+ chunk->header.minor_version = 0;
chunk->header.size_in_bytes = chunk_size;
chunk->flags = 0;
+ chunk->preamble_size = sizeof(struct sqtt_file_chunk_spm_db);
chunk->num_timestamps = num_samples;
chunk->num_spm_counter_info = spm_trace->num_counters;
+ chunk->spm_counter_info_size = sizeof(struct sqtt_spm_counter_info);
chunk->sample_interval = spm_trace->sample_interval;
}
.block = spm_trace->counters[c].gpu_block,
.instance = spm_trace->counters[c].instance,
.data_offset = counter_values_offset,
+ .data_size = sizeof(uint16_t),
.event_index = spm_trace->counters[c].event_id,
};