summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2026-09-25 23:19:58 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-09-26 20:49:30 +0200
commit164c7edd80e10f40aaf2a7817f1a23015f2fc9dc (patch)
treec6a861755439c7cabb7f7721277eecb3ff0cc753 /tools/perf/scripts/python/stackcollapse.py
parentb103b3338b99c3edfe982ef1e6198db8aaa039b6 (diff)
downloadlinux-next-164c7edd80e10f40aaf2a7817f1a23015f2fc9dc.tar.gz
linux-next-164c7edd80e10f40aaf2a7817f1a23015f2fc9dc.zip
perf python: Port task-analyzer to perf module
Port task-analyzer.py from tools/perf/scripts/python/ to a standalone script in tools/perf/python/ refactored into a class-based architecture. Improvements compared to the legacy script: - Support both offline perf.data file analysis (using perf.session) and live trace capture (using evlist.read_on_cpu), accessing sched:sched_switch tracepoint fields directly from sample objects. - Automatically disable ANSI terminal color escape sequences when --csv or --csv-summary is enabled so CSV column headers ('Comm,', 'Time Out-Out,', etc.) are never polluted by color codes when running interactively on a TTY (e.g. as root). - Sanitize non-printable characters and leading CSV formula characters (=, +, -, @) in task comm strings. - Emit a one-time warning to stderr if sched:sched_switch samples are missing tracepoint fields (such as when recorded without libtraceevent support). Update test_task_analyzer.sh to invoke the standalone script. Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions