-
Notifications
You must be signed in to change notification settings - Fork 571
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#5520: Add instruction encodings to offline drmemtraces #5662
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 a new trace_entry_t type TRACE_TYPE_ENCODING. Encodings are stored in one or more consecutive such entries by raw2trace for the first occurrence of each instruction or modified instruction, with encodings repeated in new chunks. The trace version is bumped for this new type. Adds a new encoding field to the end of memref_instr_t. The reader_t class caches the trace_entry_t encodings and uses them to fill in this field. A new file type OFFLINE_FILE_TYPE_ENCODINGS indicates whether encodings are present (to support stripping them out). Augments the opcode_mix and view tools to use the new encoding records and only need the module_mapper for legacy traces. Updates the documentation and unit tests. Still remaining is adding markers when code changes, joint with #2062. Fixes #5520
…tra encoding; fix another Windows build warning
abhinav92003
approved these changes
Sep 28, 2022
…add asserts; add comments
abhinav92003
approved these changes
Sep 29, 2022
x64 failure is detach_state vmareas.c assert #5123 |
derekbruening
added a commit
that referenced
this pull request
Sep 30, 2022
Adds a new field to memref_instr_t: encoding_is_new. This indicates whether the encoding bytes for an instruction fetch are new, either due to changed application code or just the start of a new chunk. This lets tools know when to invalidate any cached decoding information. Updates the opcode_mix and view tools to use this to invalidate their caches. Adds a test of modified code to the tool.drcacheoff.gencode test. Changes the test to use opcode_mix to test its cache invalidation. Adds a new icache_sync() routine to tools.h for help modifying code on AArchXX. I verified that with the bug pointed out at #5662 (comment) the test catches the stale opcodes used by opcode_mix. Issue: #5520
derekbruening
added a commit
that referenced
this pull request
Oct 3, 2022
Adds a new field to memref_instr_t: encoding_is_new. This indicates whether the encoding bytes for an instruction fetch are new, either due to changed application code or just the start of a new chunk. This lets tools know when to invalidate any cached decoding information. Updates the opcode_mix and view tools to use this to invalidate their caches. Adds a test of modified code to the tool.drcacheoff.gencode test. Changes the test to use opcode_mix to test its cache invalidation. Adds a new icache_sync() routine to tools.h for help modifying code on AArchXX. I verified that with the bug pointed out at #5662 (comment) the test catches the stale opcodes used by opcode_mix. Issue: #5520
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 a new trace_entry_t type TRACE_TYPE_ENCODING. Encodings are stored in one or more consecutive such entries by raw2trace for the first occurrence of each instruction or modified instruction, with encodings repeated in new chunks. The trace version is bumped for this new type.
Adds a new encoding field to the end of memref_instr_t. The reader_t class caches the trace_entry_t encodings and uses them to fill in this field. A new file type OFFLINE_FILE_TYPE_ENCODINGS indicates whether encodings are present (to support stripping them out).
Augments the opcode_mix and view tools to use the new encoding records and only need the module_mapper for legacy traces.
Updates the documentation and unit tests.
Still remaining is adding markers when code changes, joint with #2062.
Fixes #5520