common/utrace: Rename `u_trace_context_actively_tracing` to `u_trace_should_process`
authorMark Collins <mark@igalia.com>
Thu, 20 Oct 2022 12:13:51 +0000 (12:13 +0000)
committerMarge Bot <emma+marge@anholt.net>
Fri, 11 Nov 2022 13:50:56 +0000 (13:50 +0000)
Signed-off-by: Mark Collins <mark@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Ack-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18271>

src/freedreno/vulkan/tu_drm.c
src/gallium/drivers/iris/iris_batch.c
src/intel/ds/intel_driver_ds.cc
src/intel/vulkan/anv_utrace.c
src/intel/vulkan_hasvk/anv_utrace.c
src/util/perf/u_trace.h

index 9a57c66449226050f708bd060e5e6cc01c35271d..872df710a82566a29d716c6f799d11de09c9b58f 100644 (file)
@@ -974,7 +974,7 @@ tu_queue_submit_create_locked(struct tu_queue *queue,
 {
    VkResult result;
 
-   bool u_trace_enabled = u_trace_context_actively_tracing(&queue->device->trace_context);
+   bool u_trace_enabled = u_trace_should_process(&queue->device->trace_context);
    bool has_trace_points = false;
 
    struct vk_command_buffer **vk_cmd_buffers = vk_submit->command_buffers;
index 850d008f56ddbd2fd69f3a7d207efbb2af9b9245..42451b28140350c41b203a44701db5e46c54216a 100644 (file)
@@ -1088,7 +1088,7 @@ _iris_batch_flush(struct iris_batch *batch, const char *file, int line)
       iris_bo_wait_rendering(batch->bo); /* if execbuf failed; this is a nop */
    }
 
-   if (u_trace_context_actively_tracing(&ice->ds.trace_context))
+   if (u_trace_should_process(&ice->ds.trace_context))
       iris_utrace_flush(batch, submission_id);
 
    /* Start a new batch buffer. */
index 344e7ed214521f062643f1b6028d8c111063fd93..5360157f6e3a2e8281a2a6f539fe8c4a221fd9f7 100644 (file)
@@ -452,7 +452,7 @@ void
 intel_ds_end_submit(struct intel_ds_queue *queue,
                     uint64_t start_ts)
 {
-   if (!u_trace_context_actively_tracing(&queue->device->trace_context)) {
+   if (!u_trace_should_process(&queue->device->trace_context)) {
       queue->device->sync_gpu_ts = 0;
       queue->device->next_clock_sync_ns = 0;
       return;
index 81f46e542c3990d1c439ab115f3a27f7d091f5bf..898c9180541103fe93ba04f15526452c6bd29f60 100644 (file)
@@ -31,7 +31,7 @@ command_buffers_count_utraces(struct anv_device *device,
                               struct anv_cmd_buffer **cmd_buffers,
                               uint32_t *utrace_copies)
 {
-   if (!u_trace_context_actively_tracing(&device->ds.trace_context))
+   if (!u_trace_should_process(&device->ds.trace_context))
       return 0;
 
    uint32_t utraces = 0;
index 81f46e542c3990d1c439ab115f3a27f7d091f5bf..898c9180541103fe93ba04f15526452c6bd29f60 100644 (file)
@@ -31,7 +31,7 @@ command_buffers_count_utraces(struct anv_device *device,
                               struct anv_cmd_buffer **cmd_buffers,
                               uint32_t *utrace_copies)
 {
-   if (!u_trace_context_actively_tracing(&device->ds.trace_context))
+   if (!u_trace_should_process(&device->ds.trace_context))
       return 0;
 
    uint32_t utraces = 0;
index 1f9e99ee392f47d984bf0f691d6abb8ff8d87ac4..a8c6d2f030683e8957700e9db7e21338195dae1b 100644 (file)
@@ -318,8 +318,11 @@ u_trace_enabled(struct u_trace_context *utctx) {
    return p_atomic_read_relaxed(&utctx->enabled_traces) != 0;
 }
 
+/**
+ * Return whether chunks should be processed or not.
+ */
 static ALWAYS_INLINE bool
-u_trace_context_actively_tracing(struct u_trace_context *utctx) {
+u_trace_should_process(struct u_trace_context *utctx) {
    return p_atomic_read_relaxed(&utctx->enabled_traces) & U_TRACE_TYPE_REQUIRE_PROCESSING;
 }