linux/tools/perf/python
Ian Rogers 514ecdfd00 perf python: Update callchain stubs and session thread lookup
Update pyrf_session__find_thread() in util/python.c to accept an
optional tid parameter (defaulting to pid) and return None instead of
raising TypeError when a thread is not found in the session machines.

Update perf.pyi to match:
- Set session.find_thread() signature to (pid: int, tid: int = -1) ->
  Optional[thread].
- Update callchain_node.symbol and callchain_node.dso to str (the C
  getters return "[unknown]" fallback strings rather than None) and add
  __iter__() to callchain.

Also update treport.py to handle Optional[thread] returned by
session.find_thread().

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:27 +02:00
..
counting.py perf python: Add counting.py as example for counting perf events 2025-05-22 22:24:58 -03:00
ilist.py perf python: Fix ilist TreeNode string type drift 2026-09-13 18:39:12 -03:00
perf_live.py perf python: Add LiveSession helper 2026-06-30 10:17:19 -07:00
perf.pyi perf python: Update callchain stubs and session thread lookup 2026-09-26 20:49:27 +02:00
tracepoint.py perf python tracepoint.py: Change the COMM using setproctitle if available 2025-03-18 16:08:22 -07:00
treport.py perf python: Update callchain stubs and session thread lookup 2026-09-26 20:49:27 +02:00
twatch.py tweewide: Fix most Shebang lines 2020-12-08 23:30:04 +09:00