Open nslingerland opened 4 years ago
Flow events are super-useful for visualizing the connections between asynchronous events.
Catapult is able to show these for JSON Trace Event Format data:
flow.json
{ "traceEvents": [ { "cat": "", "pid": 15903, "tid": 15904, "ts": 2000.000000, "ph": "B", "name": "SenderB" }, { "cat": "", "pid": 15903, "tid": 15904, "ts": 2000.201000, "ph": "s", "name": "IPC", "id":"8780d403" }, { "cat": "", "pid": 15903, "tid": 15904, "ts": 2000.900000, "ph": "E" }, { "cat": "", "pid": 15875, "tid": 15895, "ts": 2001.400000, "ph": "f", "name": "IPC", "id": "8780d403" }, { "cat": "", "pid": 15875, "tid": 15895, "ts": 2001.400000, "ph": "B", "name": "Blergh" }, { "cat": "", "pid": 15875, "tid": 15895, "ts": 2001.800000, "ph": "E" } ] }
flow.systrace
Here is an equivalent systrace:
# tracer: nop thread1-15904 [000] ...1 2000.000000: tracing_mark_write: B|15903|SenderB thread1-15904 [000] ...1 2000.201000: tracing_mark_write: s|15903|IPC|8780d403 thread1-15904 [000] ...1 2000.900000: tracing_mark_write: E thread2-15895 [000] ...1 2001.400000: tracing_mark_write: f|15875|IPC|8780d403 thread2-15895 [000] ...1 2001.400000: tracing_mark_write: B|15875|Blergh thread2-15895 [000] ...1 2001.800000: tracing_mark_write: E
-> the flow arrows are not shown
Looking at the Catapult source code for parsing the reason for this is clear:
https://github.com/catapult-project/catapult/blob/master/tracing/tracing/extras/importer/linux_perf/android_parser.html#L103
https://github.com/catapult-project/catapult/blob/master/tracing/tracing/extras/importer/trace_event_importer.html#L1292
Flow events are {s,f,t} Note that the Android systrace importer only handles {B,E,C,S,F} events. It ignores anything else.
{s,f,t}
{B,E,C,S,F}
Flow events are super-useful for visualizing the connections between asynchronous events.
Catapult is able to show these for JSON Trace Event Format data:
flow.json
flow.systrace
Here is an equivalent systrace:
-> the flow arrows are not shown
Looking at the Catapult source code for parsing the reason for this is clear:
Android systrace
https://github.com/catapult-project/catapult/blob/master/tracing/tracing/extras/importer/linux_perf/android_parser.html#L103
Chrome trace
https://github.com/catapult-project/catapult/blob/master/tracing/tracing/extras/importer/trace_event_importer.html#L1292
Flow events are
{s,f,t}
Note that the Android systrace importer only handles{B,E,C,S,F}
events. It ignores anything else.