[RFC][PATCH 09/11] tracing: Do not disable tracing when reading the trace file

From: Steven Rostedt
Date: Tue Mar 17 2020 - 17:35:19 EST


From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx>

When opening the "trace" file, it is no longer necessary to disable tracing.

Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
---
kernel/trace/trace.c | 8 --------
1 file changed, 8 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 1085b3d5d0dc..a60f49c401f9 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -4261,10 +4261,6 @@ __tracing_open(struct inode *inode, struct file *file, bool snapshot)
if (trace_clocks[tr->clock_id].in_ns)
iter->iter_flags |= TRACE_FILE_TIME_IN_NS;

- /* stop the trace while dumping if we are not opening "snapshot" */
- if (!iter->snapshot)
- tracing_stop_tr(tr);
-
if (iter->cpu_file == RING_BUFFER_ALL_CPUS) {
for_each_tracing_cpu(cpu) {
iter->buffer_iter[cpu] =
@@ -4358,10 +4354,6 @@ static int tracing_release(struct inode *inode, struct file *file)
if (iter->trace && iter->trace->close)
iter->trace->close(iter);

- if (!iter->snapshot)
- /* reenable tracing if it was previously enabled */
- tracing_start_tr(tr);
-
__trace_array_put(tr);

mutex_unlock(&trace_types_lock);
--
2.25.1