summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Peter Kalauskas <peskal@google.com> 2024-10-23 13:47:45 -0700
committer Peter Kalauskas <peskal@google.com> 2024-10-23 13:47:45 -0700
commit1fc3eac3061a3efeb1153dd0828b3f6f0846eba5 (patch)
tree1f835fc95ef3fffc1ebca3640ff624ce3ac490d9
parentdf1450c581e6bbdde56961ca2f33c9399304b527 (diff)
Enable stack-walking for default coroutine names
If coroutine does not have a trace name, walk the stack to infer a name for it. Test: Capture trace, look for coroutine IDs Flag: com.android.systemui.coroutine_tracing Bug: 289353932 Change-Id: I9e04098e69d12cc06b4c1dd29528f760ffeb26f8
-rw-r--r--packages/SystemUI/src/com/android/systemui/coroutines/Tracing.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/coroutines/Tracing.kt b/packages/SystemUI/src/com/android/systemui/coroutines/Tracing.kt
index 5b1c9c8b8020..efbdf4d1533d 100644
--- a/packages/SystemUI/src/com/android/systemui/coroutines/Tracing.kt
+++ b/packages/SystemUI/src/com/android/systemui/coroutines/Tracing.kt
@@ -20,7 +20,7 @@ import com.android.app.tracing.coroutines.createCoroutineTracingContext
import kotlin.coroutines.CoroutineContext
fun newTracingContext(name: String): CoroutineContext {
- return createCoroutineTracingContext(name) { className ->
+ return createCoroutineTracingContext(name, walkStackForDefaultNames = true) { className ->
className.startsWith("com.android.systemui.util.kotlin.JavaAdapter") ||
className.startsWith("com.android.systemui.lifecycle.RepeatWhenAttached")
}