From cbb5280a005b4fabeba20aa8025adcbdd105c5d0 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Wed, 9 Jun 2021 10:11:05 -0700 Subject: [PATCH] freedreno: Add tid to DBG() msgs I keep hacking this up locally when debugging TC sort of issues. Which is maybe a sign that we should just add this upstream. Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/freedreno/freedreno_util.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h index 66d7f31435f..97e0e3aff9c 100644 --- a/src/gallium/drivers/freedreno/freedreno_util.h +++ b/src/gallium/drivers/freedreno/freedreno_util.h @@ -104,10 +104,14 @@ extern bool fd_binning_enabled; #define FD_DBG(category) unlikely(fd_mesa_debug &FD_DBG_##category) +#include +#include + #define DBG(fmt, ...) \ do { \ if (FD_DBG(MSGS)) \ - mesa_logd("%s:%d: " fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__); \ + mesa_logd("%5d: %s:%d: " fmt, gettid(), __FUNCTION__, __LINE__, \ + ##__VA_ARGS__); \ } while (0) #define perf_debug_ctx(ctx, ...) \