aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 1cb49be7c7fb..ee9c921d7f21 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2014,9 +2014,10 @@ enum print_line_t print_trace_line(struct trace_iterator *iter)
2014{ 2014{
2015 enum print_line_t ret; 2015 enum print_line_t ret;
2016 2016
2017 if (iter->lost_events) 2017 if (iter->lost_events &&
2018 trace_seq_printf(&iter->seq, "CPU:%d [LOST %lu EVENTS]\n", 2018 !trace_seq_printf(&iter->seq, "CPU:%d [LOST %lu EVENTS]\n",
2019 iter->cpu, iter->lost_events); 2019 iter->cpu, iter->lost_events))
2020 return TRACE_TYPE_PARTIAL_LINE;
2020 2021
2021 if (iter->trace && iter->trace->print_line) { 2022 if (iter->trace && iter->trace->print_line) {
2022 ret = iter->trace->print_line(iter); 2023 ret = iter->trace->print_line(iter);
@@ -3230,6 +3231,14 @@ waitagain:
3230 3231
3231 if (iter->seq.len >= cnt) 3232 if (iter->seq.len >= cnt)
3232 break; 3233 break;
3234
3235 /*
3236 * Setting the full flag means we reached the trace_seq buffer
3237 * size and we should leave by partial output condition above.
3238 * One of the trace_seq_* functions is not used properly.
3239 */
3240 WARN_ONCE(iter->seq.full, "full flag set for trace type %d",
3241 iter->ent->type);
3233 } 3242 }
3234 trace_access_unlock(iter->cpu_file); 3243 trace_access_unlock(iter->cpu_file);
3235 trace_event_read_unlock(); 3244 trace_event_read_unlock();