olvaffe / percetto

Apache License 2.0
19 stars 10 forks source link

Document where to get a perfetto sdk for this library #12

Closed anholt closed 3 years ago

anholt commented 3 years ago

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(
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
batesj commented 3 years ago

Fixed this, let me know if that helps.