broadcom/compiler: log spilling shaders to perf output

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8825>
This commit is contained in:
Iago Toral Quiroga
2021-02-02 10:12:07 +01:00
committed by Marge Bot
parent 0f90b729fb
commit d57a358128
+17
View File
@@ -1278,6 +1278,23 @@ uint64_t *v3d_compile(const struct v3d_compiler *compiler,
vir_compile_destroy(c);
}
if (unlikely(V3D_DEBUG & V3D_DEBUG_PERF) &&
c->compilation_result !=
V3D_COMPILATION_FAILED_REGISTER_ALLOCATION &&
c->spills > 0) {
char *debug_msg;
int ret = asprintf(&debug_msg,
"Compiled %s with %d spills and %d fills",
vir_get_stage_name(c),
c->spills, c->fills);
fprintf(stderr, "%s\n", debug_msg);
if (ret >= 0) {
c->debug_output(debug_msg, c->debug_output_data);
free(debug_msg);
}
}
struct v3d_prog_data *prog_data;
prog_data = rzalloc_size(NULL, v3d_prog_data_size(c->s->info.stage));