Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158492
b: refs/heads/master
c: e8165db
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Sep 4, 2009
1 parent f2aac61 commit ac5b23f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 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: 659372d3e42a3e17a2e042d38a8bcdb94bfbe797
refs/heads/master: e8165dbb03ed04d798163ee512074b9a9466a9c8
13 changes: 12 additions & 1 deletion trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,20 @@ update_max_tr_single(struct trace_array *tr, struct task_struct *tsk, int cpu)

ret = ring_buffer_swap_cpu(max_tr.buffer, tr->buffer, cpu);

if (ret == -EBUSY) {
/*
* We failed to swap the buffer due to a commit taking
* place on this CPU. We fail to record, but we reset
* the max trace buffer (no one writes directly to it)
* and flag that it failed.
*/
trace_array_printk(&max_tr, _THIS_IP_,
"Failed to swap buffers due to commit in progress\n");
}

ftrace_enable_cpu();

WARN_ON_ONCE(ret && ret != -EAGAIN);
WARN_ON_ONCE(ret && ret != -EAGAIN && ret != -EBUSY);

__update_max_tr(tr, tsk, cpu);
__raw_spin_unlock(&ftrace_max_lock);
Expand Down

0 comments on commit ac5b23f

Please sign in to comment.