]>
git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - include/trace/events/rxrpc.h
1 /* AF_RXRPC tracepoints
3 * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
12 #define TRACE_SYSTEM rxrpc
14 #if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ)
15 #define _TRACE_RXRPC_H
17 #include <linux/tracepoint.h>
19 TRACE_EVENT(rxrpc_call
,
20 TP_PROTO(struct rxrpc_call
*call
, enum rxrpc_call_trace op
,
21 int usage
, const void *where
, const void *aux
),
23 TP_ARGS(call
, op
, usage
, where
, aux
),
26 __field(struct rxrpc_call
*, call
)
29 __field(const void *, where
)
30 __field(const void *, aux
)
36 __entry
->usage
= usage
;
37 __entry
->where
= where
;
41 TP_printk("c=%p %s u=%d sp=%pSR a=%p",
43 rxrpc_call_traces
[__entry
->op
],
49 TRACE_EVENT(rxrpc_skb
,
50 TP_PROTO(struct sk_buff
*skb
, int op
, int usage
, int mod_count
,
53 TP_ARGS(skb
, op
, usage
, mod_count
, where
),
56 __field(struct sk_buff
*, skb
)
59 __field(int, mod_count
)
60 __field(const void *, where
)
66 __entry
->usage
= usage
;
67 __entry
->mod_count
= mod_count
;
68 __entry
->where
= where
;
71 TP_printk("s=%p %s u=%d m=%d p=%pSR",
73 (__entry
->op
== 0 ? "NEW" :
74 __entry
->op
== 1 ? "SEE" :
75 __entry
->op
== 2 ? "GET" :
76 __entry
->op
== 3 ? "FRE" :
83 TRACE_EVENT(rxrpc_rx_packet
,
84 TP_PROTO(struct rxrpc_skb_priv
*sp
),
89 __field_struct(struct rxrpc_host_header
, hdr
)
93 memcpy(&__entry
->hdr
, &sp
->hdr
, sizeof(__entry
->hdr
));
96 TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x",
97 __entry
->hdr
.epoch
, __entry
->hdr
.cid
,
98 __entry
->hdr
.callNumber
, __entry
->hdr
.serviceId
,
99 __entry
->hdr
.serial
, __entry
->hdr
.seq
,
100 __entry
->hdr
.type
, __entry
->hdr
.flags
)
103 TRACE_EVENT(rxrpc_rx_done
,
104 TP_PROTO(int result
, int abort_code
),
106 TP_ARGS(result
, abort_code
),
109 __field(int, result
)
110 __field(int, abort_code
)
114 __entry
->result
= result
;
115 __entry
->abort_code
= abort_code
;
118 TP_printk("r=%d a=%d", __entry
->result
, __entry
->abort_code
)
121 TRACE_EVENT(rxrpc_abort
,
122 TP_PROTO(const char *why
, u32 cid
, u32 call_id
, rxrpc_seq_t seq
,
123 int abort_code
, int error
),
125 TP_ARGS(why
, cid
, call_id
, seq
, abort_code
, error
),
128 __array(char, why
, 4 )
130 __field(u32
, call_id
)
131 __field(rxrpc_seq_t
, seq
)
132 __field(int, abort_code
)
137 memcpy(__entry
->why
, why
, 4);
139 __entry
->call_id
= call_id
;
140 __entry
->abort_code
= abort_code
;
141 __entry
->error
= error
;
145 TP_printk("%08x:%08x s=%u a=%d e=%d %s",
146 __entry
->cid
, __entry
->call_id
, __entry
->seq
,
147 __entry
->abort_code
, __entry
->error
, __entry
->why
)
150 #endif /* _TRACE_RXRPC_H */
152 /* This part must be outside protection */
153 #include <trace/define_trace.h>