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>
This commit is contained in:
Rob Clark
2023-03-24 10:45:37 -07:00
committed by Marge Bot
parent c2194552e7
commit cacbbfd6a8
4 changed files with 14 additions and 0 deletions

View File

@@ -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 <inttypes.h>
/**
@@ -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);

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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)