From b49dc593b8221f9efcd59d89563639202a615ce1 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Sun, 20 Nov 2022 13:48:59 +0000 Subject: [PATCH] u/pacing: Use U_TRACE_PERFETTO define --- src/xrt/auxiliary/util/u_pacing_app.c | 3 +-- src/xrt/auxiliary/util/u_pacing_compositor.c | 2 ++ src/xrt/auxiliary/util/u_pacing_compositor_fake.c | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/xrt/auxiliary/util/u_pacing_app.c b/src/xrt/auxiliary/util/u_pacing_app.c index ca125c2a7..1ea358c63 100644 --- a/src/xrt/auxiliary/util/u_pacing_app.c +++ b/src/xrt/auxiliary/util/u_pacing_app.c @@ -250,8 +250,7 @@ predict_display_time(const struct pacing_app *pa, uint64_t now_ns, uint64_t peri static void do_tracing(struct pacing_app *pa, struct u_pa_frame *f) { - // Trace the data. -#ifdef XRT_FEATURE_TRACING +#ifdef U_TRACE_PERCETTO // Uses Percetto specific things. if (!U_TRACE_CATEGORY_IS_ENABLED(timing)) { return; } diff --git a/src/xrt/auxiliary/util/u_pacing_compositor.c b/src/xrt/auxiliary/util/u_pacing_compositor.c index 4f6b224b8..32b4cd2b9 100644 --- a/src/xrt/auxiliary/util/u_pacing_compositor.c +++ b/src/xrt/auxiliary/util/u_pacing_compositor.c @@ -402,6 +402,7 @@ adjust_comp_time(struct pacing_compositor *pc, struct frame *f) static void do_tracing(struct pacing_compositor *pc, struct frame *f) { +#ifdef U_TRACE_PERCETTO // Uses Percetto specific things. if (!U_TRACE_CATEGORY_IS_ENABLED(timing)) { return; } @@ -512,6 +513,7 @@ do_tracing(struct pacing_compositor *pc, struct frame *f) #undef TE_BEG #undef TE_END +#endif } diff --git a/src/xrt/auxiliary/util/u_pacing_compositor_fake.c b/src/xrt/auxiliary/util/u_pacing_compositor_fake.c index 3a16d1477..6f60794a3 100644 --- a/src/xrt/auxiliary/util/u_pacing_compositor_fake.c +++ b/src/xrt/auxiliary/util/u_pacing_compositor_fake.c @@ -156,6 +156,7 @@ static void pc_info_gpu( struct u_pacing_compositor *upc, int64_t frame_id, uint64_t gpu_start_ns, uint64_t gpu_end_ns, uint64_t when_ns) { +#ifdef U_TRACE_PERCETTO // Uses Percetto specific things. if (U_TRACE_CATEGORY_IS_ENABLED(timing)) { #define TE_BEG(TRACK, TIME, NAME) U_TRACE_EVENT_BEGIN_ON_TRACK_DATA(timing, TRACK, TIME, NAME, PERCETTO_I(frame_id)) #define TE_END(TRACK, TIME) U_TRACE_EVENT_END_ON_TRACK(timing, TRACK, TIME) @@ -166,6 +167,7 @@ pc_info_gpu( #undef TE_BEG #undef TE_END } +#endif } static void