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
Showing the changes to include/linux (2 of 5 files). Show all
Unified · Split
| @@ -45,6 +45,11 @@ const char *trace_print_array_seq(struct trace_seq *p, · 44 unmodified lines | ||
| 45 | 45 | const void *buf, int count, |
| 46 | 46 | size_t el_size); |
| 47 | 47 | |
| 48 | +const char * | |
| 49 | +trace_print_hex_dump_seq(struct trace_seq *p, const char *prefix_str, | |
| 50 | + int prefix_type, int rowsize, int groupsize, | |
| 51 | + const void *buf, size_t len, bool ascii); | |
| 52 | + | |
| 48 | 53 | struct trace_iterator; |
| 49 | 54 | struct trace_event; |
| 50 | 55 | |
| @@ -92,6 +92,10 @@ extern int trace_seq_path(struct trace_seq *s, const struct path *path); · 91 unmodified lines | ||
| 92 | 92 | extern void trace_seq_bitmask(struct trace_seq *s, const unsigned long *maskp, |
| 93 | 93 | int nmaskbits); |
| 94 | 94 | |
| 95 | +extern int trace_seq_hex_dump(struct trace_seq *s, const char *prefix_str, | |
| 96 | + int prefix_type, int rowsize, int groupsize, | |
| 97 | + const void *buf, size_t len, bool ascii); | |
| 98 | + | |
| 95 | 99 | #else /* CONFIG_TRACING */ |
| 96 | 100 | static inline void trace_seq_printf(struct trace_seq *s, const char *fmt, ...) |
| 97 | 101 | { |