aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/traceevent
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2018-01-11 19:47:47 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-01-17 08:22:13 -0500
commite877372880f72399323e433187cce2bfbea40263 (patch)
tree7b574465067ee976fe1467be6154a45375c845b6 /tools/lib/traceevent
parent37db96bb49629681cb839d7304a70524fe10f969 (diff)
tools lib traceevent: Show contents (in hex) of data of unrecognized type records
When a record has an unrecognized type, an error message is reported, but it would also be helpful to see the contents of that record. At least show what it is in hex, instead of just showing a blank line. Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Link: http://lkml.kernel.org/r/20180112004822.542204577@goodmis.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/traceevent')
-rw-r--r--tools/lib/traceevent/event-parse.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 344a034a8fbc..e5f2acbb70cc 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -5566,8 +5566,14 @@ void pevent_print_event(struct pevent *pevent, struct trace_seq *s,
5566 5566
5567 event = pevent_find_event_by_record(pevent, record); 5567 event = pevent_find_event_by_record(pevent, record);
5568 if (!event) { 5568 if (!event) {
5569 do_warning("ug! no event found for type %d", 5569 int i;
5570 trace_parse_common_type(pevent, record->data)); 5570 int type = trace_parse_common_type(pevent, record->data);
5571
5572 do_warning("ug! no event found for type %d", type);
5573 trace_seq_printf(s, "[UNKNOWN TYPE %d]", type);
5574 for (i = 0; i < record->size; i++)
5575 trace_seq_printf(s, " %02x",
5576 ((unsigned char *)record->data)[i]);
5571 return; 5577 return;
5572 } 5578 }
5573 5579