Merge tag 'gpio-updates-for-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / kernel / trace / trace_probe.h
index 227d518..99e7a5d 100644 (file)
@@ -38,6 +38,7 @@
 #define FIELD_STRING_IP                "__probe_ip"
 #define FIELD_STRING_RETIP     "__probe_ret_ip"
 #define FIELD_STRING_FUNC      "__probe_func"
+#define FIELD_STRING_TYPE      "__probe_type"
 
 #undef DEFINE_FIELD
 #define DEFINE_FIELD(type, item, name, is_signed)                      \
@@ -102,6 +103,7 @@ enum fetch_op {
        FETCH_OP_MOD_BF,        /* Bitfield: .basesize, .lshift, .rshift */
        // Stage 5 (loop) op
        FETCH_OP_LP_ARRAY,      /* Array: .param = loop count */
+       FETCH_OP_TP_ARG,        /* Trace Point argument */
        FETCH_OP_END,
        FETCH_NOP_SYMBOL,       /* Unresolved Symbol holder */
 };
@@ -351,10 +353,11 @@ int trace_probe_create(const char *raw_command, int (*createfn)(int, const char
 #define TPARG_FL_RETURN BIT(0)
 #define TPARG_FL_KERNEL BIT(1)
 #define TPARG_FL_FENTRY BIT(2)
-#define TPARG_FL_MASK  GENMASK(2, 0)
+#define TPARG_FL_TPOINT BIT(3)
+#define TPARG_FL_MASK  GENMASK(3, 0)
 
 extern int traceprobe_parse_probe_arg(struct trace_probe *tp, int i,
-                               char *arg, unsigned int flags);
+                               const char *argv, unsigned int flags);
 
 extern int traceprobe_update_arg(struct probe_arg *arg);
 extern void traceprobe_free_probe_arg(struct probe_arg *arg);
@@ -363,7 +366,13 @@ extern int traceprobe_split_symbol_offset(char *symbol, long *offset);
 int traceprobe_parse_event_name(const char **pevent, const char **pgroup,
                                char *buf, int offset);
 
-extern int traceprobe_set_print_fmt(struct trace_probe *tp, bool is_return);
+enum probe_print_type {
+       PROBE_PRINT_NORMAL,
+       PROBE_PRINT_RETURN,
+       PROBE_PRINT_EVENT,
+};
+
+extern int traceprobe_set_print_fmt(struct trace_probe *tp, enum probe_print_type ptype);
 
 #ifdef CONFIG_PERF_EVENTS
 extern struct trace_event_call *
@@ -399,6 +408,7 @@ extern int traceprobe_define_arg_fields(struct trace_event_call *event_call,
        C(NO_EVENT_NAME,        "Event name is not specified"),         \
        C(EVENT_TOO_LONG,       "Event name is too long"),              \
        C(BAD_EVENT_NAME,       "Event name must follow the same rules as C identifiers"), \
+       C(EVENT_EXIST,          "Given group/event name is already used by another event"), \
        C(RETVAL_ON_PROBE,      "$retval is not available on probe"),   \
        C(BAD_STACK_NUM,        "Invalid stack number"),                \
        C(BAD_ARG_NUM,          "Invalid argument number"),             \