Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds required flags to compile debug builds with LLVM Xray to allow profiling, controlled similarly to sanitizers in #35. With xray instrumentation, we can capture traces and use the
llvm-xray
tool to convert the output to different formats. See Agoric/agoric-sdk#7068 for context.To use (from agoric-sdk):
Each run of xsnap will print its PID and output:
==51498==XRay: Log file in 'xray-log.xsnap-worker.zUy3ve'
We can parse
xray-log.xsnap-worker.zUy3ve
withllvm-xray
:We can also output formats compatible with various tools, like Chrome Event Viewer/Perfetto (chrome://tracing) to visualize as flame graphs: