summaryrefslogtreecommitdiff
path: root/include/trace/trace_events.h
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2017-01-25 02:28:16 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-25 13:17:47 -0500
commit2acae0d5b0f73a8fb4b180bd13491feb96e55fc6 (patch)
tree2446a003c916ffd69a70a4ec167848c67aa2305b /include/trace/trace_events.h
parent60b1af3300724d211bb0b420c1fbe6bf5b87b013 (diff)
trace: add variant without spacing in trace_print_hex_seq
For upcoming tracepoint support for BPF, we want to dump the program's tag. Format should be similar to __print_hex(), but without spacing. Add a __print_hex_str() variant for exactly that purpose that reuses trace_print_hex_seq(). Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/trace/trace_events.h')
-rw-r--r--include/trace/trace_events.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/trace/trace_events.h b/include/trace/trace_events.h
index 467e12f780d8..9f684629c3cf 100644
--- a/include/trace/trace_events.h
+++ b/include/trace/trace_events.h
@@ -297,7 +297,12 @@ TRACE_MAKE_SYSTEM_STR();
#endif
#undef __print_hex
-#define __print_hex(buf, buf_len) trace_print_hex_seq(p, buf, buf_len)
+#define __print_hex(buf, buf_len) \
+ trace_print_hex_seq(p, buf, buf_len, true)
+
+#undef __print_hex_str
+#define __print_hex_str(buf, buf_len) \
+ trace_print_hex_seq(p, buf, buf_len, false)
#undef __print_array
#define __print_array(array, count, el_size) \
@@ -711,6 +716,7 @@ static inline void ftrace_test_probe_##call(void) \
#undef __print_flags
#undef __print_symbolic
#undef __print_hex
+#undef __print_hex_str
#undef __get_dynamic_array
#undef __get_dynamic_array_len
#undef __get_str