• Steven Rostedt (VMware)'s avatar
    ring-buffer: Add test to validate the time stamp deltas · 5b7be9c7
    Steven Rostedt (VMware) authored
    While debugging a situation where a delta for an event was calucalted wrong,
    I realize there was nothing making sure that the delta of events are
    correct. If a single event has an incorrect delta, then all events after it
    will also have one. If the discrepency gets large enough, it could cause
    the time stamps to go backwards when crossing sub buffers, that record a
    full 64 bit time stamp, and the new deltas are added to that.
    
    Add a way to validate the events at most events and when crossing a buffer
    page. This will help make sure that the deltas are always correct. This test
    will detect if they are ever corrupted.
    
    The test adds a high overhead to the ring buffer recording, as it does the
    audit for almost every event, and should only be used for testing the ring
    buffer.
    
    This will catch the bug that is fixed by commit 55ea4cf4 ("ring-buffer:
    Update write stamp with the correct ts"), which is not applied when this
    commit is applied.
    Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
    5b7be9c7
Kconfig 30 KB