tracing: Set actual size after ring buffer resize
authorZheng Yejian <zhengyejian1@huawei.com>
Wed, 5 Jul 2023 00:27:05 +0000 (08:27 +0800)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Sun, 30 Jul 2023 22:11:45 +0000 (18:11 -0400)
commit6d98a0f2ac3c021d21be66fa34e992137cd25bcb
tree86686009020c1ca955944e4c40d5af07aff6b40c
parent6bba92881de9dde4c07cbb24b5691eb6eb9495f2
tracing: Set actual size after ring buffer resize

Currently we can resize trace ringbuffer by writing a value into file
'buffer_size_kb', then by reading the file, we get the value that is
usually what we wrote. However, this value may be not actual size of
trace ring buffer because of the round up when doing resize in kernel,
and the actual size would be more useful.

Link: https://lore.kernel.org/linux-trace-kernel/20230705002705.576633-1-zhengyejian1@huawei.com
Cc: <mhiramat@kernel.org>
Signed-off-by: Zheng Yejian <zhengyejian1@huawei.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace.c