Commit 8c523a9d authored by Ingo Molnar's avatar Ingo Molnar Committed by Thomas Gleixner

ftrace: clean-up-pipe-iteration

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent cdd31cd2
...@@ -770,12 +770,12 @@ find_next_entry(struct trace_iterator *iter, int *ent_cpu) ...@@ -770,12 +770,12 @@ find_next_entry(struct trace_iterator *iter, int *ent_cpu)
return next; return next;
} }
static notrace void static notrace void trace_iterator_increment(struct trace_iterator *iter)
trace_iterator_increment(struct trace_iterator *iter)
{ {
iter->idx++; iter->idx++;
iter->next_idx[iter->cpu]++; iter->next_idx[iter->cpu]++;
iter->next_page_idx[iter->cpu]++; iter->next_page_idx[iter->cpu]++;
if (iter->next_page_idx[iter->cpu] >= ENTRIES_PER_PAGE) { if (iter->next_page_idx[iter->cpu] >= ENTRIES_PER_PAGE) {
struct trace_array_cpu *data = iter->tr->data[iter->cpu]; struct trace_array_cpu *data = iter->tr->data[iter->cpu];
...@@ -785,8 +785,7 @@ trace_iterator_increment(struct trace_iterator *iter) ...@@ -785,8 +785,7 @@ trace_iterator_increment(struct trace_iterator *iter)
} }
} }
static notrace void static notrace void trace_consume(struct trace_iterator *iter)
trace_consume(struct trace_iterator *iter)
{ {
struct trace_array_cpu *data = iter->tr->data[iter->cpu]; struct trace_array_cpu *data = iter->tr->data[iter->cpu];
...@@ -802,8 +801,7 @@ trace_consume(struct trace_iterator *iter) ...@@ -802,8 +801,7 @@ trace_consume(struct trace_iterator *iter)
data->trace_idx = 0; data->trace_idx = 0;
} }
static notrace void * static notrace void *find_next_entry_inc(struct trace_iterator *iter)
find_next_entry_inc(struct trace_iterator *iter)
{ {
struct trace_entry *next; struct trace_entry *next;
int next_cpu = -1; int next_cpu = -1;
...@@ -1871,14 +1869,7 @@ tracing_read_pipe(struct file *filp, char __user *ubuf, ...@@ -1871,14 +1869,7 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
cpu_set(cpu, mask); cpu_set(cpu, mask);
} }
while ((entry = find_next_entry(iter, &cpu))) { while ((entry = find_next_entry_inc(iter)) != NULL) {
if (!entry)
break;
iter->ent = entry;
iter->cpu = cpu;
ret = print_trace_fmt(iter); ret = print_trace_fmt(iter);
if (!ret) if (!ret)
break; break;
...@@ -1887,7 +1878,6 @@ tracing_read_pipe(struct file *filp, char __user *ubuf, ...@@ -1887,7 +1878,6 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
if (iter->seq.len >= cnt) if (iter->seq.len >= cnt)
break; break;
} }
for_each_cpu_mask(cpu, mask) { for_each_cpu_mask(cpu, mask) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment