Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187872
b: refs/heads/master
c: a2f8071
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Mar 13, 2010
1 parent f5ebde9 commit 792a97b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 283740c619d211e34572cc93c8cdba92ccbdb9cc
refs/heads/master: a2f8071428ed9a0f06865f417c962421c9a6b488
9 changes: 9 additions & 0 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,8 @@ void tracing_start(void)
goto out;
}

/* Prevent the buffers from switching */
arch_spin_lock(&ftrace_max_lock);

buffer = global_trace.buffer;
if (buffer)
Expand All @@ -959,6 +961,8 @@ void tracing_start(void)
if (buffer)
ring_buffer_record_enable(buffer);

arch_spin_unlock(&ftrace_max_lock);

ftrace_start();
out:
spin_unlock_irqrestore(&tracing_start_lock, flags);
Expand All @@ -980,6 +984,9 @@ void tracing_stop(void)
if (trace_stop_count++)
goto out;

/* Prevent the buffers from switching */
arch_spin_lock(&ftrace_max_lock);

buffer = global_trace.buffer;
if (buffer)
ring_buffer_record_disable(buffer);
Expand All @@ -988,6 +995,8 @@ void tracing_stop(void)
if (buffer)
ring_buffer_record_disable(buffer);

arch_spin_unlock(&ftrace_max_lock);

out:
spin_unlock_irqrestore(&tracing_start_lock, flags);
}
Expand Down

0 comments on commit 792a97b

Please sign in to comment.