Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142778
b: refs/heads/master
c: b0dfa97
h: refs/heads/master
v: v3
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Apr 7, 2009
1 parent 77aa132 commit a6ff120
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: 5ab8026a3016fbed5c73aa070d9f6989cf791099
refs/heads/master: b0dfa978c7a1699fb3506fbfcba0b6a5c4bd17ae
13 changes: 12 additions & 1 deletion trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1632,7 +1632,11 @@ static void test_cpu_buff_start(struct trace_iterator *iter)
return;

cpumask_set_cpu(iter->cpu, iter->started);
trace_seq_printf(s, "##### CPU %u buffer started ####\n", iter->cpu);

/* Don't print started cpu buffer for the first entry of the trace */
if (iter->idx > 1)
trace_seq_printf(s, "##### CPU %u buffer started ####\n",
iter->cpu);
}

static enum print_line_t print_trace_fmt(struct trace_iterator *iter)
Expand Down Expand Up @@ -1867,6 +1871,11 @@ __tracing_open(struct inode *inode, struct file *file)
if (current_trace)
*iter->trace = *current_trace;

if (!alloc_cpumask_var(&iter->started, GFP_KERNEL))
goto fail;

cpumask_clear(iter->started);

if (current_trace && current_trace->print_max)
iter->tr = &max_tr;
else
Expand Down Expand Up @@ -1917,6 +1926,7 @@ __tracing_open(struct inode *inode, struct file *file)
if (iter->buffer_iter[cpu])
ring_buffer_read_finish(iter->buffer_iter[cpu]);
}
free_cpumask_var(iter->started);
fail:
mutex_unlock(&trace_types_lock);
kfree(iter->trace);
Expand Down Expand Up @@ -1960,6 +1970,7 @@ static int tracing_release(struct inode *inode, struct file *file)

seq_release(inode, file);
mutex_destroy(&iter->mutex);
free_cpumask_var(iter->started);
kfree(iter->trace);
kfree(iter);
return 0;
Expand Down

0 comments on commit a6ff120

Please sign in to comment.