Commit b96d0c5
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: [email protected]
Link: https://patch.msgid.link/[email protected]
Fixes: 3c9880f ("ftrace: Use a running sleeptime instead of saving on shadow stack")
Acked-by: Masami Hiramatsu (Google) <[email protected]>
Signed-off-by: Shengming Hu <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>1 parent 6ca8379 commit b96d0c5
1 file changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
| 406 | + | |
| 407 | + | |
406 | 408 | | |
407 | 409 | | |
| 410 | + | |
| 411 | + | |
408 | 412 | | |
409 | 413 | | |
410 | 414 | | |
| |||
419 | 423 | | |
420 | 424 | | |
421 | 425 | | |
422 | | - | |
423 | | - | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
424 | 429 | | |
425 | | - | |
426 | | - | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
427 | 433 | | |
428 | 434 | | |
429 | 435 | | |
| |||
0 commit comments