Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c103245 authored by Ryan Savitski's avatar Ryan Savitski
Browse files

atrace: speculative fix for missing ATRACE_TAG_APP events

If an app is started after a tracing session sets up the atrace-related
sysprops, the app no longer tries to match its updated cmdline against
the sysprops due to [1]. This was previously done as a result of an
explicit call to android_os_Trace_nativeSetAppTracingAllowed from
ActivityThread[2]. See b/331916606 for further context.

Temporarily fix-forward by restoring the load-bearing
atrace_update_tags() call. It should be fine to call unconditionally
since it's already being called at arbitrary times via a sysprop changed
callback[3].

[1] https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/25382934/20/core/jni/android_os_Trace.cpp#b109
[2] https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/java/android/app/ActivityThread.java;l=7163;drc=34f19d0df0181806d60f46df2558218ad0280fad
[3] https://cs.android.com/android/platform/superproject/main/+/main:system/core/libutils/Trace.cpp;l=23;drc=22dbf3947fedf988e714a4703ddf85fc41413f90

Tested: no
Fixes: 8a625b66 (Use libtracing_perfetto for Trace.java calls)
Bug: 331916606
Bug: 303199244
Change-Id: I26a21442147e81cb21bd3678ea3ef48fcee6280f
parent 9e71ab06
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment