diff options
| author | 2026-10-02 11:26:11 -0700 | |
|---|---|---|
| committer | 2026-10-03 11:00:22 +0200 | |
| commit | d1ec67bdf540a56df22a52ef000e1347535dc1a1 (patch) | |
| tree | 614d5865d7caf3b8b6b0bec50ec82a0d259aed3c /scripts/Makefile.thinlto | |
| parent | perf session: Don't flush remaining events once processing is done (diff) | |
perf python: Quietly stop processing events when a callback raises
When a session callback raises a python exception the callback returned
-1 causing reader__read_event() to print a "processing failed for event
of type: ..." error. This is redundant with the python exception that is
raised from process_events(), and corrupts the display of a TUI that
raises from a callback to deliberately stop processing, such as when
cancelling a background load.
Instead set session_done so that processing stops and return success,
the pending exception is then raised by process_events(). As a single
event may still cause further callbacks, for example multiple
call_return callbacks followed by a sample callback, skip calling python
while an exception is pending.
The session whose callback raised resets session_done after processing
so later sessions process all their events. As session_done is a global,
a session processed concurrently in another thread may be stopped early
too. Count the stop requests so that such a session raises an error
rather than silently dropping events.
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 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
