I was looking to add some tracing for some notable CPU-side events in Mesa, and thought percetto was probably the thing. But googling for perfetto sdk and using the first answer (https://perfetto.dev/docs/instrumentation/tracing-sdk) gave me something that wouldn't build:
../src/percetto.cc: In lambda function:
../src/percetto.cc:336:18: error: ‘class perfetto::protos::pbzero::TrackEvent’ has no member named ‘add_flow_ids’
336 | event->add_flow_ids(static_cast<uint64_t>(extra));
| ^~~~~~~~~~~~
../src/percetto.cc: In function ‘int percetto_init_with_args(std::size_t, percetto_category**, percetto_clock, const percetto_init_args*)’:
../src/percetto.cc:570:13: error: ‘struct perfetto::TracingInitArgs’ has no member named ‘shmem_batch_commits_duration_ms’
570 | init_args.shmem_batch_commits_duration_ms = GetEnvU32(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I was looking to add some tracing for some notable CPU-side events in Mesa, and thought percetto was probably the thing. But googling for perfetto sdk and using the first answer (https://perfetto.dev/docs/instrumentation/tracing-sdk) gave me something that wouldn't build: