tracing: Add array printing helper
[sfrench/cifs-2.6.git] / include / trace / ftrace.h
index 139b5067345b2ecb2daa1881d8b484ad76cf382a..304901fc5f34c6ef25c9176a0803ada2714e5e4f 100644 (file)
 #undef __print_hex
 #define __print_hex(buf, buf_len) ftrace_print_hex_seq(p, buf, buf_len)
 
+#undef __print_array
+#define __print_array(array, count, el_size)                           \
+       ({                                                              \
+               BUILD_BUG_ON(el_size != 1 && el_size != 2 &&            \
+                            el_size != 4 && el_size != 8);             \
+               ftrace_print_array_seq(p, array, count, el_size);       \
+       })
+
 #undef DECLARE_EVENT_CLASS
 #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
 static notrace enum print_line_t                                       \
@@ -674,6 +682,7 @@ static inline void ftrace_test_probe_##call(void)                   \
 #undef __get_dynamic_array_len
 #undef __get_str
 #undef __get_bitmask
+#undef __print_array
 
 #undef TP_printk
 #define TP_printk(fmt, args...) "\"" fmt "\", "  __stringify(args)