Loading
fgraph: Fix thresh_return nosleeptime double-adjust
trace_graph_thresh_return() called handle_nosleeptime() and then delegated to trace_graph_return(), which calls handle_nosleeptime() again. When sleep-time accounting is disabled this double-adjusts calltime and can produce bogus durations (including underflow). Fix this by computing rettime once, applying handle_nosleeptime() only once, using the adjusted calltime for threshold comparison, and writing the return event directly via __trace_graph_return() when the threshold is met. Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20260221113314048jE4VRwIyZEALiYByGK0My@zte.com.cn Fixes: 3c9880f3 ("ftrace: Use a running sleeptime instead of saving on shadow stack") Acked-by:Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by:
Shengming Hu <hu.shengming@zte.com.cn> Signed-off-by:
Steven Rostedt (Google) <rostedt@goodmis.org>