summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/gecko.py
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2025-03-17 09:17:45 +0300
committerIngo Molnar <mingo@kernel.org>2025-03-17 10:31:03 +0300
commitf4b07fd62d4d11d57a15cb4ae01b3833282eb8f6 (patch)
tree57fe56edc0ab326701dcca5984dd085aba4e850b /tools/perf/scripts/python/gecko.py
parentb6ecb57f1fec114cfa19b1bf06f25f904ca928f9 (diff)
downloadlinux-f4b07fd62d4d11d57a15cb4ae01b3833282eb8f6.tar.xz
perf/core: Use POLLHUP for pinned events in error
Pinned performance events can enter an error state when they fail to be scheduled in the context due to a failed constraint or some other conflict or condition. In error state these events won't generate any samples anymore and are silently ignored until they are recovered by PERF_EVENT_IOC_ENABLE, or the condition can also change so that they can be scheduled in. Tooling should be allowed to know about the state change, but currently there's no mechanism to notify tooling when events enter an error state. One way to do this is to issue a POLLHUP event to poll(2) to handle this. Reading events in an error state would return 0 (EOF) and it matches to the behavior of POLLHUP according to the man page. Tooling should remove the fd of the event from pollfd after getting POLLHUP, otherwise it'll be returned repeatedly. [ mingo: Clarified the changelog ] Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/20250317061745.1777584-1-namhyung@kernel.org
Diffstat (limited to 'tools/perf/scripts/python/gecko.py')
0 files changed, 0 insertions, 0 deletions