-
Notifications
You must be signed in to change notification settings - Fork 570
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#4274 kernel pc: Record interrupted PC before drmemtrace kernel even…
…ts (#4994) For online traces, adds the interrupted PC to kernel event entries. For offline traces, updates the existing module offset stored inside kernel events (and previously used only for raw2trace) to become an absolute PC to help in core simulators and other trace consumers who want to know branch targets prior to kernel events. This is a version change for offline traces, and the version is updated, with a named constant for the old version. The raw offline's module offset is upgraded to become an index;offset pair (for 64-bit), as that format is better suited for raw2trace and it avoids needing an extra entry nearly all of the time. The raw2trace postprocessing converts it to an absolute PC for the final trace. Since the 49 bits can take two raw entries, raw2trace is augmented to handle unreading such a double entry. Adds a new TRACE_MARKER_TYPE_RSEQ_ABORT marker to further identify an rseq abort, in order to roll back the committing store in raw2trace (previously it used the lack of interrupted-PC to identify an rseq abort). Adds support to the view tool for displaying the interrupted PC depending on the version. Updates the drcachesim documentation with the new output of the interrupted PC from the view tool. Fixes an issue in the reader where the first switch to a thread has the prior thread's identity in the two leading marker entries for version and filetype. Adds tests of the interrupted PC to the trace_invariants test for signals, as well as ensuring that raw2trace has rolled back an rseq abort final instruction so that the abort appears to occur at a legitimate place inside the region. Adds a test of the legacy version with just offsets by checking in raw files from a signal_invariants run, with fake libdrmemtrace.so and lidynamorio.so to keep the size down. Fixes #4274
- Loading branch information
1 parent
9970fd0
commit 7048fdd
Showing
27 changed files
with
427 additions
and
127 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
Binary file added
BIN
+21.3 KB
clients/drcachesim/tests/drmemtrace.legacy-int-offs.raw/drmemtrace.signal_invariants
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+8.91 KB
clients/drcachesim/tests/drmemtrace.legacy-int-offs.raw/libdrmemtrace.so
Binary file not shown.
Binary file added
BIN
+8.91 KB
clients/drcachesim/tests/drmemtrace.legacy-int-offs.raw/libdynamorio.so
Binary file not shown.
Binary file added
BIN
+146 KB
clients/drcachesim/tests/drmemtrace.legacy-int-offs.raw/libpthread-2.31.so
Binary file not shown.
Binary file added
BIN
+50 KB
...mtrace.legacy-int-offs.raw/raw/drmemtrace.drmemtrace.signal_invariants.552306.6024.raw.gz
Binary file not shown.
Binary file added
BIN
+2.79 KB
...mtrace.legacy-int-offs.raw/raw/drmemtrace.drmemtrace.signal_invariants.552323.7114.raw.gz
Binary file not shown.
Binary file added
BIN
+2.44 KB
...mtrace.legacy-int-offs.raw/raw/drmemtrace.drmemtrace.signal_invariants.552324.5662.raw.gz
Binary file not shown.
Empty file.
Binary file added
BIN
+12.3 KB
clients/drcachesim/tests/drmemtrace.legacy-int-offs.raw/raw/modules.log
Binary file not shown.
72 changes: 72 additions & 0 deletions
72
clients/drcachesim/tests/offline-legacy-int-offs.templatex
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,72 @@ | ||
#ifdef AARCH64 | ||
ERROR: failed to initialize analyzer: Directory setup failed: Failed sanity checks for thread log file .*/drmemtrace.legacy-int-offs/raw/drmemtrace.drmemtrace.signal_invariants..*.raw.gz: Architecture mismatch: trace recorded on x86_64 but tools built for aarch64 | ||
#elif defined(X86) && defined(X64) | ||
Basic counts tool results: | ||
Total counts: | ||
109205 total \(fetched\) instructions | ||
6768 total unique \(fetched\) instructions | ||
93 total non-fetched instructions | ||
11 total prefetches | ||
23974 total data loads | ||
5544 total data stores | ||
0 total icache flushes | ||
0 total dcache flushes | ||
3 total threads | ||
136 total scheduling markers | ||
11 total transfer markers | ||
0 total function id markers | ||
0 total function return address markers | ||
0 total function argument markers | ||
0 total function return value markers | ||
9 total other markers | ||
Thread 552306 counts: | ||
101049 \(fetched\) instructions | ||
6393 unique \(fetched\) instructions | ||
93 non-fetched instructions | ||
11 prefetches | ||
21712 data loads | ||
4442 data stores | ||
0 icache flushes | ||
0 dcache flushes | ||
110 scheduling markers | ||
11 transfer markers | ||
0 function id markers | ||
0 function return address markers | ||
0 function argument markers | ||
0 function return value markers | ||
3 other markers | ||
Thread 552323 counts: | ||
4674 \(fetched\) instructions | ||
1028 unique \(fetched\) instructions | ||
0 non-fetched instructions | ||
0 prefetches | ||
1317 data loads | ||
651 data stores | ||
0 icache flushes | ||
0 dcache flushes | ||
14 scheduling markers | ||
0 transfer markers | ||
0 function id markers | ||
0 function return address markers | ||
0 function argument markers | ||
0 function return value markers | ||
3 other markers | ||
Thread 552324 counts: | ||
3482 \(fetched\) instructions | ||
1008 unique \(fetched\) instructions | ||
0 non-fetched instructions | ||
0 prefetches | ||
945 data loads | ||
451 data stores | ||
0 icache flushes | ||
0 dcache flushes | ||
12 scheduling markers | ||
0 transfer markers | ||
0 function id markers | ||
0 function return address markers | ||
0 function argument markers | ||
0 function return value markers | ||
3 other markers | ||
#else | ||
ERROR: failed to initialize analyzer: Directory setup failed: Failed sanity checks for thread log file .*/drmemtrace.legacy-int-offs/raw/drmemtrace.drmemtrace.signal_invariants..*.raw.gz: Architecture mismatch: trace recorded on x86_64 but tools built for i386 | ||
#endif |
Oops, something went wrong.