ac/rgp,radeonsi,radv: pass struct thread_trace_data to ac_sqtt_dump_data()
struct thread_trace_data holds struct rgp_code_object, struct rgp_loader_events, struct rgp_pso_correlation data. This data is required in function ac_sqtt_dump_data(). This patch makes the code changes required to pass struct thread_trace_data to function ac_sqtt_dump_data(). Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8609>
This commit is contained in:
committed by
Marge Bot
parent
c544e56fb5
commit
5d51ccd7d1
@@ -587,7 +587,9 @@ static void ac_sqtt_fill_sqtt_data(struct sqtt_file_chunk_sqtt_data *chunk, int3
|
||||
}
|
||||
|
||||
static void ac_sqtt_dump_data(struct radeon_info *rad_info,
|
||||
const struct ac_thread_trace *thread_trace, FILE *output)
|
||||
const struct ac_thread_trace *thread_trace,
|
||||
struct ac_thread_trace_data *thread_trace_data,
|
||||
FILE *output)
|
||||
{
|
||||
struct sqtt_file_chunk_asic_info asic_info = {0};
|
||||
struct sqtt_file_chunk_cpu_info cpu_info = {0};
|
||||
@@ -640,7 +642,9 @@ static void ac_sqtt_dump_data(struct radeon_info *rad_info,
|
||||
}
|
||||
}
|
||||
|
||||
int ac_dump_thread_trace(struct radeon_info *info, const struct ac_thread_trace *thread_trace)
|
||||
int ac_dump_thread_trace(struct radeon_info *info,
|
||||
const struct ac_thread_trace *thread_trace,
|
||||
struct ac_thread_trace_data *thread_trace_data)
|
||||
{
|
||||
char filename[2048];
|
||||
struct tm now;
|
||||
@@ -658,7 +662,7 @@ int ac_dump_thread_trace(struct radeon_info *info, const struct ac_thread_trace
|
||||
if (!f)
|
||||
return -1;
|
||||
|
||||
ac_sqtt_dump_data(info, thread_trace, f);
|
||||
ac_sqtt_dump_data(info, thread_trace, thread_trace_data, f);
|
||||
|
||||
fprintf(stderr, "Thread trace capture saved to '%s'\n", filename);
|
||||
|
||||
|
||||
@@ -105,9 +105,6 @@ struct rgp_pso_correlation {
|
||||
simple_mtx_t lock;
|
||||
};
|
||||
|
||||
int
|
||||
ac_dump_thread_trace(struct radeon_info *info,
|
||||
const struct ac_thread_trace *thread_trace);
|
||||
void
|
||||
ac_rgp_file_write_elf_object(FILE *output, size_t file_elf_start,
|
||||
struct rgp_code_object_record *record,
|
||||
|
||||
@@ -92,6 +92,11 @@ uint32_t
|
||||
ac_get_expected_buffer_size(struct radeon_info *rad_info,
|
||||
const struct ac_thread_trace_info *info);
|
||||
|
||||
int
|
||||
ac_dump_thread_trace(struct radeon_info *info,
|
||||
const struct ac_thread_trace *thread_trace,
|
||||
struct ac_thread_trace_data *thread_trace_data);
|
||||
|
||||
/**
|
||||
* Identifiers for RGP SQ thread-tracing markers (Table 1)
|
||||
*/
|
||||
|
||||
@@ -361,7 +361,9 @@ radv_handle_thread_trace(VkQueue _queue)
|
||||
radv_QueueWaitIdle(_queue);
|
||||
|
||||
if (radv_get_thread_trace(queue, &thread_trace))
|
||||
ac_dump_thread_trace(&queue->device->physical_device->rad_info, &thread_trace);
|
||||
ac_dump_thread_trace(&queue->device->physical_device->rad_info,
|
||||
&thread_trace,
|
||||
&queue->device->thread_trace);
|
||||
} else {
|
||||
bool frame_trigger = num_frames == queue->device->thread_trace.start_frame;
|
||||
bool file_trigger = false;
|
||||
|
||||
@@ -638,7 +638,7 @@ si_handle_thread_trace(struct si_context *sctx, struct radeon_cmdbuf *rcs)
|
||||
/* Wait for SQTT to finish and read back the bo */
|
||||
if (sctx->ws->fence_wait(sctx->ws, sctx->last_sqtt_fence, PIPE_TIMEOUT_INFINITE) &&
|
||||
si_get_thread_trace(sctx, &thread_trace)) {
|
||||
ac_dump_thread_trace(&sctx->screen->info, &thread_trace);
|
||||
ac_dump_thread_trace(&sctx->screen->info, &thread_trace, sctx->thread_trace);
|
||||
} else {
|
||||
fprintf(stderr, "Failed to read the trace\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user