History

firmware: arm_scmi: Harmonize SCMI tracing message format

After the recently added new scmi_msg_dump traces, the general format of the various other SCMI traces are not consistent. As an example the full traces of a simple PERF_LEVEL_SET: | cpufreq-set-276 scmi_xfer_begin: transfer_id=145 msg_id=7 protocol_id=19 seq=145 poll=0 | cpufreq-set-276 scmi_msg_dump: pt=13 t=CMND msg_id=07 seq=0091 s=0 pyld=000000008066ab13 | cpufreq-set-276 scmi_xfer_response_wait: transfer_id=145 msg_id=7 protocol_id=19 seq=145 tmo_ms=5000 poll=0 | <idle>-0 scmi_msg_dump: pt=13 t=RESP msg_id=07 seq=0091 s=0 pyld= | <idle>-0 scmi_rx_done: transfer_id=145 msg_id=7 protocol_id=19 seq=145 msg_type=0 | cpufreq-set-276 scmi_xfer_end: transfer_id=145 msg_id=7 protocol_id=19 seq=145 status=0 ... where the same information is being reported using different names (protocol_id= vs pt=) and even worst different bases, which is hard to read and to parse. So let us unify them, using the same naming and ordering of the fields (wherever possible) and moving all the protocol related fields to base-16 while keeping in base-10 timeouts, res_id and values, so that the new traces would be like: | cpufreq-set-274 scmi_xfer_begin: pt=13 msg_id=07 seq=0092 transfer_id=92 poll=0 | cpufreq-set-274 scmi_msg_dump: pt=13 t=CMND msg_id=07 seq=0092 s=0 pyld=000000008066ab13 | cpufreq-set-274 scmi_xfer_response_wait: pt=13 msg_id=07 seq=0092 transfer_id=92 tmo_ms=5000 poll=0 | cat-256 scmi_msg_dump: pt=13 t=RESP msg_id=07 seq=0092 s=0 pyld= | cat-256 scmi_rx_done: pt=13 msg_id=07 seq=0092 transfer_id=92 msg_type=0 | cpufreq-set-274 scmi_xfer_end: pt=13 msg_id=07 seq=0092 transfer_id=92 s=0

Cristian Marussi committed 4 years ago

Commit 40d30cf1 parent dea796f1 file · +15 −15Browse files

Showing the changes to include/trace (1 of 1 file). Show all

Unified · Split

include/trace/events/scmi.h+15−15
@@ -27,9 +27,9 @@ TRACE_EVENT(scmi_fc_call, · 26 unmodified lines
27 __entry->val2 = val2;27 __entry->val2 = val2;
28 ),28 ),
29 29
30 TP_printk("[0x%02X]:[0x%02X]:[%08X]:%u:%u",30 TP_printk("pt=%02X msg_id=%02X res_id:%u vals=%u:%u",
31 __entry->protocol_id, __entry->msg_id,31 __entry->protocol_id, __entry->msg_id,
32 __entry->res_id, __entry->val1, __entry->val2)32 __entry->res_id, __entry->val1, __entry->val2)
33);33);
34 34
35TRACE_EVENT(scmi_xfer_begin,35TRACE_EVENT(scmi_xfer_begin,
@@ -53,9 +53,9 @@ TRACE_EVENT(scmi_xfer_begin, · 17 unmodified lines
53 __entry->poll = poll;53 __entry->poll = poll;
54 ),54 ),
55 55
56 TP_printk("transfer_id=%d msg_id=%u protocol_id=%u seq=%u poll=%u",56 TP_printk("pt=%02X msg_id=%02X seq=%04X transfer_id=%X poll=%u",
57 __entry->transfer_id, __entry->msg_id, __entry->protocol_id,57 __entry->protocol_id, __entry->msg_id, __entry->seq,
58 __entry->seq, __entry->poll)58 __entry->transfer_id, __entry->poll)
59);59);
60 60
61TRACE_EVENT(scmi_xfer_response_wait,61TRACE_EVENT(scmi_xfer_response_wait,
@@ -81,9 +81,9 @@ TRACE_EVENT(scmi_xfer_response_wait, · 19 unmodified lines
81 __entry->poll = poll;81 __entry->poll = poll;
82 ),82 ),
83 83
84 TP_printk("transfer_id=%d msg_id=%u protocol_id=%u seq=%u tmo_ms=%u poll=%u",84 TP_printk("pt=%02X msg_id=%02X seq=%04X transfer_id=%X tmo_ms=%u poll=%u",
85 __entry->transfer_id, __entry->msg_id, __entry->protocol_id,85 __entry->protocol_id, __entry->msg_id, __entry->seq,
86 __entry->seq, __entry->timeout, __entry->poll)86 __entry->transfer_id, __entry->timeout, __entry->poll)
87);87);
88 88
89TRACE_EVENT(scmi_xfer_end,89TRACE_EVENT(scmi_xfer_end,
@@ -107,9 +107,9 @@ TRACE_EVENT(scmi_xfer_end, · 17 unmodified lines
107 __entry->status = status;107 __entry->status = status;
108 ),108 ),
109 109
110 TP_printk("transfer_id=%d msg_id=%u protocol_id=%u seq=%u status=%d",110 TP_printk("pt=%02X msg_id=%02X seq=%04X transfer_id=%X s=%d",
111 __entry->transfer_id, __entry->msg_id, __entry->protocol_id,111 __entry->protocol_id, __entry->msg_id, __entry->seq,
112 __entry->seq, __entry->status)112 __entry->transfer_id, __entry->status)
113);113);
114 114
115TRACE_EVENT(scmi_rx_done,115TRACE_EVENT(scmi_rx_done,
@@ -133,9 +133,9 @@ TRACE_EVENT(scmi_rx_done, · 17 unmodified lines
133 __entry->msg_type = msg_type;133 __entry->msg_type = msg_type;
134 ),134 ),
135 135
136 TP_printk("transfer_id=%d msg_id=%u protocol_id=%u seq=%u msg_type=%u",136 TP_printk("pt=%02X msg_id=%02X seq=%04X transfer_id=%X msg_type=%u",
137 __entry->transfer_id, __entry->msg_id, __entry->protocol_id,137 __entry->protocol_id, __entry->msg_id, __entry->seq,
138 __entry->seq, __entry->msg_type)138 __entry->transfer_id, __entry->msg_type)
139);139);
140 140
141TRACE_EVENT(scmi_msg_dump,141TRACE_EVENT(scmi_msg_dump,