tools/testing/selftests/ftrace/test.d/00basic/ringbuffer_size.tc

Source file repositories/reference/linux-study-clean/tools/testing/selftests/ftrace/test.d/00basic/ringbuffer_size.tc

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/ftrace/test.d/00basic/ringbuffer_size.tc
Extension
.tc
Size
376 bytes
Lines
23
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: tools
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

#!/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

Annotation

Implementation Notes