mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
freedreno/ir3: add scheduler traces
Add some infrastructure to trace scheduler decisions. The next patch will add some more traces, just splitting this out to reduce clutter. Signed-off-by: Rob Clark <robdclark@chromium.org>
This commit is contained in:
parent
dd34ccb2c5
commit
ad92aa36ac
4 changed files with 24 additions and 0 deletions
|
|
@ -39,6 +39,9 @@ static const struct debug_named_value shader_debug_options[] = {
|
|||
{"optmsgs", IR3_DBG_OPTMSGS, "Enable optimizer debug messages"},
|
||||
{"forces2en", IR3_DBG_FORCES2EN, "Force s2en mode for tex sampler instructions"},
|
||||
{"nouboopt", IR3_DBG_NOUBOOPT, "Disable lowering UBO to uniform"},
|
||||
#ifdef DEBUG
|
||||
{"schedmsgs", IR3_DBG_SCHEDMSGS, "Enable scheduler debug messages"},
|
||||
#endif
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ enum ir3_shader_debug {
|
|||
IR3_DBG_OPTMSGS = 0x080,
|
||||
IR3_DBG_FORCES2EN = 0x100,
|
||||
IR3_DBG_NOUBOOPT = 0x200,
|
||||
IR3_DBG_SCHEDMSGS = 0x400,
|
||||
};
|
||||
|
||||
extern enum ir3_shader_debug ir3_shader_debug;
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ static void print_instr_name(struct ir3_instruction *instr, bool flags)
|
|||
printf("%04u:", instr->name);
|
||||
printf("%04u:", instr->ip);
|
||||
printf("%03d:", instr->depth);
|
||||
printf("%03u: ", instr->use_count);
|
||||
|
||||
if (flags) {
|
||||
printf("\t");
|
||||
|
|
|
|||
|
|
@ -28,6 +28,21 @@
|
|||
#include "util/u_math.h"
|
||||
|
||||
#include "ir3.h"
|
||||
#include "ir3_compiler.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
#define SCHED_DEBUG (ir3_shader_debug & IR3_DBG_SCHEDMSGS)
|
||||
#else
|
||||
#define SCHED_DEBUG 0
|
||||
#endif
|
||||
#define d(fmt, ...) do { if (SCHED_DEBUG) { \
|
||||
printf("SCHED: "fmt"\n", ##__VA_ARGS__); \
|
||||
} } while (0)
|
||||
|
||||
#define di(instr, fmt, ...) do { if (SCHED_DEBUG) { \
|
||||
printf("SCHED: "fmt": ", ##__VA_ARGS__); \
|
||||
ir3_print_instr(instr); \
|
||||
} } while (0)
|
||||
|
||||
/*
|
||||
* Instruction Scheduling:
|
||||
|
|
@ -214,6 +229,8 @@ schedule(struct ir3_sched_ctx *ctx, struct ir3_instruction *instr)
|
|||
|
||||
instr->flags |= IR3_INSTR_MARK;
|
||||
|
||||
di(instr, "schedule");
|
||||
|
||||
list_addtail(&instr->node, &instr->block->instr_list);
|
||||
ctx->scheduled = instr;
|
||||
|
||||
|
|
@ -812,6 +829,8 @@ sched_block(struct ir3_sched_ctx *ctx, struct ir3_block *block)
|
|||
if (instr) {
|
||||
unsigned delay = delay_calc(ctx->block, instr, false, false);
|
||||
|
||||
d("delay=%u", delay);
|
||||
|
||||
/* and if we run out of instructions that can be scheduled,
|
||||
* then it is time for nop's:
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue