commit | f43e650a081bfab4cd11bbd7e5b91e006f8fbe78 | [log] [tgz] |
---|---|---|
author | Sami Kyostila <skyostil@chromium.org> | Wed Jan 06 14:18:49 2021 +0000 |
committer | Sami Kyostila <skyostil@chromium.org> | Wed Jan 06 14:18:49 2021 +0000 |
tree | a4c75774580c70f554f69adf2c22bd8ca46bb46a | |
parent | 1bc10c6601b62f36de89895a260d8d543c2f0496 [diff] |
sdk: Make the tracing SDK compatible with MSVC This patch makes the tracing SDK compile with MSVC. The main changes are: 1) Working around an issue in the track event trace point where a constexpr variable incorrectly loses its constexpr-ness when accessed from a lambda. 2) Enabling "standards-compliant" mode with /permissive- to enable a fix for a recently addressed compiler bug[1] with explicit template member instantiation. 3) Working around another compiler bug[2] with thread_local template member instantiation. This bug has yet to be addressed, but the workaround doesn't appear to have adverse side-effects as long as PERFETTO_DECLARE_DATA_SOURCE_STATIC_MEMBERS and PERFETTO_DEFINE_DATA_SOURCE_STATIC_MEMBERS are used consistently. The minimum supported compiler version is Visual Studio 2019 v16.5. Bug: 174454879 [1] https://developercommunity.visualstudio.com/content/problem/319447/explicit-specialization-of-static-data-member-inco.html [2] https://developercommunity2.visualstudio.com/t/Unable-to-specialize-static-thread_local/130268 Change-Id: I6270e9646e7f02f0d4c881b8d6634c606e981bb0
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.