mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 17:57:38 -04:00
IB/MAD: Add agent trace points
Trace agent details when agents are [un]registered. In addition, report agent details on send/recv. Reviewed-by: "Ruhl, Michael J" <michael.j.ruhl@intel.com> Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
committed by
Jason Gunthorpe
parent
821bf1de45
commit
0e65bae205
@@ -248,6 +248,52 @@ TRACE_EVENT(ib_mad_recv_done_handler,
|
||||
)
|
||||
);
|
||||
|
||||
DECLARE_EVENT_CLASS(ib_mad_agent_template,
|
||||
TP_PROTO(struct ib_mad_agent_private *agent),
|
||||
TP_ARGS(agent),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(u32, dev_index)
|
||||
__field(u32, hi_tid)
|
||||
__field(u8, port_num)
|
||||
__field(u8, mgmt_class)
|
||||
__field(u8, mgmt_class_version)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->dev_index = agent->agent.device->index;
|
||||
__entry->port_num = agent->agent.port_num;
|
||||
__entry->hi_tid = agent->agent.hi_tid;
|
||||
|
||||
if (agent->reg_req) {
|
||||
__entry->mgmt_class = agent->reg_req->mgmt_class;
|
||||
__entry->mgmt_class_version =
|
||||
agent->reg_req->mgmt_class_version;
|
||||
} else {
|
||||
__entry->mgmt_class = 0;
|
||||
__entry->mgmt_class_version = 0;
|
||||
}
|
||||
),
|
||||
|
||||
TP_printk("%d:%d mad agent : hi_tid 0x%08x class 0x%02x class_ver 0x%02x",
|
||||
__entry->dev_index, __entry->port_num,
|
||||
__entry->hi_tid, __entry->mgmt_class,
|
||||
__entry->mgmt_class_version
|
||||
)
|
||||
);
|
||||
DEFINE_EVENT(ib_mad_agent_template, ib_mad_recv_done_agent,
|
||||
TP_PROTO(struct ib_mad_agent_private *agent),
|
||||
TP_ARGS(agent));
|
||||
DEFINE_EVENT(ib_mad_agent_template, ib_mad_send_done_agent,
|
||||
TP_PROTO(struct ib_mad_agent_private *agent),
|
||||
TP_ARGS(agent));
|
||||
DEFINE_EVENT(ib_mad_agent_template, ib_mad_create_agent,
|
||||
TP_PROTO(struct ib_mad_agent_private *agent),
|
||||
TP_ARGS(agent));
|
||||
DEFINE_EVENT(ib_mad_agent_template, ib_mad_unregister_agent,
|
||||
TP_PROTO(struct ib_mad_agent_private *agent),
|
||||
TP_ARGS(agent));
|
||||
|
||||
|
||||
#endif /* _TRACE_IB_MAD_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user