mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 16:30:52 +07:00
ftrace: reset selftests
The tests may leave stuff in the buffers. This resets the buffers after each test is run. If a test fails, it does not reset the buffer to avoid touching a buffer that is corrupted. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
08bafa0efc
commit
1d4db00a5e
@ -289,6 +289,13 @@ int register_tracer(struct tracer *type)
|
||||
printk(KERN_CONT "FAILED!\n");
|
||||
goto out;
|
||||
}
|
||||
/* Only reset on passing, to avoid touching corrupted buffers */
|
||||
for_each_possible_cpu(i) {
|
||||
data = tr->data[i];
|
||||
if (!head_page(data))
|
||||
continue;
|
||||
tracing_reset(data);
|
||||
}
|
||||
printk(KERN_CONT "PASSED\n");
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user