diff options
author | Steven Rostedt (Google) <[email protected]> | 2023-12-06 10:02:44 -0500 |
---|---|---|
committer | Steven Rostedt (Google) <[email protected]> | 2023-12-06 15:00:59 -0500 |
commit | b2dd797543cfa6580eac8408dd67fa02164d9e56 (patch) | |
tree | 4fbf2d2bb654312207de83937e03f51ce6c229de /scripts/generate_rust_analyzer.py | |
parent | c0591b1cccf708a47bc465c62436d669a4213323 (diff) |
ring-buffer: Force absolute timestamp on discard of event
There's a race where if an event is discarded from the ring buffer and an
interrupt were to happen at that time and insert an event, the time stamp
is still used from the discarded event as an offset. This can screw up the
timings.
If the event is going to be discarded, set the "before_stamp" to zero.
When a new event comes in, it compares the "before_stamp" with the
"write_stamp" and if they are not equal, it will insert an absolute
timestamp. This will prevent the timings from getting out of sync due to
the discarded event.
Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
Cc: [email protected]
Cc: Masami Hiramatsu <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Fixes: 6f6be606e763f ("ring-buffer: Force before_stamp and write_stamp to be different on discard")
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions