mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 21:20:14 +01:00
ac: add ac_thread_trace::data
Instead of passing two different structs to ac_dump_rgp_capture(). Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11156>
This commit is contained in:
parent
416496a0c4
commit
aff92f50c6
6 changed files with 10 additions and 10 deletions
|
|
@ -819,10 +819,10 @@ static enum elf_gfxip_level ac_chip_class_to_elf_gfxip_level(enum chip_class chi
|
|||
}
|
||||
|
||||
static void ac_sqtt_dump_data(struct radeon_info *rad_info,
|
||||
const struct ac_thread_trace *thread_trace,
|
||||
struct ac_thread_trace_data *thread_trace_data,
|
||||
struct ac_thread_trace *thread_trace,
|
||||
FILE *output)
|
||||
{
|
||||
struct ac_thread_trace_data *thread_trace_data = thread_trace->data;
|
||||
struct sqtt_file_chunk_asic_info asic_info = {0};
|
||||
struct sqtt_file_chunk_cpu_info cpu_info = {0};
|
||||
struct sqtt_file_chunk_api_info api_info = {0};
|
||||
|
|
@ -948,8 +948,7 @@ static void ac_sqtt_dump_data(struct radeon_info *rad_info,
|
|||
}
|
||||
|
||||
int ac_dump_rgp_capture(struct radeon_info *info,
|
||||
const struct ac_thread_trace *thread_trace,
|
||||
struct ac_thread_trace_data *thread_trace_data)
|
||||
struct ac_thread_trace *thread_trace)
|
||||
{
|
||||
char filename[2048];
|
||||
struct tm now;
|
||||
|
|
@ -967,7 +966,7 @@ int ac_dump_rgp_capture(struct radeon_info *info,
|
|||
if (!f)
|
||||
return -1;
|
||||
|
||||
ac_sqtt_dump_data(info, thread_trace, thread_trace_data, f);
|
||||
ac_sqtt_dump_data(info, thread_trace, f);
|
||||
|
||||
fprintf(stderr, "RGP capture saved to '%s'\n", filename);
|
||||
|
||||
|
|
|
|||
|
|
@ -108,8 +108,7 @@ struct rgp_pso_correlation {
|
|||
|
||||
int
|
||||
ac_dump_rgp_capture(struct radeon_info *info,
|
||||
const struct ac_thread_trace *thread_trace,
|
||||
struct ac_thread_trace_data *thread_trace_data);
|
||||
struct ac_thread_trace *thread_trace);
|
||||
|
||||
void
|
||||
ac_rgp_file_write_elf_object(FILE *output, size_t file_elf_start,
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ struct ac_thread_trace_se {
|
|||
};
|
||||
|
||||
struct ac_thread_trace {
|
||||
struct ac_thread_trace_data *data;
|
||||
uint32_t num_traces;
|
||||
struct ac_thread_trace_se traces[4];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -363,8 +363,7 @@ radv_handle_thread_trace(VkQueue _queue)
|
|||
radv_QueueWaitIdle(_queue);
|
||||
|
||||
if (radv_get_thread_trace(queue, &thread_trace)) {
|
||||
ac_dump_rgp_capture(&queue->device->physical_device->rad_info, &thread_trace,
|
||||
&queue->device->thread_trace);
|
||||
ac_dump_rgp_capture(&queue->device->physical_device->rad_info, &thread_trace);
|
||||
} else {
|
||||
/* Trigger a new capture if the driver failed to get
|
||||
* the trace because the buffer was too small.
|
||||
|
|
|
|||
|
|
@ -629,5 +629,6 @@ radv_get_thread_trace(struct radv_queue *queue, struct ac_thread_trace *thread_t
|
|||
thread_trace->num_traces++;
|
||||
}
|
||||
|
||||
thread_trace->data = &device->thread_trace;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -536,6 +536,7 @@ si_get_thread_trace(struct si_context *sctx,
|
|||
thread_trace->traces[se] = thread_trace_se;
|
||||
}
|
||||
|
||||
thread_trace->data = sctx->thread_trace;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -696,7 +697,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_rgp_capture(&sctx->screen->info, &thread_trace, sctx->thread_trace);
|
||||
ac_dump_rgp_capture(&sctx->screen->info, &thread_trace);
|
||||
} else {
|
||||
fprintf(stderr, "Failed to read the trace\n");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue