Skip to content

Commit 5e38ca8

Browse files
Jiri Olsarostedt
authored andcommitted
tracing: Add unstable sched clock note to the warning
The warning "Delta way too big" warning might appear on a system with unstable shed clock right after the system is resumed and tracing was enabled during the suspend. Since it's not realy bug, and the unstable sched clock is working fast and reliable otherwise, Steven suggested to keep using the sched clock in any case and just to make note in the warning itself. Signed-off-by: Jiri Olsa <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
1 parent ae07f55 commit 5e38ca8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

kernel/trace/ring_buffer.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2163,10 +2163,14 @@ rb_reserve_next_event(struct ring_buffer *buffer,
21632163
delta = diff;
21642164
if (unlikely(test_time_stamp(delta))) {
21652165
WARN_ONCE(delta > (1ULL << 59),
2166-
KERN_WARNING "Delta way too big! %llu ts=%llu write stamp = %llu\n",
2166+
KERN_WARNING "Delta way too big! %llu ts=%llu write stamp = %llu\n%s",
21672167
(unsigned long long)delta,
21682168
(unsigned long long)ts,
2169-
(unsigned long long)cpu_buffer->write_stamp);
2169+
(unsigned long long)cpu_buffer->write_stamp,
2170+
sched_clock_stable ? "" :
2171+
"If you just came from a suspend/resume,\n"
2172+
"please switch to the trace global clock:\n"
2173+
" echo global > /sys/kernel/debug/tracing/trace_clock\n");
21702174
add_timestamp = 1;
21712175
}
21722176
}

0 commit comments

Comments
 (0)