@@ -85,6 +85,44 @@ DECLARE_EVENT_CLASS(xprtrdma_rxprt,
85
85
), \
86
86
TP_ARGS(r_xprt))
87
87
88
+ DECLARE_EVENT_CLASS (xprtrdma_connect_class ,
89
+ TP_PROTO (
90
+ const struct rpcrdma_xprt * r_xprt ,
91
+ int rc
92
+ ),
93
+
94
+ TP_ARGS (r_xprt , rc ),
95
+
96
+ TP_STRUCT__entry (
97
+ __field (const void * , r_xprt )
98
+ __field (int , rc )
99
+ __field (int , connect_status )
100
+ __string (addr , rpcrdma_addrstr (r_xprt ))
101
+ __string (port , rpcrdma_portstr (r_xprt ))
102
+ ),
103
+
104
+ TP_fast_assign (
105
+ __entry -> r_xprt = r_xprt ;
106
+ __entry -> rc = rc ;
107
+ __entry -> connect_status = r_xprt -> rx_ep .rep_connected ;
108
+ __assign_str (addr , rpcrdma_addrstr (r_xprt ));
109
+ __assign_str (port , rpcrdma_portstr (r_xprt ));
110
+ ),
111
+
112
+ TP_printk ("peer=[%s]:%s r_xprt=%p: rc=%d connect status=%d" ,
113
+ __get_str (addr ), __get_str (port ), __entry -> r_xprt ,
114
+ __entry -> rc , __entry -> connect_status
115
+ )
116
+ );
117
+
118
+ #define DEFINE_CONN_EVENT (name ) \
119
+ DEFINE_EVENT(xprtrdma_connect_class, xprtrdma_##name, \
120
+ TP_PROTO( \
121
+ const struct rpcrdma_xprt *r_xprt, \
122
+ int rc \
123
+ ), \
124
+ TP_ARGS(r_xprt, rc))
125
+
88
126
DECLARE_EVENT_CLASS (xprtrdma_rdch_event ,
89
127
TP_PROTO (
90
128
const struct rpc_task * task ,
@@ -333,47 +371,44 @@ TRACE_EVENT(xprtrdma_cm_event,
333
371
)
334
372
);
335
373
336
- TRACE_EVENT (xprtrdma_disconnect ,
374
+ DEFINE_CONN_EVENT (connect );
375
+ DEFINE_CONN_EVENT (disconnect );
376
+
377
+ DEFINE_RXPRT_EVENT (xprtrdma_create );
378
+ DEFINE_RXPRT_EVENT (xprtrdma_op_destroy );
379
+ DEFINE_RXPRT_EVENT (xprtrdma_remove );
380
+ DEFINE_RXPRT_EVENT (xprtrdma_reinsert );
381
+ DEFINE_RXPRT_EVENT (xprtrdma_op_inject_dsc );
382
+ DEFINE_RXPRT_EVENT (xprtrdma_op_close );
383
+
384
+ TRACE_EVENT (xprtrdma_op_connect ,
337
385
TP_PROTO (
338
386
const struct rpcrdma_xprt * r_xprt ,
339
- int status
387
+ unsigned long delay
340
388
),
341
389
342
- TP_ARGS (r_xprt , status ),
390
+ TP_ARGS (r_xprt , delay ),
343
391
344
392
TP_STRUCT__entry (
345
393
__field (const void * , r_xprt )
346
- __field (int , status )
347
- __field (int , connected )
394
+ __field (unsigned long , delay )
348
395
__string (addr , rpcrdma_addrstr (r_xprt ))
349
396
__string (port , rpcrdma_portstr (r_xprt ))
350
397
),
351
398
352
399
TP_fast_assign (
353
400
__entry -> r_xprt = r_xprt ;
354
- __entry -> status = status ;
355
- __entry -> connected = r_xprt -> rx_ep .rep_connected ;
401
+ __entry -> delay = delay ;
356
402
__assign_str (addr , rpcrdma_addrstr (r_xprt ));
357
403
__assign_str (port , rpcrdma_portstr (r_xprt ));
358
404
),
359
405
360
- TP_printk ("peer=[%s]:%s r_xprt=%p: status=%d %sconnected" ,
361
- __get_str (addr ), __get_str (port ),
362
- __entry -> r_xprt , __entry -> status ,
363
- __entry -> connected == 1 ? "still " : "dis"
406
+ TP_printk ("peer=[%s]:%s r_xprt=%p delay=%lu" ,
407
+ __get_str (addr ), __get_str (port ), __entry -> r_xprt ,
408
+ __entry -> delay
364
409
)
365
410
);
366
411
367
- DEFINE_RXPRT_EVENT (xprtrdma_conn_start );
368
- DEFINE_RXPRT_EVENT (xprtrdma_conn_tout );
369
- DEFINE_RXPRT_EVENT (xprtrdma_create );
370
- DEFINE_RXPRT_EVENT (xprtrdma_op_destroy );
371
- DEFINE_RXPRT_EVENT (xprtrdma_remove );
372
- DEFINE_RXPRT_EVENT (xprtrdma_reinsert );
373
- DEFINE_RXPRT_EVENT (xprtrdma_reconnect );
374
- DEFINE_RXPRT_EVENT (xprtrdma_op_inject_dsc );
375
- DEFINE_RXPRT_EVENT (xprtrdma_op_close );
376
- DEFINE_RXPRT_EVENT (xprtrdma_op_connect );
377
412
378
413
TRACE_EVENT (xprtrdma_op_set_cto ,
379
414
TP_PROTO (
0 commit comments