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 57c2b606d5
commit 89178e11b6
2 changed files with 6 additions and 1 deletions

View file

@ -2114,7 +2114,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

@ -175,7 +175,12 @@ _mesa_trace_scope_end(UNUSED int *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();
}