Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catapult json import with name: "" seems to break Perfetto #623

Closed
alecazam opened this issue Nov 5, 2023 · 3 comments
Closed

Catapult json import with name: "" seems to break Perfetto #623

alecazam opened this issue Nov 5, 2023 · 3 comments

Comments

@alecazam
Copy link

alecazam commented Nov 5, 2023

I had several empty string named json blobs in Perfetto, and these seem to break Perfetto. These are displayed as [null] and various error dialogs appear. This meant I had to specify some non-empty string for every block.

And since Perfetto doesn't define a json format of it's own, deprecating the json doesn't seem like a great idea. I'm writing this json from Python, so can't call through to protobuf based api easily.

{
"displayTimeUnit": "ns",
"systemTraceEvents": "SystemTraceData",
"traceEvents": [
{
"name": "thread_name",
"ph": "M",
"tid": 0,
"args": {
"name": "T0 block0 0"
}
},
{
"name": "",
"ph": "X",
"ts": 0,
"dur": 65536,
"tid": 0,
"cat": "TT"
}
]
}
@LalitMaganti
Copy link
Collaborator

Please see #622 (comment).

@alecazam
Copy link
Author

alecazam commented Nov 6, 2023

This is pretty basic support to fail on this case. I see the importer setting these on empty string in the source. But then the rest of Perfetto seems to fail handling that null string id.

https://github.com/google/perfetto/blob/master/src/trace_processor/importers/json/json_trace_parser.cc, line 112

StringId name_id = name.empty() ? kNullStringId : storage->InternString(name);

@LalitMaganti
Copy link
Collaborator

https://r.android.com/2817378 fixes.

ALevansSamsung added a commit to eclipsesource/perfetto that referenced this issue Nov 8, 2023
* Give Null Summary Track's names for comparison

* Prioritize ID compare
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants