Flow events are super-useful for visualizing the connections between asynchronous events.
{
"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"
}
]
}
# 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
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.jsonflow.systraceHere 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.