Files
Swapnil Sapkal c3030995f2 perf sched stats: Add record and rawdump support
Define new, perf tool only, sample types and their layouts. Add logic
to parse /proc/schedstat, convert it to perf sample format and save
samples to perf.data file with `perf sched stats record` command.

Also add logic to read perf.data file, interpret schedstat samples and
print rawdump of samples with `perf script -D`.

Note that, /proc/schedstat file output is standardized with version
number. The patch supports v15 but older or newer version can be added
easily.

Co-developed-by: Ravi Bangoria <[email protected]>
Signed-off-by: Ravi Bangoria <[email protected]>
Signed-off-by: Swapnil Sapkal <[email protected]>
Tested-by: Chen Yu <[email protected]>
Tested-by: James Clark <[email protected]>
Acked-by: Ian Rogers <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Anubhav Shelat <[email protected]>
Cc: Ben Gainey <[email protected]>
Cc: Blake Jones <[email protected]>
Cc: Chun-Tse Shao <[email protected]>
Cc: David Vernet <[email protected]>
Cc: Dmitriy Vyukov <[email protected]>
Cc: Dr. David Alan Gilbert <[email protected]>
Cc: Gautham Shenoy <[email protected]>
Cc: Graham Woodward <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: James Clark <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Juri Lelli <[email protected]>
Cc: K Prateek Nayak <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Leo Yan <[email protected]>
Cc: Madadi Vineeth Reddy <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Sandipan Das <[email protected]>
Cc: Santosh Shukla <[email protected]>
Cc: Shrikanth Hegde <[email protected]>
Cc: Steven Rostedt (VMware) <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Thomas Falcon <[email protected]>
Cc: Tim Chen <[email protected]>
Cc: Vincent Guittot <[email protected]>
Cc: Yang Jihong <[email protected]>
Cc: Yujie Liu <[email protected]>
Cc: Zhongqiu Han <[email protected]>
[ PRIu64 needs uint64_t, not 'unsigned long' to work on both 32-bit and 64-bit ]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2026-01-22 12:29:28 -03:00
..