]> Pileus Git - ~andy/linux/blobdiff - kernel/trace/trace_probe.h
tracing/kprobes: Factor out struct trace_probe
[~andy/linux] / kernel / trace / trace_probe.h
index 5c7e09d10d74d54638a0d845ca0d5c5f1a328f12..984e91ed8a4440fa2e796edebd898aa3053defec 100644 (file)
@@ -124,6 +124,26 @@ struct probe_arg {
        const struct fetch_type *type;  /* Type of this argument */
 };
 
+struct trace_probe {
+       unsigned int                    flags;  /* For TP_FLAG_* */
+       struct ftrace_event_class       class;
+       struct ftrace_event_call        call;
+       struct list_head                files;
+       ssize_t                         size;   /* trace entry size */
+       unsigned int                    nr_args;
+       struct probe_arg                args[];
+};
+
+static inline bool trace_probe_is_enabled(struct trace_probe *tp)
+{
+       return !!(tp->flags & (TP_FLAG_TRACE | TP_FLAG_PROFILE));
+}
+
+static inline bool trace_probe_is_registered(struct trace_probe *tp)
+{
+       return !!(tp->flags & TP_FLAG_REGISTERED);
+}
+
 static inline __kprobes void call_fetch(struct fetch_param *fprm,
                                 struct pt_regs *regs, void *dest)
 {