Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158489
b: refs/heads/master
c: f633903
h: refs/heads/master
i:
  158487: 7fd2640
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Sep 4, 2009
1 parent 2cd8e89 commit 3df8493
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 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: 2f26ebd549b9ab55ac756b836ec759c11fe93f81
refs/heads/master: f633903af2ceb0cec07d45e499a072b6593d0ed1
17 changes: 15 additions & 2 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,13 +641,26 @@ void unregister_tracer(struct tracer *type)
mutex_unlock(&trace_types_lock);
}

void tracing_reset(struct trace_array *tr, int cpu)
static void __tracing_reset(struct trace_array *tr, int cpu)
{
ftrace_disable_cpu();
ring_buffer_reset_cpu(tr->buffer, cpu);
ftrace_enable_cpu();
}

void tracing_reset(struct trace_array *tr, int cpu)
{
struct ring_buffer *buffer = tr->buffer;

ring_buffer_record_disable(buffer);

/* Make sure all commits have finished */
synchronize_sched();
__tracing_reset(tr, cpu);

ring_buffer_record_enable(buffer);
}

void tracing_reset_online_cpus(struct trace_array *tr)
{
struct ring_buffer *buffer = tr->buffer;
Expand All @@ -661,7 +674,7 @@ void tracing_reset_online_cpus(struct trace_array *tr)
tr->time_start = ftrace_now(tr->cpu);

for_each_online_cpu(cpu)
tracing_reset(tr, cpu);
__tracing_reset(tr, cpu);

ring_buffer_record_enable(buffer);
}
Expand Down

0 comments on commit 3df8493

Please sign in to comment.