Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 245441
b: refs/heads/master
c: ee5e51f
h: refs/heads/master
i:
  245439: a6e7f35
v: v3
  • Loading branch information
Jiri Olsa authored and Steven Rostedt committed Apr 4, 2011
1 parent c922800 commit 2d223f0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1813dc3776c22ad4b0294a6df8434b9a02c98109
refs/heads/master: ee5e51f51be755830f57445e268ba50e88ccbdbb
15 changes: 12 additions & 3 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -2013,9 +2013,10 @@ enum print_line_t print_trace_line(struct trace_iterator *iter)
{
enum print_line_t ret;

if (iter->lost_events)
trace_seq_printf(&iter->seq, "CPU:%d [LOST %lu EVENTS]\n",
iter->cpu, iter->lost_events);
if (iter->lost_events &&
!trace_seq_printf(&iter->seq, "CPU:%d [LOST %lu EVENTS]\n",
iter->cpu, iter->lost_events))
return TRACE_TYPE_PARTIAL_LINE;

if (iter->trace && iter->trace->print_line) {
ret = iter->trace->print_line(iter);
Expand Down Expand Up @@ -3229,6 +3230,14 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,

if (iter->seq.len >= cnt)
break;

/*
* Setting the full flag means we reached the trace_seq buffer
* size and we should leave by partial output condition above.
* One of the trace_seq_* functions is not used properly.
*/
WARN_ONCE(iter->seq.full, "full flag set for trace type %d",
iter->ent->type);
}
trace_access_unlock(iter->cpu_file);
trace_event_read_unlock();
Expand Down
3 changes: 3 additions & 0 deletions trunk/kernel/trace/trace_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,9 @@ EXPORT_SYMBOL_GPL(unregister_ftrace_event);
enum print_line_t trace_nop_print(struct trace_iterator *iter, int flags,
struct trace_event *event)
{
if (!trace_seq_printf(&iter->seq, "type: %d\n", iter->ent->type))
return TRACE_TYPE_PARTIAL_LINE;

return TRACE_TYPE_HANDLED;
}

Expand Down

0 comments on commit 2d223f0

Please sign in to comment.