-
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#6426: Add schedule_stats tool (#6442)
Adds a new analysis tool "schedule_stats" which computes characteristics of a core-sharded schedule. This is meant to help in understanding and studying the effects of varying the scheduler parameters. This initial version counts instructions, blocking and all syscalls, voluntary and direct switches, and direct requests, and computes derived statistics CSPKI, I/CS, %voluntary, and %direct switches. Failed direct requests can be inferred. The tool also records a string of letters representing input threads to help visualize the thread interleaving on each core. The number of instructions per leter is controlled by a new parameter -schedule_stats_print_every. This string visualization has its limits as more than 26 inputs will wrap around, but this approach has been useful in our unit tests and other small runs. Adds a regression test which runs the checked-in threadsig trace. Issue: #6426
- Loading branch information
1 parent
e8f554f
commit a633603
Showing
9 changed files
with
618 additions
and
10 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
76 changes: 76 additions & 0 deletions
76
clients/drcachesim/tests/schedule_stats_nopreempt.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,76 @@ | ||
Schedule stats tool results: | ||
Total counts: | ||
4 cores | ||
8 threads | ||
638938 instructions | ||
5 total context switches | ||
0.0078255 CSPKI \(context switches per 1000 instructions\) | ||
127788 instructions per context switch | ||
5 voluntary context switches | ||
0 direct context switches | ||
100.00% voluntary switches | ||
0.00% direct switches | ||
161 system calls | ||
2 maybe-blocking system calls | ||
0 direct switch requests | ||
0 waits | ||
Core #0 counts: | ||
. threads | ||
*[0-9]* instructions | ||
. total context switches | ||
0.0[0-9.]* CSPKI \(context switches per 1000 instructions\) | ||
*[0-9]* instructions per context switch | ||
. voluntary context switches | ||
0 direct context switches | ||
100.00% voluntary switches | ||
0.00% direct switches | ||
*[0-9]* system calls | ||
. maybe-blocking system calls | ||
0 direct switch requests | ||
0 waits | ||
Core #1 counts: | ||
2 threads | ||
*[0-9]* instructions | ||
. total context switches | ||
0.0[0-9.]* CSPKI \(context switches per 1000 instructions\) | ||
*[0-9]* instructions per context switch | ||
. voluntary context switches | ||
0 direct context switches | ||
100.00% voluntary switches | ||
0.00% direct switches | ||
.. system calls | ||
. maybe-blocking system calls | ||
0 direct switch requests | ||
0 waits | ||
Core #2 counts: | ||
2 threads | ||
*[0-9]* instructions | ||
1 total context switches | ||
0.0[0-9.]* CSPKI \(context switches per 1000 instructions\) | ||
*[0-9]* instructions per context switch | ||
1 voluntary context switches | ||
0 direct context switches | ||
100.00% voluntary switches | ||
0.00% direct switches | ||
.. system calls | ||
. maybe-blocking system calls | ||
0 direct switch requests | ||
0 waits | ||
Core #3 counts: | ||
2 threads | ||
*[0-9]* instructions | ||
1 total context switches | ||
0.0[0-9.]* CSPKI \(context switches per 1000 instructions\) | ||
*[0-9]* instructions per context switch | ||
1 voluntary context switches | ||
0 direct context switches | ||
100.00% voluntary switches | ||
0.00% direct switches | ||
.. system calls | ||
. maybe-blocking system calls | ||
0 direct switch requests | ||
0 waits | ||
Core #0 schedule: [A-H,]* | ||
Core #1 schedule: [A-H,]* | ||
Core #2 schedule: [A-H,]* | ||
Core #3 schedule: [A-H,]* |
Oops, something went wrong.