-
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#2062: Support filtering of non-module blocks (#6469)
Adds support for instrumenting non-module code instr-by-instr instead of whole-block-at-a-time. This is required for the L0 filter mode which instruments individual instructions rather than one pc entry for the whole block. Under the new scheme, the modoffs field in each trace PC entry point to each non-mod instrs separately, rather than just the top of the non-mod block. Specifically, we store the cumulative encoding length of instrs stored to the encoding file prior to the recorded instr. This may potentially allow too few gencode blocks for JIT apps (we'd support 8G of JIT code); we could use multiple modidx to point to gencode (growing downward from PC_MODIDX_INVALID) to help with that in the future. Added a TODO. Adds file type to the encoding file header. Adds a new encoding file version to indicate the presence of file type. Adds a new file type bit that denotes that the trace was filtered and that the module_mapper_t should interpret the modoffs as pointing to a single instr as described above. When this bit is not set, we use the existing scheme of interpreting the pc modoffs as just the non-mod block-idx. Note that even under the new scheme, we still write the encoding file one mon-module block at a time because it is too inefficient to write one encoding_entry_t for just one non-module instr. Modifies record_instr_encodings to skip writing anything to the encoding file for blocks without any app instr. Adds a new variant of the tool.drcacheoff.gencode test that runs with the L0_filter enabled. Modifies the test to add a sequence of instrs that, without this fix, produces an error in raw2trace due to an apparently out-of-block memref. Issue: #2062
- Loading branch information
1 parent
1ce89b8
commit 58ece1c
Showing
10 changed files
with
195 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pre-DR init | ||
pre-DR start | ||
pre-DR detach | ||
all done | ||
Opcode mix tool results: | ||
.* |
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.