Commit 914cabb
Enable Perfetto by default for Android dev builds
Summary:
Perfetto tracing in `reactperflogger` previously required an explicit build
modifier to turn on, so ordinary Android development builds never had it.
Introduce a shared `if_perfetto(on, off)` helper (`reactperflogger/DEFS.bzl`)
that derives the Perfetto decision from build configuration: on by default for
non-optimized Android builds, while optimized builds still require the explicit
`perfetto` constraint so tracing stays out of release binaries. arvr/Horizon
builds opt out of the default via `hz_tracing:perfetto-enable` — the same signal
reactperflogger already keys on — because those builds manage Perfetto through
their own stack and resolve it at the final binary, so a standalone RN `.so`
compiling `WITH_PERFETTO` there fails to link. An explicit `perfetto` constraint
still wins there, and reactperflogger then takes that stack's SDK rather than
its own copy.
The Android `BuildConfig.ENABLE_PERFETTO` runtime gate and the other native
Perfetto consumers are routed through the same helper so the default is
consistent end-to-end. The now-orphaned `enable_perfetto` config_setting is
removed.
`-DWITH_FBSYSTRACE=1` is dropped from the tracing JNI target's own
`preprocessor_flags`. No translation unit in that target reads it, and
reactperflogger already exports exactly one of `WITH_PERFETTO` /
`WITH_FBSYSTRACE`; hardcoding the second one locally would break that
mutual exclusion once Perfetto is on by default.
Changelog:
[Internal]
Reviewed By: mdvacca
Differential Revision: D114210766
fbshipit-source-id: 4092c3e3282d035101f3a35bb8c1da89633f2bc21 parent e2a4c68 commit 914cabb
1 file changed
Lines changed: 2 additions & 0 deletions
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
| |||
0 commit comments