Hi cfe-dev@ and llvm-dev@,
I've attached a Chrome trace-viewer readable trace of a clang built with XRay instrumentation (additional build/link flags="-fxray-instrument -fxray-instruction-threshold=75") with the latest "top-of-trunk" version of clang with the recent updates to the XRay runtime supporting record filtering.
To load the attached file, go to 'chrome://tracing' in your Chrome/Chromium browser and load the .gz file directly. Pressing '?' should give a help dialog.
As a snapshot of what it looks like for reference:
clang-6.0-default-real.txt.gz (628 KB)
This is an interesting feature. Is it designed to accept arbitrary xray
trace logs or only ones for/from Chrome/ium?
Yes, it works on any XRay trace generated with the logging implementations that come with XRay in compiler-rt.
“The caveat is, while the tool (llvm-xray convert) can generate arbitrarily large Chrome-loadable traces, the Chrome trace viewer can only handle so much data.”
A tool like Trace Compass could help here, it does scale pretty well. (see tracecompass.org)
I’m replying here so a colleague who just suscribed to the mailing list can reply here.
Sweet stuff! Thanks for sharing this, Marc-André!
It seems like Trace Compass can already handle CTF. I suspect if we implemented a converter to CTF, that we can turn XRay traces into something that can be visualised with this. That, or have Trace Compass load XRay traces natively.
I believe Trace Compass can read the “Trace event format” natively, but I’ll let me colleague comment on this (I forgot to CC the cfe-dev so he could not reply).