-
Notifications
You must be signed in to change notification settings - Fork 572
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#6635 core filter, part 6: Add core-sharded record filter output (#6704
) Multiple changes to allow the record filter to operate in core-sharded fashion: Makes the pc2encoding table per-input, as one input can migrate across multiple core shards and thus one core can see a later instruction without ever having seen its encoding. To handle synchronization, there is no C++11 std:: rwlock, so we use mutexes -- but we limit their use to per-context-switch for the added global lock, and we assume there is no contention for the per-input lock as only one shard operates on one input at any one time. Sets the memref counter reader to core_sharded_ to avoid asserts. Appends footer records to ending-in-idle-record cores. Adds an error check ensuring a single workload, as multiple will require expanding the keys used in some tables. Renames the output files to include "core.<shard_index>" and not the tid. This is surprisingly complex, as an input filename is needed to determine the output filename compression type: yet not all shards are guaranteed to have an input at the start. A condition variable and mutex are used to coordinate this among shards. Adds support for started-idle cores by synthesizing headers in record_filter; #6703 covers having the scheduler do this for all analyzers. Adds the version as another field available up front from the scheduler, and adds an idle-tid sentinel needed to be distinct from INVALID_THREAD_ID. Adds two end-to-end tests, one with a single-threaded app scheduled onto 4 cores to test start-idle cores and one to test multiple threads. Adds a macro to share code with the existing end-to-end test. Updates the unit test mock classes. Issue: #6635, #6703
- Loading branch information
1 parent
5238a6a
commit 6d7b1a4
Showing
14 changed files
with
367 additions
and
46 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
8 changes: 8 additions & 0 deletions
8
clients/drcachesim/tests/record_filter_bycore_multi.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,8 @@ | ||
Estimation of pi is 3.14.* | ||
Trace invariant checks passed | ||
Output .* entries from .* entries. | ||
Schedule stats tool results: | ||
.* | ||
Core #0 schedule: .* | ||
Core #1 schedule: .* | ||
Core #2 schedule: .* |
14 changes: 14 additions & 0 deletions
14
clients/drcachesim/tests/record_filter_bycore_uni.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,14 @@ | ||
#ifdef WINDOWS | ||
Hit delay threshold: enabling tracing. | ||
Exiting process after .* references. | ||
#else | ||
Hello, world! | ||
#endif | ||
Trace invariant checks passed | ||
Output .* entries from .* entries. | ||
Schedule stats tool results: | ||
.* | ||
Core #0 schedule: .* | ||
Core #1 schedule: .* | ||
Core #2 schedule: .* | ||
Core #3 schedule: .* |
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.