linux/tools
Ian Rogers 164c7edd80 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>
2026-09-26 20:49:30 +02:00
..
accounting
arch perf headers: Sync perf_event.h/perf_regs.h with the kernel headers 2026-09-14 15:32:52 -03:00
bootconfig Bootconfig updates for v7.3: 2026-08-25 08:59:09 -07:00
bpf perf tools updates for v7.3 2026-08-22 08:47:50 -07:00
build perf dwarf-aux: Add die_same_file() and die_get_type_die() 2026-09-25 18:13:25 +02:00
certs
cgroup
counter
crypto
debugging
dma
docs
firewire
firmware
gpio
hv
iio
include tools include: Add missing stdarg.h include 2026-09-25 15:04:50 +02:00
kvm/kvm_stat
laptop
leds
lib perf evlist: Don't restrict uncore events to PMU CPUs 2026-09-25 15:29:56 +02:00
memory-model
mm mm.git review status for master..mm-nonmm-stable 2026-08-23 08:07:11 -07:00
net Including fixes from Bluetooth, IPSec and Netfilter. 2026-08-27 13:53:43 -07:00
objtool Rust fixes for v7.3 2026-08-30 09:47:39 -07:00
pcmcia
perf perf python: Port task-analyzer to perf module 2026-09-26 20:49:30 +02:00
platform/x86/amd
power
rcu
sched
sched_ext sched_ext: Check bpf_timer_start return values in scx_qmap 2026-08-31 06:47:39 -10:00
scripts perf tools updates for v7.3 2026-08-22 08:47:50 -07:00
sound
spi
testing bpf-fixes 2026-09-06 13:49:44 -07:00
thermal
time
tracing
unittests
usb
verification verification/rvgen: Use .old instead of .bak for kunit backup files 2026-08-25 13:56:53 +02:00
virtio tools/virtio: Fix control typo in trace agent comment 2026-08-19 06:38:48 -04:00
wmi
workqueue tools/workqueue/wq_dump.py: Support backward compatibility for wq->attrs rename 2026-08-31 10:17:08 -10:00
writeback
Makefile