common/utrace: Rename u_trace_context_actively_tracing to u_trace_should_process

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>
This commit is contained in:
Mark Collins 2022-10-20 12:13:51 +00:00 committed by Marge Bot
parent 18e820009d
commit 086b50078d
6 changed files with 9 additions and 6 deletions

View 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;

View 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. */

View 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;

View 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;

View 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;

View 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;
}