diff options
author | Rob Clark <robdclark@chromium.org> | 2023-03-24 10:45:37 -0700 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-03-30 19:42:01 +0000 |
commit | cacbbfd6a8f7fde95682bcc2003e8fa8e7bd6f6c (patch) | |
tree | 3165f656ca030303be5e280d82e50f12648d65ff /src/mesa | |
parent | c2194552e740d8afa1f7678f48f89984729b6146 (diff) | |
download | mesa-cacbbfd6a8f7fde95682bcc2003e8fa8e7bd6f6c.tar.gz |
mesa: Add a few more function traces
Sprinkle around a few more traces that were useful in locating fence
waits.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22098>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/syncobj.c | 3 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_flush.c | 5 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_manager.c | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c index 49d6b9a9dcd..91e15920026 100644 --- a/src/mesa/main/syncobj.c +++ b/src/mesa/main/syncobj.c @@ -65,6 +65,7 @@ #include "util/hash_table.h" #include "util/set.h" #include "util/u_memory.h" +#include "util/perf/cpu_trace.h" #include "syncobj.h" @@ -122,6 +123,8 @@ __client_wait_sync(struct gl_context *ctx, struct pipe_screen *screen = pipe->screen; struct pipe_fence_handle *fence = NULL; + MESA_TRACE_FUNC(); + /* If the fence doesn't exist, assume it's signalled. */ simple_mtx_lock(&obj->mutex); if (!obj->fence) { diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c index 0c7effccbd8..ab53055e3c2 100644 --- a/src/mesa/state_tracker/st_cb_flush.c +++ b/src/mesa/state_tracker/st_cb_flush.c @@ -44,6 +44,7 @@ #include "pipe/p_defines.h" #include "pipe/p_screen.h" #include "util/u_gen_mipmap.h" +#include "util/perf/cpu_trace.h" void @@ -51,6 +52,8 @@ st_flush(struct st_context *st, struct pipe_fence_handle **fence, unsigned flags) { + MESA_TRACE_FUNC(); + /* We want to call this function periodically. * Typically, it has nothing to do so it shouldn't be expensive. */ @@ -69,6 +72,8 @@ st_finish(struct st_context *st) { struct pipe_fence_handle *fence = NULL; + MESA_TRACE_FUNC(); + st_flush(st, &fence, PIPE_FLUSH_ASYNC | PIPE_FLUSH_HINT_FINISH); if (fence) { diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index a878bad2586..6d7c90e17c1 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -62,6 +62,7 @@ #include "util/u_surface.h" #include "util/list.h" #include "util/u_memory.h" +#include "util/perf/cpu_trace.h" struct hash_table; @@ -801,6 +802,8 @@ st_context_flush(struct st_context *st, unsigned flags, { unsigned pipe_flags = 0; + MESA_TRACE_FUNC(); + if (flags & ST_FLUSH_END_OF_FRAME) pipe_flags |= PIPE_FLUSH_END_OF_FRAME; if (flags & ST_FLUSH_FENCE_FD) |