diff options
Diffstat (limited to 'include/trace/events/rxrpc.h')
| -rw-r--r-- | include/trace/events/rxrpc.h | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/include/trace/events/rxrpc.h b/include/trace/events/rxrpc.h index 9e96c2fe2793..077e664ac9a2 100644 --- a/include/trace/events/rxrpc.h +++ b/include/trace/events/rxrpc.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #define _TRACE_RXRPC_H | 15 | #define _TRACE_RXRPC_H |
| 16 | 16 | ||
| 17 | #include <linux/tracepoint.h> | 17 | #include <linux/tracepoint.h> |
| 18 | #include <linux/errqueue.h> | ||
| 18 | 19 | ||
| 19 | /* | 20 | /* |
| 20 | * Define enums for tracing information. | 21 | * Define enums for tracing information. |
| @@ -210,6 +211,20 @@ enum rxrpc_congest_change { | |||
| 210 | rxrpc_cong_saw_nack, | 211 | rxrpc_cong_saw_nack, |
| 211 | }; | 212 | }; |
| 212 | 213 | ||
| 214 | enum rxrpc_tx_fail_trace { | ||
| 215 | rxrpc_tx_fail_call_abort, | ||
| 216 | rxrpc_tx_fail_call_ack, | ||
| 217 | rxrpc_tx_fail_call_data_frag, | ||
| 218 | rxrpc_tx_fail_call_data_nofrag, | ||
| 219 | rxrpc_tx_fail_call_final_resend, | ||
| 220 | rxrpc_tx_fail_conn_abort, | ||
| 221 | rxrpc_tx_fail_conn_challenge, | ||
| 222 | rxrpc_tx_fail_conn_response, | ||
| 223 | rxrpc_tx_fail_reject, | ||
| 224 | rxrpc_tx_fail_version_keepalive, | ||
| 225 | rxrpc_tx_fail_version_reply, | ||
| 226 | }; | ||
| 227 | |||
| 213 | #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */ | 228 | #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */ |
| 214 | 229 | ||
| 215 | /* | 230 | /* |
| @@ -437,6 +452,19 @@ enum rxrpc_congest_change { | |||
| 437 | EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \ | 452 | EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \ |
| 438 | E_(RXRPC_CALL_NETWORK_ERROR, "NetError") | 453 | E_(RXRPC_CALL_NETWORK_ERROR, "NetError") |
| 439 | 454 | ||
| 455 | #define rxrpc_tx_fail_traces \ | ||
| 456 | EM(rxrpc_tx_fail_call_abort, "CallAbort") \ | ||
| 457 | EM(rxrpc_tx_fail_call_ack, "CallAck") \ | ||
| 458 | EM(rxrpc_tx_fail_call_data_frag, "CallDataFrag") \ | ||
| 459 | EM(rxrpc_tx_fail_call_data_nofrag, "CallDataNofrag") \ | ||
| 460 | EM(rxrpc_tx_fail_call_final_resend, "CallFinalResend") \ | ||
| 461 | EM(rxrpc_tx_fail_conn_abort, "ConnAbort") \ | ||
| 462 | EM(rxrpc_tx_fail_conn_challenge, "ConnChall") \ | ||
| 463 | EM(rxrpc_tx_fail_conn_response, "ConnResp") \ | ||
| 464 | EM(rxrpc_tx_fail_reject, "Reject") \ | ||
| 465 | EM(rxrpc_tx_fail_version_keepalive, "VerKeepalive") \ | ||
| 466 | E_(rxrpc_tx_fail_version_reply, "VerReply") | ||
| 467 | |||
| 440 | /* | 468 | /* |
| 441 | * Export enum symbols via userspace. | 469 | * Export enum symbols via userspace. |
| 442 | */ | 470 | */ |
| @@ -460,6 +488,7 @@ rxrpc_propose_ack_traces; | |||
| 460 | rxrpc_propose_ack_outcomes; | 488 | rxrpc_propose_ack_outcomes; |
| 461 | rxrpc_congest_modes; | 489 | rxrpc_congest_modes; |
| 462 | rxrpc_congest_changes; | 490 | rxrpc_congest_changes; |
| 491 | rxrpc_tx_fail_traces; | ||
| 463 | 492 | ||
| 464 | /* | 493 | /* |
| 465 | * Now redefine the EM() and E_() macros to map the enums to the strings that | 494 | * Now redefine the EM() and E_() macros to map the enums to the strings that |
| @@ -1374,6 +1403,62 @@ TRACE_EVENT(rxrpc_resend, | |||
| 1374 | __entry->anno) | 1403 | __entry->anno) |
| 1375 | ); | 1404 | ); |
| 1376 | 1405 | ||
| 1406 | TRACE_EVENT(rxrpc_rx_icmp, | ||
| 1407 | TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee, | ||
| 1408 | struct sockaddr_rxrpc *srx), | ||
| 1409 | |||
| 1410 | TP_ARGS(peer, ee, srx), | ||
| 1411 | |||
| 1412 | TP_STRUCT__entry( | ||
| 1413 | __field(unsigned int, peer ) | ||
| 1414 | __field_struct(struct sock_extended_err, ee ) | ||
| 1415 | __field_struct(struct sockaddr_rxrpc, srx ) | ||
| 1416 | ), | ||
| 1417 | |||
| 1418 | TP_fast_assign( | ||
| 1419 | __entry->peer = peer->debug_id; | ||
| 1420 | memcpy(&__entry->ee, ee, sizeof(__entry->ee)); | ||
| 1421 | memcpy(&__entry->srx, srx, sizeof(__entry->srx)); | ||
| 1422 | ), | ||
| 1423 | |||
| 1424 | TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp", | ||
| 1425 | __entry->peer, | ||
| 1426 | __entry->ee.ee_origin, | ||
| 1427 | __entry->ee.ee_type, | ||
| 1428 | __entry->ee.ee_code, | ||
| 1429 | __entry->ee.ee_info, | ||
| 1430 | __entry->ee.ee_data, | ||
| 1431 | __entry->ee.ee_errno, | ||
| 1432 | &__entry->srx.transport) | ||
| 1433 | ); | ||
| 1434 | |||
| 1435 | TRACE_EVENT(rxrpc_tx_fail, | ||
| 1436 | TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret, | ||
| 1437 | enum rxrpc_tx_fail_trace what), | ||
| 1438 | |||
| 1439 | TP_ARGS(debug_id, serial, ret, what), | ||
| 1440 | |||
| 1441 | TP_STRUCT__entry( | ||
| 1442 | __field(unsigned int, debug_id ) | ||
| 1443 | __field(rxrpc_serial_t, serial ) | ||
| 1444 | __field(int, ret ) | ||
| 1445 | __field(enum rxrpc_tx_fail_trace, what ) | ||
| 1446 | ), | ||
| 1447 | |||
| 1448 | TP_fast_assign( | ||
| 1449 | __entry->debug_id = debug_id; | ||
| 1450 | __entry->serial = serial; | ||
| 1451 | __entry->ret = ret; | ||
| 1452 | __entry->what = what; | ||
| 1453 | ), | ||
| 1454 | |||
| 1455 | TP_printk("c=%08x r=%x ret=%d %s", | ||
| 1456 | __entry->debug_id, | ||
| 1457 | __entry->serial, | ||
| 1458 | __entry->ret, | ||
| 1459 | __print_symbolic(__entry->what, rxrpc_tx_fail_traces)) | ||
| 1460 | ); | ||
| 1461 | |||
| 1377 | #endif /* _TRACE_RXRPC_H */ | 1462 | #endif /* _TRACE_RXRPC_H */ |
| 1378 | 1463 | ||
| 1379 | /* This part must be outside protection */ | 1464 | /* This part must be outside protection */ |
