mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 14:24:11 +08:00
habanalabs: define traces for COMMS protocol
As the COMMS protocol is being used more widely in our driver, an available debug tool for the handshake will be handy. This commit defines tracepoints to various key points of the COMMS protocol. Signed-off-by: Ohad Sharabi <osharabi@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
This commit is contained in:
parent
b219d209ab
commit
811c74baed
@ -87,6 +87,42 @@ DEFINE_EVENT(habanalabs_dma_alloc_template, habanalabs_dma_free,
|
||||
TP_PROTO(struct device *dev, u64 cpu_addr, u64 dma_addr, size_t size, const char *caller),
|
||||
TP_ARGS(dev, cpu_addr, dma_addr, size, caller));
|
||||
|
||||
DECLARE_EVENT_CLASS(habanalabs_comms_template,
|
||||
TP_PROTO(struct device *dev, char *op_str),
|
||||
|
||||
TP_ARGS(dev, op_str),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__string(dname, dev_name(dev))
|
||||
__field(char *, op_str)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__assign_str(dname, dev_name(dev));
|
||||
__entry->op_str = op_str;
|
||||
),
|
||||
|
||||
TP_printk("%s: cms: %s",
|
||||
__get_str(dname),
|
||||
__entry->op_str)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(habanalabs_comms_template, habanalabs_comms_protocol_cmd,
|
||||
TP_PROTO(struct device *dev, char *op_str),
|
||||
TP_ARGS(dev, op_str));
|
||||
|
||||
DEFINE_EVENT(habanalabs_comms_template, habanalabs_comms_send_cmd,
|
||||
TP_PROTO(struct device *dev, char *op_str),
|
||||
TP_ARGS(dev, op_str));
|
||||
|
||||
DEFINE_EVENT(habanalabs_comms_template, habanalabs_comms_wait_status,
|
||||
TP_PROTO(struct device *dev, char *op_str),
|
||||
TP_ARGS(dev, op_str));
|
||||
|
||||
DEFINE_EVENT(habanalabs_comms_template, habanalabs_comms_wait_status_done,
|
||||
TP_PROTO(struct device *dev, char *op_str),
|
||||
TP_ARGS(dev, op_str));
|
||||
|
||||
#endif /* if !defined(_TRACE_HABANALABS_H) || defined(TRACE_HEADER_MULTI_READ) */
|
||||
|
||||
/* This part must be outside protection */
|
||||
|
Loading…
Reference in New Issue
Block a user