-
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
add trace support for AArch64 #2974
Comments
Hi I am working on a project to add trace support for AArch64, I am wondering if you have any suggestions on what would be a good starting point? |
Have a look at the draft patch #2442 and see if it can be updated to the latest master. |
Hi, I am planning to submit a patch to add trace support for AArch64, but I am not yet a member of DynamoRIO, shall I submit a few small patches by forking the repo before asking to be added as the member? |
There's no need to fork, I've added you as a contributor. You should receive an invite message from GitHub. |
…part of support This patch incorporated changes from patch #2442, and fixed some corner cases where the assumption was incorrect and caused the program to crash. Trace support is not yet enabled by default, but can be enabled with "-enable_traces". A large part of this work was based on work done by Kevin Zhou. Please see branch i1569-trace and patch #2442 for the original version. Issues: #1569, #2974
…part of support This patch incorporated changes from patch #2442, and fixed some corner cases where the assumption was incorrect and caused the program to crash. Trace support is not yet enabled by default, but can be enabled with "-enable_traces". A large part of this work was based on work done by Kevin Zhou. Please see branch i1569-trace and patch #2442 for the original version. Issues: #1569, #2974
Documenting a proposal that eliminates the internal control flow of fixup sequences, which break the linear assumptions of translation: One proposal is to change the i.b. comparison to use x2 instead of x0 as the temp reg holding the expected target immediate. Then the only thing missing is copying from the actual target reg into x2, and maybe that could be done locally. It would use a taken forward branch on the match which maybe is not ideal but certainly simple:
Then we eliminate this special-case trace_exit_label. (If jump_target == x2 then a different scheme needs to be used -- might require 2 spills b/c we want to put the app value in the x2 slot and have a local scratch.) |
linear control flow Currently fixup_indirect_trace_exit adds a special trace_exit_label that breaks the linear control flow which is assumed by many places in the code. We need to consider an alternative scheme to avoid this problem or add special support for the trace_exit_label. Also reverted changes on incorrect upper branch bound calculation. Issues: #1569, #2974
…5045) This patch incorporated changes from PR #2442 that implemented the initial version of trace support for AArch64. This patch also fixed some corner cases not considered in PR #2442 where the assumption was incorrect and caused the program to crash. Trace support is not yet enabled by default, but can be enabled with "-enable_traces". This commit introduces internal control flow by adding a trace_exit_label in fixup_indirect_trace_exit, which might break code that assumes linear control flow (such as translate.c). Either special support is needed for this trace_exit_label or alternative schemes should be used that has a linear control. Some complexities in this commit can be removed once we have #5062 implemented and decode_fragment eliminated. Co-authored-by: Kevin Zhou <[email protected]> Issues: #1569, #2974
Documenting a fundamental issue with tracing building on AArch64: exclusive monitors. DR assumes it can unlink a block for the purpose of recording where it goes next, in order to collect the set of consecutive blocks to use to build up a trace. However, on AArch64, unlinking can perturb the app, since the exit stub itself along with all the DR code contains memory traffic which is likely to lose an exclusive monitor. So without something like |
Similar to #1668 for AArch64. There is a bunch of x86-specific trace building code that needs to be ported.
The text was updated successfully, but these errors were encountered: