commit | 2d79020309403410ba8cb7978a1ee39810950432 | [log] [tgz] |
---|---|---|
author | Sami Kyostila <skyostil@chromium.org> | Sat May 08 01:47:55 2021 +0000 |
committer | Sami Kyostila <skyostil@chromium.org> | Sat May 08 01:47:55 2021 +0000 |
tree | 6decdeebc0395084b6500432c99a54ff7de0406d | |
parent | 5dfd4bdd5b10dc62ae2c6d021573bb889efaf056 [diff] |
tracing: Disallow trace events during TLS teardown Don't attempt to write trace events when TLS data for a thread is being deallocated. Otherwise this may lead into unexpected re-entrancy. An example scenario from Chrome: 1. ~TracingTLS causes an active trace writer to be destroyed. 2. The trace writer posts a task to return chunks to the service. 3. While the task is being posted, the task runner support code in Chrome hits a trace event, which creates a new trace writer. 4. The trace writer creation causes another task to be posted, causing a crash due to task runner re-entrancy. Bug: 180295966 Change-Id: Id8c473520b88b62e11812beb80a076699a6df244
Perfetto is a production-grade open-source stack for performance instrumentation and trace analysis. It offers services and libraries and for recording system-level and app-level traces, native + java heap profiling, a library for analyzing traces using SQL and a web-based UI to visualize and explore multi-GB traces.
See https://perfetto.dev/docs or the /docs/ directory for documentation.