This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH 2/3] io_submit.stp: use an accumulator for traces
- From: Jeff Moyer <jmoyer at redhat dot com>
- To: systemtap at sourceware dot org
- Cc: Jeff Moyer <jmoyer at redhat dot com>
- Date: Fri, 11 May 2018 15:25:51 -0400
- Subject: [PATCH 2/3] io_submit.stp: use an accumulator for traces
- References: <20180511192552.12849-1-jmoyer@redhat.com>
On very large systems, we get a lot of skipped probes due to lock
contention on the traces array. The end result is that we don't
get any data for such systems. Simply converting the traces array
to an accumulator resolves this issue in testing (on a highly-
loaded 288 cpu system).
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
---
testsuite/systemtap.examples/io/io_submit.stp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/testsuite/systemtap.examples/io/io_submit.stp b/testsuite/systemtap.examples/io/io_submit.stp
index c5edd66..62d15c9 100755
--- a/testsuite/systemtap.examples/io/io_submit.stp
+++ b/testsuite/systemtap.examples/io/io_submit.stp
@@ -37,7 +37,7 @@ probe syscall.io_submit.return {
*/
probe kernel.function("schedule") {
if (tid() in in_iosubmit) {
- traces[backtrace()]++
+ traces[backtrace()] <<< 1
/*
* change this to if (1) if you want a backtrace every time
@@ -59,7 +59,7 @@ probe kernel.function("schedule") {
*/
probe end {
foreach (stack in traces- limit 30) {
- printf("%d:", traces[stack])
+ printf("%d:", @count(traces[stack]))
print_syms(stack);
}
}
--
2.8.2.335.g4bb51ae