aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/trace_seq.h
diff options
context:
space:
mode:
authorPiotr Maziarz <piotrx.maziarz@linux.intel.com>2019-11-07 13:45:38 +0100
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2019-11-14 13:15:12 -0500
commitef56e047b2bd4dabb801fd073dfcab5f40de5f78 (patch)
treed69ed71105f51439cc4bb84b997bd6410ad8ded7 /include/linux/trace_seq.h
parentseq_buf: Add printing formatted hex dumps (diff)
downloadwireguard-linux-ef56e047b2bd4dabb801fd073dfcab5f40de5f78.tar.xz
wireguard-linux-ef56e047b2bd4dabb801fd073dfcab5f40de5f78.zip
tracing: Use seq_buf_hex_dump() to dump buffers
Without this, buffers can be printed with __print_array macro that has no formatting options and can be hard to read. The other way is to mimic formatting capability with multiple calls of trace event with one call per row which gives performance impact and different timestamp in each row. Link: http://lkml.kernel.org/r/1573130738-29390-2-git-send-email-piotrx.maziarz@linux.intel.com Signed-off-by: Piotr Maziarz <piotrx.maziarz@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/trace_seq.h')
-rw-r--r--include/linux/trace_seq.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/trace_seq.h b/include/linux/trace_seq.h
index 6609b39a7232..6c30508fca19 100644
--- a/include/linux/trace_seq.h
+++ b/include/linux/trace_seq.h
@@ -92,6 +92,10 @@ extern int trace_seq_path(struct trace_seq *s, const struct path *path);
extern void trace_seq_bitmask(struct trace_seq *s, const unsigned long *maskp,
int nmaskbits);
+extern int trace_seq_hex_dump(struct trace_seq *s, const char *prefix_str,
+ int prefix_type, int rowsize, int groupsize,
+ const void *buf, size_t len, bool ascii);
+
#else /* CONFIG_TRACING */
static inline void trace_seq_printf(struct trace_seq *s, const char *fmt, ...)
{