Commit 32dc004
tracing: Reset last-boot buffers when reading out all cpu buffers
Reset the last-boot ring buffers when read() reads out all cpu
buffers through trace_pipe/trace_pipe_raw. This prevents ftrace to
unwind ring buffer read pointer next boot.
Note that this resets only when all per-cpu buffers are empty, and
read via read(2) syscall. For example, if you read only one of the
per-cpu trace_pipe, it does not reset it. Also, reading buffer by
splice(2) syscall does not reset because some data in the reader
(the last) page.
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/174792929202.496143.8184644221859580999.stgit@mhiramat.tok.corp.google.com
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>1 parent c2a0831 commit 32dc004
1 file changed
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6610 | 6610 | | |
6611 | 6611 | | |
6612 | 6612 | | |
| 6613 | + | |
| 6614 | + | |
| 6615 | + | |
| 6616 | + | |
| 6617 | + | |
| 6618 | + | |
| 6619 | + | |
| 6620 | + | |
| 6621 | + | |
| 6622 | + | |
| 6623 | + | |
| 6624 | + | |
| 6625 | + | |
| 6626 | + | |
| 6627 | + | |
| 6628 | + | |
6613 | 6629 | | |
6614 | 6630 | | |
6615 | 6631 | | |
| |||
6641 | 6657 | | |
6642 | 6658 | | |
6643 | 6659 | | |
| 6660 | + | |
| 6661 | + | |
| 6662 | + | |
6644 | 6663 | | |
6645 | 6664 | | |
6646 | 6665 | | |
| |||
8167 | 8186 | | |
8168 | 8187 | | |
8169 | 8188 | | |
| 8189 | + | |
| 8190 | + | |
| 8191 | + | |
8170 | 8192 | | |
8171 | 8193 | | |
8172 | 8194 | | |
| |||
0 commit comments