Closed wangjiyang closed 3 months ago
Combining custom data sources with https://perfetto.dev/docs/reference/synthetic-track-event is very much, not a recommended way to use Perfetto. A lot of the fields in those protos are set automatically if you use the SDK and so what you're writing on your side is almost certainly being ignored or changed by the tracing service and the SDK
You can confirm this by changing your trace to proto text (https://perfetto.dev/docs/quickstart/traceconv) and seeing what the final protos look like.
Any reason why you cannot just use the track_event macros instead in the custom data source?
Thanks. Issue resolved by correcting child track_descriptor.
// auto thread = track_descriptor->set_thread(); // not working.
...
auto counter = track_descriptor->set_counter(); // use this one
Hi, I am writting a custom perfetto datasource according to https://perfetto.dev/docs/instrumentation/tracing-sdk#custom-data-sources. Payload data I wrote to this custom data source is actually track events according to https://perfetto.dev/docs/reference/synthetic-track-event.
Everything seems ok and it seems perfetto can successfully generate trace, with my following perfetto cmdline. Howevere, perfetto UI shows empty track counters. I also tried AutoPush release channel, which turns out to be displaying a empty clock_snapshot line.
Trace file attached, please unzip it and have a try. trace.zip
Could you help me to have a check?
Thanks