-
Notifications
You must be signed in to change notification settings - Fork 561
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#6213,i#5490: Add drmemtrace branch targets up front (#6219)
The drmemtrace record type TRACE_TYPE_INSTR_CONDITIONAL_JUMP is now deprecated in offline traces where it is replaced by TRACE_TYPE_INSTR_TAKEN_JUMP and TRACE_TYPE_INSTR_UNTAKEN_JUMP. The version number is bumped to accomplish this. Indirect branches in drmemtrace traces now contain a marker holding the actual target (TRACE_MARKER_TYPE_BRANCH_TARGET), which immediately precedes the branch record. These changes are implemented inside raw2trace and in PT ir2trace. raw2trace tests are updated and new tests added. Special cases with new logic and tests include: + Rseq side exits must specially set whether taken or untaken + Rseq abort rollbacks to a branch are tested as this is the case where it was not easy to identify whether a branch was taken in the past (it required particular inferences). + Branches prior to signals. + Trace-final and window-final branches: we just delete these. Adds view support: ``` 2212815 1648444: 1249326 ifetch 6 byte(s) @ 0x00007f3406720707 48 3d 01 f0 ff ff cmp %rax, $0xfffff001 2212816 1648445: 1249326 ifetch 2 byte(s) @ 0x00007f340672070d 73 01 jnb $0x00007f3406720710 (untaken) 2212817 1648445: 1249326 <marker: indirect branch target 0x7f34066a8b37> 2212818 1648446: 1249326 ifetch 1 byte(s) @ 0x00007f340672070f c3 ret 2212819 1648446: 1249326 read 8 byte(s) @ 0x00007ffd91e24fa8 by PC 0x00007f340672070f 2212820 1648447: 1249326 ifetch 5 byte(s) @ 0x00007f34066a8b37 4c 8b 54 24 48 mov 0x48(%rsp), %r10 ``` Adds several new invariant checks and augments the existing PC continuity checks. This required a little refactoring to check branches before signals which is part of #5912. Unit tests for each case are added. Adds a couple of comments on issues that #5912 should address. Updates the documentation to remove the documented guarantee that branches are delayed. Updates the changelist. Issue: #5490, #6213, #5912 Fixes #6213 Fixes #5490
- Loading branch information
1 parent
4c773cf
commit 2220a83
Showing
17 changed files
with
1,137 additions
and
171 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.