ninjatracing
ninjatracing copied to clipboard
Ignore ill-formed trace events
I was using this tool against time traces generated in LLVM. The tool picked up a non-trace JSON file (tools/clang/lib/Tooling/ASTNodeAPI.json, in case you wonder) and bailed out with an exception. This patch fixes this issue by checking the format of the trace event JSON to make sure it has the 'traceEvents' field before moving on.