• Peter Marshall's avatar
    [tracing] Use ChromeTracePacket to save binary size with perfetto · 76f85199
    Peter Marshall authored
    Previously, compiling with perfetto would add 2.3 MiB to the d8 release
    binary. With this change it's 472 KiB.
    
    This is because trace:lite pulls in many more compiled proto classes
    than we need, e.g. a bunch of stuff under ftrace/ which is only used
    on Android.
    
    Chrome uses a 'mirror proto' ChromeTrackPacket to only provide
    compiled protos for the types of packets it will actually see, which on
    non-android devices does not include anything under ftrace/.
    
    We use the same trick here in the JSON consumer.
    
    Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
    Bug: v8:8339
    Change-Id: Iae1f74eec3bd93b18e9f069701fc016440d3ce5e
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1619759
    Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Auto-Submit: Peter Marshall <petermarshall@chromium.org>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#61662}
    76f85199
perfetto-json-consumer.cc 5.96 KB