Provides, on one line, an approximation of P scheduling throughput: how
many times execute() was called for a given P. Said another way: how
many RUNNABLE to RUNNING transitions have happened for this P.
This allows discerning whether a P actually did anything, and how it
compares to other periods of a processes operation.
This should be useful to analyze (kernel) scheduler hiccups.
Investigators will want to subtract the tick values from subsequent
schedtrace lines to get a rate of schedulings. I've opted to add a space
around the first and last element as well to make it more uniform to do
the proposed subtracting with tools like AWK.
Change-Id: I69d6dae1509ad285d43799f38bcaa3aa0fb2352e
Reviewed-on: https://go-review.googlesource.com/c/go/+/635636
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Nicolas Hillegeer <aktau@google.com>
print(" runqsize=", t-h, " gfreecnt=", pp.gFree.n, " timerslen=", len(pp.timers.heap), "\n")
} else {
// In non-detailed mode format lengths of per-P run queues as:
- // [len1 len2 len3 len4]
+ // [ len1 len2 len3 len4 ]
print(" ")
if i == 0 {
- print("[")
+ print("[ ")
}
print(t - h)
if i == len(allp)-1 {
- print("]\n")
+ print(" ]")
}
}
}
+ if !detailed {
+ // Format per-P schedticks as: schedticks=[ tick1 tick2 tick3 tick4 ].
+ print(" schedticks=[ ")
+ for _, pp := range allp {
+ print(pp.schedtick)
+ print(" ")
+ }
+ print("]\n")
+ }
+
if !detailed {
unlock(&sched.lock)
return