mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
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: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
This commit is contained in:
parent
4d23e9b4fd
commit
c21ceceae9
1 changed files with 22 additions and 0 deletions
|
@ -0,0 +1,22 @@
|
|||
#!/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
|
Loading…
Reference in a new issue