Commit c21cecea authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Shuah Khan (Samsung OSG)

selftests/ftrace: Add ringbuffer size changing testcase

Add a testcase for changing ringbuffer size. This tests
not only ringbuffer size but also tests the imbalance
per-cpu buffer size change too.
Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Acked-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: default avatarShuah Khan (Samsung OSG) <shuah@kernel.org>
parent 4d23e9b4
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# description: Change the ringbuffer size
# flags: instance
rb_size_test() {
ORIG=`cat buffer_size_kb`
expr $ORIG / 2 > buffer_size_kb
expr $ORIG \* 2 > buffer_size_kb
echo $ORIG > buffer_size_kb
}
rb_size_test
: "If per-cpu buffer is supported, imbalance it"
if [ -d per_cpu/cpu0 ]; then
cd per_cpu/cpu0
rb_size_test
fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment