diff --git a/src/gallium/auxiliary/util/u_helpers.c b/src/gallium/auxiliary/util/u_helpers.c index c0b4d9406a5..2b535001540 100644 --- a/src/gallium/auxiliary/util/u_helpers.c +++ b/src/gallium/auxiliary/util/u_helpers.c @@ -32,6 +32,7 @@ #include "util/u_upload_mgr.h" #include "util/u_thread.h" #include "util/os_time.h" +#include "util/perf/cpu_trace.h" #include /** @@ -396,6 +397,8 @@ util_throttle_memory_usage(struct pipe_context *pipe, if (!t->max_mem_usage) return; + MESA_TRACE_FUNC(); + struct pipe_screen *screen = pipe->screen; struct pipe_fence_handle **fence = NULL; unsigned ring_size = ARRAY_SIZE(t->ring); 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)