freedreno: Add perf_warn() trace helper
Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8659>
This commit is contained in:
parent
d548d781ee
commit
a065682f30
|
@ -72,7 +72,7 @@ static const struct debug_named_value fd_debug_options[] = {
|
|||
{"noscis", FD_DBG_NOSCIS, "Disable scissor optimization"},
|
||||
{"direct", FD_DBG_DIRECT, "Force inline (SS_DIRECT) state loads"},
|
||||
{"nobypass", FD_DBG_NOBYPASS, "Disable GMEM bypass"},
|
||||
/* BIT(7) */
|
||||
{"perf", FD_DBG_PERF, "Enable performance warnings"},
|
||||
{"nobin", FD_DBG_NOBIN, "Disable hw binning"},
|
||||
{"nogmem", FD_DBG_NOGMEM, "Disable GMEM rendering (bypass only)"},
|
||||
/* BIT(10) */
|
||||
|
|
|
@ -68,7 +68,7 @@ enum fd_debug_flag {
|
|||
FD_DBG_NOSCIS = BITFIELD_BIT(4),
|
||||
FD_DBG_DIRECT = BITFIELD_BIT(5),
|
||||
FD_DBG_NOBYPASS = BITFIELD_BIT(6),
|
||||
/* BIT(7) */
|
||||
FD_DBG_PERF = BITFIELD_BIT(7),
|
||||
FD_DBG_NOBIN = BITFIELD_BIT(8),
|
||||
FD_DBG_NOGMEM = BITFIELD_BIT(9),
|
||||
/* BIT(10) */
|
||||
|
@ -100,6 +100,16 @@ extern bool fd_binning_enabled;
|
|||
mesa_logd("%s:%d: "fmt, \
|
||||
__FUNCTION__, __LINE__, ##__VA_ARGS__); } while (0)
|
||||
|
||||
#define perf_debug_ctx(ctx, ...) do { \
|
||||
perf_warn(__VA_ARGS__); \
|
||||
pipe_debug_message(&(ctx)->debug, PERF_INFO, __VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
#define perf_debug(...) do { \
|
||||
if (unlikely(fd_mesa_debug & FD_DBG_PERF)) \
|
||||
mesa_logw(__VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
/* for conditionally setting boolean flag(s): */
|
||||
#define COND(bool, val) ((bool) ? (val) : 0)
|
||||
|
||||
|
|
Loading…
Reference in New Issue