aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 35ee63ae4122..e60f4be10d64 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1666,6 +1666,19 @@ static int trace_empty(struct trace_iterator *iter)
1666{ 1666{
1667 int cpu; 1667 int cpu;
1668 1668
1669 /* If we are looking at one CPU buffer, only check that one */
1670 if (iter->cpu_file != TRACE_PIPE_ALL_CPU) {
1671 cpu = iter->cpu_file;
1672 if (iter->buffer_iter[cpu]) {
1673 if (!ring_buffer_iter_empty(iter->buffer_iter[cpu]))
1674 return 0;
1675 } else {
1676 if (!ring_buffer_empty_cpu(iter->tr->buffer, cpu))
1677 return 0;
1678 }
1679 return 1;
1680 }
1681
1669 for_each_tracing_cpu(cpu) { 1682 for_each_tracing_cpu(cpu) {
1670 if (iter->buffer_iter[cpu]) { 1683 if (iter->buffer_iter[cpu]) {
1671 if (!ring_buffer_iter_empty(iter->buffer_iter[cpu])) 1684 if (!ring_buffer_iter_empty(iter->buffer_iter[cpu]))