aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index fd6e1b906b3c..9541c27c1cf2 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -779,6 +779,11 @@ __acquires(kernel_lock)
779 tracing_reset_online_cpus(tr); 779 tracing_reset_online_cpus(tr);
780 780
781 current_trace = type; 781 current_trace = type;
782
783 /* If we expanded the buffers, make sure the max is expanded too */
784 if (ring_buffer_expanded && type->use_max_tr)
785 ring_buffer_resize(max_tr.buffer, trace_buf_size);
786
782 /* the test is responsible for initializing and enabling */ 787 /* the test is responsible for initializing and enabling */
783 pr_info("Testing tracer %s: ", type->name); 788 pr_info("Testing tracer %s: ", type->name);
784 ret = type->selftest(type, tr); 789 ret = type->selftest(type, tr);
@@ -791,6 +796,10 @@ __acquires(kernel_lock)
791 /* Only reset on passing, to avoid touching corrupted buffers */ 796 /* Only reset on passing, to avoid touching corrupted buffers */
792 tracing_reset_online_cpus(tr); 797 tracing_reset_online_cpus(tr);
793 798
799 /* Shrink the max buffer again */
800 if (ring_buffer_expanded && type->use_max_tr)
801 ring_buffer_resize(max_tr.buffer, 1);
802
794 printk(KERN_CONT "PASSED\n"); 803 printk(KERN_CONT "PASSED\n");
795 } 804 }
796#endif 805#endif