From: Thomas Richter <tmricht@linux.ibm.com>
To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
acme@kernel.org, sumanthk@linux.ibm.com, namhyung@kernel.org
Cc: agordeev@linux.ibm.com, gor@linux.ibm.com, hca@linux.ibm.com,
Thomas Richter <tmricht@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>
Subject: [PATCH] perf/test: fix perf ftrace test on s390
Date: Thu, 7 Nov 2024 13:33:43 +0100 [thread overview]
Message-ID: <20241107123343.1580616-1-tmricht@linux.ibm.com> (raw)
On s390 the perf test case ftrace sometimes fails as follows:
# ./perf test ftrace
79: perf ftrace tests : FAILED!
#
The failure depends on the kernel .config file. Some configurarions
always work fine, some do not.
To achieve success for all our tested kernel configurations, enlarge
the buffer to store the traces complete without wrapping.
The default buffer size is too small for all kernel configurations.
Set the buffer size of /sys/kernel/tracing/buffer_size_kb to 16 MB
Output after:
# ./perf test ftrace
79: perf ftrace tests : Ok
#
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Suggested-by: Sven Schnelle <svens@linux.ibm.com>
---
tools/perf/tests/shell/ftrace.sh | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tools/perf/tests/shell/ftrace.sh b/tools/perf/tests/shell/ftrace.sh
index a6ee740f0d7e..742d6b8f34d3 100755
--- a/tools/perf/tests/shell/ftrace.sh
+++ b/tools/perf/tests/shell/ftrace.sh
@@ -80,10 +80,21 @@ test_ftrace_profile() {
echo "perf ftrace profile test [Success]"
}
+if [ "$(uname -m)" = "s390x" ]
+then
+ ftrace_size=$(cat /sys/kernel/tracing/buffer_size_kb)
+ echo 16384 > /sys/kernel/tracing/buffer_size_kb
+fi
+
test_ftrace_list
test_ftrace_trace
test_ftrace_latency
test_ftrace_profile
+if [ "$(uname -m)" = "s390x" ]
+then
+ echo $ftrace_size > /sys/kernel/tracing/buffer_size_kb
+fi
+
cleanup
exit 0
--
2.47.0
next reply other threads:[~2024-11-07 12:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-07 12:33 Thomas Richter [this message]
2024-11-07 19:41 ` [PATCH] perf/test: fix perf ftrace test on s390 Namhyung Kim
2024-11-08 6:28 ` Sven Schnelle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241107123343.1580616-1-tmricht@linux.ibm.com \
--to=tmricht@linux.ibm.com \
--cc=acme@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=sumanthk@linux.ibm.com \
--cc=svens@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).