How to regenerate the SDK files
Hi,
I add some proto files and logic codes locally, how to regenrate perfetto sdk files: sdk/perfetto.h and perfetto.cc. I'd like to add a custom proto format and parsing logic, use Perfetto to parse and display it, and regenerate the Perfetto SDK files. Do you have any documentation on this?
To regenerate sdk/perfetto.h and sdk/perfetto.cc after adding custom proto files run tools/gen_amalgamated --output sdk/perfetto
This script amalgamates all SDK sources and proto-generated code into the single-file SDK.
Note: The SDK regeneration only handles emitting custom events. Parsing and displaying them in the UI might require additional Trace Processor and UI changes.
Parsing and displaying them in the UI might require additional Trace Processor and UI changes.
If this ends up being necessary, we should really figure out a mechanism based on reserved proto field ranges + https://github.com/google/perfetto/discussions/3227 to make it possible to parse these protos without us knowing about them without needing to make downstream changes.
works, very thanks.