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

Commit 176736ca authored by Mohamad Mahmoud's avatar Mohamad Mahmoud
Browse files

Introduce LongMethodTracer: signal-based method tracing utility

Adds a new utility (LongMethodTracer) to trigger method tracing in native processes via signal, as part of the pre-ANR tracing mechanism.

- Adds LongMethodTracer class in Java, providing APIs to trigger tracing for one or multiple processes.
- Implements JNI bindings for LongMethodTracer, handling signal delivery using sigqueue with packed payloads.
- Introduces a type-tagging convention in sigval to differentiate tracing requests (LONG_METHOD_TRACING_TYPE_ID).

This utility abstracts the signal-based tracing trigger, enabling lightweight integration for pre-ANR diagnostics.

Test: ran multiple scenarios and  verified signal delivery and tracing manually
Bug: 413119509
Flag: com.android.server.utils.long_method_trace
Design Document: go/long-method-tracing-for-anrs

Change-Id: I545e2724cec3db5bed1fc884700ac2338e1ccec9
parent 6f1f1631
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