mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
ring-buffer: Add a little more information and a WARN when time stamp going backwards is detected
When the CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS is enabled, and the time stamps are detected as not being valid, it reports information about the write stamp, but does not show the before_stamp which is still useful information. Also, it should give a warning once, such that tests detect this happening. Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
parent
6f6be606e7
commit
6549de1fe3
1 changed files with 7 additions and 3 deletions
|
@ -3318,9 +3318,13 @@ static void check_buffer(struct ring_buffer_per_cpu *cpu_buffer,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
atomic_inc(&cpu_buffer->record_disabled);
|
atomic_inc(&cpu_buffer->record_disabled);
|
||||||
pr_warn("[CPU: %d]TIME DOES NOT MATCH expected:%lld actual:%lld delta:%lld after:%lld\n",
|
/* There's some cases in boot up that this can happen */
|
||||||
cpu_buffer->cpu,
|
WARN_ON_ONCE(system_state != SYSTEM_BOOTING);
|
||||||
ts + info->delta, info->ts, info->delta, info->after);
|
pr_warn("[CPU: %d]TIME DOES NOT MATCH expected:%lld actual:%lld delta:%lld before:%lld after:%lld%s\n",
|
||||||
|
cpu_buffer->cpu,
|
||||||
|
ts + info->delta, info->ts, info->delta,
|
||||||
|
info->before, info->after,
|
||||||
|
full ? " (full)" : "");
|
||||||
dump_buffer_page(bpage, info, tail);
|
dump_buffer_page(bpage, info, tail);
|
||||||
atomic_dec(&ts_dump);
|
atomic_dec(&ts_dump);
|
||||||
/* Do not re-enable checking */
|
/* Do not re-enable checking */
|
||||||
|
|
Loading…
Add table
Reference in a new issue