Commit eecb62a2 authored by Masami Hiramatsu (Google)'s avatar Masami Hiramatsu (Google) Committed by Greg Kroah-Hartman
Browse files

tracing/hist: Support POLLPRI event for poll on histogram

[ Upstream commit 66fc6f52 ]

Since POLLIN will not be flushed until the hist file is read, the user
needs to repeatedly read() and poll() on the hist file for monitoring the
event continuously. But the read() is somewhat redundant when the user is
only monitoring for event updates.

Add POLLPRI poll event on the hist file so the event returns when a
histogram is updated after open(), poll() or read(). Thus it is possible
to wait for the next event without having to issue a read().

Cc: Shuah Khan <shuah@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/173527248770.464571.2536902137325258133.stgit@devnote2


Signed-off-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
Reviewed-by: default avatarTom Zanussi <zanussi@kernel.org>
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
Stable-dep-of: 0b4ffbe4 ("tracing: Correct the refcount if the hist/hist_debug file fails to open")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent fe87f8d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment