-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i#5505 kernel tracing: Add syscall instr encodings #6479
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adds encodings for kernel system call instructions to the trace in raw2trace. Kernel system call traces are decoded using libipt which also provides the instruction encodings. We write these encodings to a new buffer which is re-used for all dynamic instances of that instr. Adds a new drcachesim option to ignore failures in decoding instructions. This is currently required because the kernel traces have opcodes that are not yet recognized. Such decode failures are not critical because their impact is limited (not counting unsupported instrs in the opcode_mix tool, or not showing unsupported instrs in the view tool) unlike user-space instrs where missing decoder support may lead to drreg issues etc. Uses the new option in opcode_mix and the view tool. Adds support in the syscall_mix tool to report the counts of each system call's trace also. Issue: #5505
abhinav92003
commented
Nov 28, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this new option: seems we should just update the decoder. Also confused about the need for 3rd copy of the encodings.
abhinav92003
commented
Nov 30, 2023
derekbruening
approved these changes
Nov 30, 2023
x86-32 failures are #6417. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds encodings for kernel system call instructions to the trace in raw2trace. Kernel system call traces are decoded using libipt which also provides the instruction encodings. We add support to drir_t to write these encodings to a new buffer which is re-used for all dynamic instances of that instr even across multiple system call traces.
Fixes taken/not-taken detection for conditional branches in the syscall trace.
Adds support in the syscall_mix tool to report the counts of each system call's traces also. Adds sysnum to system call trace start and end markers to achieve this.
Ran all Intel-PT tests locally:
Found some flakiness due to #6486 in local runs of the kernel sudo tests, which will be addressed separately.
Issue: #5505