Commit 3daed3db authored by Tomas Glozar's avatar Tomas Glozar Committed by Wentao Guan
Browse files

rtla: Add trace_instance_stop

stable inclusion
from stable-v6.6.78
commit 5a9eb34972cb60b64b61a2d4a6fa05b6b342ac58
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IBX1M5

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5a9eb34972cb60b64b61a2d4a6fa05b6b342ac58

--------------------------------

commit e879b5dcf8d044f3865a32d95cc5b213f314c54f upstream.

Support not only turning trace on for the timerlat tracer, but also
turning it off.

This will be used in subsequent patches to stop the timerlat tracer
without also wiping the trace buffer.

Cc: stable@vger.kernel.org
Cc: John Kacur <jkacur@redhat.com>
Cc: Luis Goncalves <lgoncalv@redhat.com>
Cc: Gabriele Monaco <gmonaco@redhat.com>
Link: https://lore.kernel.org/20250116144931.649593-2-tglozar@redhat.com


Signed-off-by: default avatarTomas Glozar <tglozar@redhat.com>
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 5a9eb34972cb60b64b61a2d4a6fa05b6b342ac58)
Signed-off-by: default avatarWentao Guan <guanwentao@uniontech.com>
parent 4a03d901
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -196,6 +196,14 @@ int trace_instance_start(struct trace_instance *trace)
	return tracefs_trace_on(trace->inst);
}

/*
 * trace_instance_stop - stop tracing a given rtla instance
 */
int trace_instance_stop(struct trace_instance *trace)
{
	return tracefs_trace_off(trace->inst);
}

/*
 * trace_events_free - free a list of trace events
 */
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ struct trace_instance {

int trace_instance_init(struct trace_instance *trace, char *tool_name);
int trace_instance_start(struct trace_instance *trace);
int trace_instance_stop(struct trace_instance *trace);
void trace_instance_destroy(struct trace_instance *trace);

struct trace_seq *get_trace_seq(void);