tracing/probe: Add trace flag access APIs for trace_probe
Add trace_probe_test/set/clear_flag() functions for accessing trace_probe.flag field. This flags field should not be accessed directly. Link: http://lkml.kernel.org/r/155931585683.28323.314290023236905988.stgit@devnote2 Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:

committed by
Steven Rostedt (VMware)

parent
b5f935ee13
commit
747774d6b0
@@ -948,7 +948,7 @@ int trace_probe_add_file(struct trace_probe *tp, struct trace_event_file *file)
|
||||
link->file = file;
|
||||
INIT_LIST_HEAD(&link->list);
|
||||
list_add_tail_rcu(&link->list, &tp->files);
|
||||
tp->flags |= TP_FLAG_TRACE;
|
||||
trace_probe_set_flag(tp, TP_FLAG_TRACE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -979,7 +979,7 @@ int trace_probe_remove_file(struct trace_probe *tp,
|
||||
kfree(link);
|
||||
|
||||
if (list_empty(&tp->files))
|
||||
tp->flags &= ~TP_FLAG_TRACE;
|
||||
trace_probe_clear_flag(tp, TP_FLAG_TRACE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user