inline void
trace_framebuffer_state(struct u_trace *ut, void *cs, const struct pipe_framebuffer_state *pfb)
{
- if (likely(!ut->enabled))
+ if (likely(!(ut_trace_instrument || ut_perfetto_enabled)))
return;
trace_framebuffer(ut, cs, pfb);
tracefile = stdout;
}
- ut_trace_instrument = debug_get_option_trace_instrument();
+ ut_trace_instrument = tracefile || debug_get_option_trace_instrument();
firsttime = false;
}
{
ut->utctx = utctx;
list_inithead(&ut->trace_chunks);
- ut->enabled = u_trace_context_instrumenting(utctx);
}
void
struct u_trace_context *utctx;
struct list_head trace_chunks; /* list of unflushed trace chunks in fifo order */
-
- bool enabled;
};
void u_trace_context_init(struct u_trace_context *utctx,
return !!utctx->out || (ut_perfetto_enabled > 0);
}
-static inline bool
-u_trace_context_instrumenting(struct u_trace_context *utctx)
-{
- return !!utctx->out || ut_trace_instrument || (ut_perfetto_enabled > 0);
-}
-
#ifdef __cplusplus
}
#endif
% endfor
) {
% if trace.tp_perfetto is not None:
- if (!unlikely((ut->enabled || ut_trace_instrument || ut_perfetto_enabled) &&
+ if (!unlikely((ut_trace_instrument || ut_perfetto_enabled) &&
${trace.enabled_expr(trace_toggle_name)}))
% else:
- if (!unlikely((ut->enabled || ut_trace_instrument) &&
+ if (!unlikely(ut_trace_instrument &&
${trace.enabled_expr(trace_toggle_name)}))
% endif
return;