Thanks, Steve.
Understood.
I will add:
/sys/kernel/tracing/trace_stats/total_memory_kb
The file will report:
total:
buffers_mem:
snapshot_buffers_mem:
The values will cover the main and snapshot buffers of the global trace
array and all tracing instances across all tracing CPUs.
For the per-CPU view, I will follow the existing tracefs layout and add:
/sys/kernel/tracing/trace_stats/per_cpu/cpuN/total_memory_kb
Each per-CPU file will report only the corresponding CPU's buffers
across the global trace array and all tracing instances.
Thanks,
Xiang