-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New dtrace probes and a counter struct in the Upstairs. (#1104)
* New dtrace probes and a counter struct in the Upstairs. This enables watching what path the Upstairs Apply takes and how frequently it takes each one. Added a new dtrace script to show the new counters. --------- Co-authored-by: Alan Hanson <[email protected]>
- Loading branch information
Showing
5 changed files
with
178 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Display internal Upstairs status. | ||
*/ | ||
#pragma D option quiet | ||
#pragma D option strsize=1k | ||
/* | ||
* Print the header right away | ||
*/ | ||
dtrace:::BEGIN | ||
{ | ||
show = 21; | ||
} | ||
|
||
/* | ||
* Every second, check and see if we have printed enough that it is | ||
* time to print the header again | ||
*/ | ||
tick-1s | ||
/show > 20/ | ||
{ | ||
printf("%9s %9s %9s", "APPLY", "DOWN_S", "GUEST"); | ||
printf(" %9s %9s %9s", "DFR_BLK", "DFR_MSG", "LEAK_CHK"); | ||
printf(" %9s %9s %9s", "FLUSH_CHK", "STAT_CHK", "REPR_CHK"); | ||
printf(" %9s %9s", "CTRL_CHK", "NOOP"); | ||
printf("\n"); | ||
show = 0; | ||
} | ||
|
||
crucible_upstairs*:::up-status | ||
{ | ||
show = show + 1; | ||
printf("%9s", json(copyinstr(arg1), "ok.up_counters.apply")); | ||
printf(" %9s", json(copyinstr(arg1), "ok.up_counters.action_downstairs")); | ||
printf(" %9s", json(copyinstr(arg1), "ok.up_counters.action_guest")); | ||
printf(" %9s", json(copyinstr(arg1), "ok.up_counters.action_deferred_block")); | ||
printf(" %9s", json(copyinstr(arg1), "ok.up_counters.action_deferred_message")); | ||
printf(" %9s", json(copyinstr(arg1), "ok.up_counters.action_leak_check")); | ||
printf(" %9s", json(copyinstr(arg1), "ok.up_counters.action_flush_check")); | ||
printf(" %9s", json(copyinstr(arg1), "ok.up_counters.action_stat_check")); | ||
printf(" %9s", json(copyinstr(arg1), "ok.up_counters.action_repair_check")); | ||
printf(" %9s", json(copyinstr(arg1), "ok.up_counters.action_control_check")); | ||
printf(" %9s", json(copyinstr(arg1), "ok.up_counters.action_noop")); | ||
printf("\n"); | ||
} |
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