Skip to content

Commit a6eaa24

Browse files
svens-s390rostedt
authored andcommitted
tracing: Use ring_buffer_record_is_set_on() in tracer_tracing_is_on()
tracer_tracing_is_on() checks whether record_disabled is not zero. This checks both the record_disabled counter and the RB_BUFFER_OFF flag. Reading the source it looks like this function should only check for the RB_BUFFER_OFF flag. Therefore use ring_buffer_record_is_set_on(). This fixes spurious fails in the 'test for function traceon/off triggers' test from the ftrace testsuite when the system is under load. Link: https://lore.kernel.org/linux-trace-kernel/20240205065340.2848065-1-svens@linux.ibm.com Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Tested-By: Mete Durlu <meted@linux.ibm.com> Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent bdbddb1 commit a6eaa24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/trace/trace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,7 @@ void disable_trace_on_warning(void)
15321532
bool tracer_tracing_is_on(struct trace_array *tr)
15331533
{
15341534
if (tr->array_buffer.buffer)
1535-
return ring_buffer_record_is_on(tr->array_buffer.buffer);
1535+
return ring_buffer_record_is_set_on(tr->array_buffer.buffer);
15361536
return !tr->buffer_disabled;
15371537
}
15381538

0 commit comments

Comments
 (0)