-
Notifications
You must be signed in to change notification settings - Fork 566
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#5505 kernel tracing: Best effort pt2ir conversion (#6924)
Relaxes raw2trace error reporting to ignore errors during conversion of PT raw traces using libipt. This is enabled by -pt2ir_best_effort which is a default-false flag. We still keep the strict error reporting for the small unit tests. We have observed sporadic decoding issues raised by libipt which are not yet root-caused. These may be due to our own usage of perf_event_open to record PT data, or our use of libipt may not be robust enough to handle these errors. We keep counts of instructions that failed to decode, which then causes some 1-instr PC discontinuities in the decoded syscall trace. In these cases we are still able to produce the converted syscall trace albeit with the discontinuities. We also keep count of errors that caused total failure in conversion of some system call trace. In such cases we simply skip the trace for that syscall and continue raw2trace (seen mostly on futex-like syscalls). Overall, for a large app, we were still able to get >98% of the kernel syscall traces converted successfully. We will continue to debug and improve PT decoding stability to improve PT trace conversion issues in drmemtrace. Verified that the PT related tests continue to work on a system that supports the Intel-PT hardware feature: ``` The following tests passed: code_api|tool.drcacheoff.kernel.simple_SUDO code_api|tool.drcacheoff.kernel.opcode-mix_SUDO code_api|tool.drcacheoff.kernel.syscall-mix_SUDO code_api|tool.drcacheoff.kernel.invariant-checker_SUDO The following tests passed: code_api|client.drpttracer_SUDO-test ``` Issue: #5505
- Loading branch information
1 parent
4dfe3d9
commit 009c27b
Showing
7 changed files
with
165 additions
and
27 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.