trace_processor_shell not working with the captured trace
Hi, I use perfetto's bazel appoach (based on perfetto_cfg.bzl) to build perfetto targets. I can successfully capture traces and use https://ui.perfetto.dev/ to visualize them. However, when I tried to use trace_processor_shell to accelerate, it spit out a lot of errors like below and UI cannot visualize the trace either.
bazel run @perfetto//:trace_processor_shell -- --httpd "/tmp/good_trace.pftrace"
[libprotobuf ERROR external/com_google_protobuf/src/google/protobuf/descriptor.cc:4172] Invalid proto descriptor for file "protos/perfetto/metrics/android/ad_services_metric.proto":
[libprotobuf ERROR external/com_google_protobuf/src/google/protobuf/descriptor.cc:4175] protos/perfetto/metrics/android/ad_services_metric.proto: A file with this name is already in the pool.
...
What went wrong here? thx!
Is there a specific reason you are using the Bazel build? In general the Bazel build is only maintained for compatibility with other Google projects, it's not really designed to be built independently of them.
Please follow our docs on building trace processor and use GN to build instead.
Thanks for the reply, it just works nicer when using that approach in our env - easier to make any updates effective.
I'd strongly recommend avoid using Bazel for this. As I say, we use it for a very specific purpose and building arbitrary pieces of Perfetto is not one of them.
If you want to avoid building at all, you can use our scripts which download prebuilts. Instructions on this available at https://perfetto.dev/docs/quickstart/trace-analysis