Added warnings to -callgraph-mode
and added option for stitched LBR.
#228
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 feature has two changes related to
callgraph_mode
.-callgraph-mode
defaults to eitherDwarf
orLast_branch_record
to notify the user of potential drawbacks from such selection. These warnings only show if they do not explicitly set the flag.Last_branch_record { stitched = true }
which callsperf report --call-graph lbr
andperf script --stitch-lbr
. There are a few design decisions here though. First I decided to add it as a variant ofCallgraph_mode
for simplicity of interface for the user. However this has the awkward effect of this now being a parameter needed for both decoding and recording (whichBackend_intf
doesn't support). I would think this could perhaps be useful in other scenarios and so instead of pulling this out totrace.ml
I decided to add a way fordecode_events
to have access to aRecording.Data.t
record. Open to alternative ideas though.I also added a wiki page to document the options for
-callgraph-mode
. This is not in the PR, but here is the link to the wiki repo: https://github.com/Lamoreauxaj/magic-trace.wiki.git. See this page. If this PR is merged, this wiki page would need to be merged too (I referenced it in the cli help documentation). And since I referenced it, the domain would need to redirect to the wiki page.