util/perf: amend missing atrace_init

When perfetto isn't enabled, atrace can still be used freely on Android.
All trace micros have accounted for that, but the init is missed.

Cc: mesa-stable
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36655>
(cherry picked from commit e74516dbc7)
This commit is contained in:
Yiwei Zhang 2025-08-07 21:16:01 +00:00 committed by Eric Engestrom
parent c33cf960ce
commit 7812b11f9b
2 changed files with 6 additions and 1 deletions

View file

@ -5354,7 +5354,7 @@
"description": "util/perf: amend missing atrace_init",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -204,7 +204,12 @@ _mesa_trace_scope_end(UNUSED void **scope)
static inline void
util_cpu_trace_init()
{
#if defined(HAVE_PERFETTO)
util_perfetto_init();
#elif DETECT_OS_ANDROID && !defined(__cplusplus)
atrace_init();
#endif /* HAVE_PERFETTO */
util_gpuvis_init();
}