aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf-ftrace.sh
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2020-08-11 21:18:12 -0700
committerPaul E. McKenney <paulmck@kernel.org>2020-08-24 18:39:24 -0700
commit4e88ec4a9eb17527e640b063f79e5b875733eb53 (patch)
treeb93f02ca67688122fbdcbd2655edbf601ecd6a06 /tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf-ftrace.sh
parentscftorture: Add cond_resched() to test loop (diff)
downloadlinux-dev-4e88ec4a9eb17527e640b063f79e5b875733eb53.tar.xz
linux-dev-4e88ec4a9eb17527e640b063f79e5b875733eb53.zip
rcuperf: Change rcuperf to rcuscale
This commit further avoids conflation of rcuperf with the kernel's perf feature by renaming kernel/rcu/rcuperf.c to kernel/rcu/rcuscale.c, and also by similarly renaming the functions and variables inside this file. This has the side effect of changing the names of the kernel boot parameters, so kernel-parameters.txt and ver_functions.sh are also updated. The rcutorture --torture type was also updated from rcuperf to rcuscale. [ paulmck: Fix bugs located by Stephen Rothwell. ] Reported-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf-ftrace.sh')
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf-ftrace.sh109
1 files changed, 0 insertions, 109 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf-ftrace.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf-ftrace.sh
deleted file mode 100755
index 7d3c2be66c64..000000000000
--- a/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf-ftrace.sh
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/bin/bash
-# SPDX-License-Identifier: GPL-2.0+
-#
-# Analyze a given results directory for rcuperf performance measurements,
-# looking for ftrace data. Exits with 0 if data was found, analyzed, and
-# printed. Intended to be invoked from kvm-recheck-rcuperf.sh after
-# argument checking.
-#
-# Usage: kvm-recheck-rcuperf-ftrace.sh resdir
-#
-# Copyright (C) IBM Corporation, 2016
-#
-# Authors: Paul E. McKenney <paulmck@linux.ibm.com>
-
-i="$1"
-. functions.sh
-
-if test "`grep -c 'rcu_exp_grace_period.*start' < $i/console.log`" -lt 100
-then
- exit 10
-fi
-
-sed -e 's/^\[[^]]*]//' < $i/console.log |
-grep 'us : rcu_exp_grace_period' |
-sed -e 's/us : / : /' |
-tr -d '\015' |
-awk '
-$8 == "start" {
- if (startseq != "")
- nlost++;
- starttask = $1;
- starttime = $3;
- startseq = $7;
- seqtask[startseq] = starttask;
-}
-
-$8 == "end" {
- if (startseq == $7) {
- curgpdur = $3 - starttime;
- gptimes[++n] = curgpdur;
- gptaskcnt[starttask]++;
- sum += curgpdur;
- if (curgpdur > 1000)
- print "Long GP " starttime "us to " $3 "us (" curgpdur "us)";
- startseq = "";
- } else {
- # Lost a message or some such, reset.
- startseq = "";
- nlost++;
- }
-}
-
-$8 == "done" && seqtask[$7] != $1 {
- piggybackcnt[$1]++;
-}
-
-END {
- newNR = asort(gptimes);
- if (newNR <= 0) {
- print "No ftrace records found???"
- exit 10;
- }
- pct50 = int(newNR * 50 / 100);
- if (pct50 < 1)
- pct50 = 1;
- pct90 = int(newNR * 90 / 100);
- if (pct90 < 1)
- pct90 = 1;
- pct99 = int(newNR * 99 / 100);
- if (pct99 < 1)
- pct99 = 1;
- div = 10 ** int(log(gptimes[pct90]) / log(10) + .5) / 100;
- print "Histogram bucket size: " div;
- last = gptimes[1] - 10;
- count = 0;
- for (i = 1; i <= newNR; i++) {
- current = div * int(gptimes[i] / div);
- if (last == current) {
- count++;
- } else {
- if (count > 0)
- print last, count;
- count = 1;
- last = current;
- }
- }
- if (count > 0)
- print last, count;
- print "Distribution of grace periods across tasks:";
- for (i in gptaskcnt) {
- print "\t" i, gptaskcnt[i];
- nbatches += gptaskcnt[i];
- }
- ngps = nbatches;
- print "Distribution of piggybacking across tasks:";
- for (i in piggybackcnt) {
- print "\t" i, piggybackcnt[i];
- ngps += piggybackcnt[i];
- }
- print "Average grace-period duration: " sum / newNR " microseconds";
- print "Minimum grace-period duration: " gptimes[1];
- print "50th percentile grace-period duration: " gptimes[pct50];
- print "90th percentile grace-period duration: " gptimes[pct90];
- print "99th percentile grace-period duration: " gptimes[pct99];
- print "Maximum grace-period duration: " gptimes[newNR];
- print "Grace periods: " ngps + 0 " Batches: " nbatches + 0 " Ratio: " ngps / nbatches " Lost: " nlost + 0;
- print "Computed from ftrace data.";
-}'
-exit 0