-
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#7050: Remove preempted and faulting instruction from the drmemtraces. #7058
Conversation
…ansfer. When an instruction is preempted by a kernel transfer, the instruction is not retired. The trace might not have captured all the read and write records. To avoid false positive, the invariant checker should reset the expected read and write record counters. Fixes #7050
…b.com:DynamoRIO/dynamorio into i7050-remove-preempted-instructions
…move-preempted-instructions
…er mis-placed invariant error.
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.
I think we need to bump the trace version since this does change the behavior and may cause issues in existing simulators.
…MPLETED_INSTRUCTION marker.
…:drmemtrace::OFFLINE_FILE_VERSION_RETIRED_INSTRUCTIONS_ONLY.
…ONS_ONLY to #OFFLINE_FILE_VERSION_RETIRED_INSTRUCTIONS_ONLY.
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 seeing anything major, but could you resolve the 19 open comments?
I didn't see replies: please reply when resolving so the replies show up in the email and it's clear what the resolution was (even if just "Done" that is helpful vs a silent resolution). |
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.
Putting the top-level comment here to re-enable the re-request-review:
Not seeing anything major, but could you resolve the 19 open comments?
I didn't see replies: please reply when resolving so the replies show up in the email and it's clear what the resolution was (even if just "Done" that is helpful vs a silent resolution). Please reply to the 19 so it's clear what the current status is.
… rseq_aborted. (#7086) raw2trace_t::handle_rseq_abort_marker() uses different names of the last parameter. It's interrupted in raw2trace.h but it is rseq_aborted in raw2trace.cpp. Change the name from interrupted to rseq_aborted to be consistent with raw2trace.cpp. The inconsistency was introduced by PR #7058. Fixes: #7084
…RETIRED_INSTRUCTIONS_ONLY. (#7156) Add a new trace version TRACE_ENTRY_VERSION_RETIRED_INSTRUCTIONS_ONLY for #7050 and bump the TRACE_ENTRY_VERSION. Rename OFFLINE_FILE_VERSION_RETIRED_INSTRUCTIONS_ONLY to OFFLINE_FILE_VERSION_NO_OP since there were no changes in the raw trace by #7050. #7058 incorrectly changed the OFFLINE_FILE_VERSION, it should have changed TRACE_ENTRY_VERSION instead. Issue: #7050
Change the implementation to remove preempted and faulting instructions from drmemtraces. The objective of the change is to remove non-retired instructions and the corresponding memrefs from drmemtraces.
When an instruction is removed, a new marker TRACE_MARKER_TYPE_UNCOMPLETED_INSTRUCTION will be added. Its value is the encoding of the removed instruction up to the size of a pointer.
Renamed handle_kernel_interrupt_and_markers() to handle_rseq_abort_marker() since the function has been modified to handle rseq abort.
In oder to remove preempted instructions and memrefs, a new function preempted_by_kernel_event() is added to look for KERNEL EVENT marker which may be preceded by memrefs. If a KERNEL EVENT marker is found with the same PC, the instruction and any following memrefs are removed.
Add unit tests to cover instruction and memref removed caused by a KERNEL EVENT.
Update offline-legacy-int-offs.templatex, offline-burst_aarch64_sys.templatex and signal_invariants.c to account for removed instructions.
Fixes #7050