]>
Commit | Line | Data |
---|---|---|
df844fd4 DH |
1 | /* AF_RXRPC tracepoints |
2 | * | |
3 | * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved. | |
4 | * Written by David Howells (dhowells@redhat.com) | |
5 | * | |
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. | |
10 | */ | |
11 | #undef TRACE_SYSTEM | |
12 | #define TRACE_SYSTEM rxrpc | |
13 | ||
14 | #if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ) | |
15 | #define _TRACE_RXRPC_H | |
16 | ||
17 | #include <linux/tracepoint.h> | |
18 | ||
19 | TRACE_EVENT(rxrpc_skb, | |
20 | TP_PROTO(struct sk_buff *skb, int op, int usage, int mod_count, | |
21 | const void *where), | |
22 | ||
23 | TP_ARGS(skb, op, usage, mod_count, where), | |
24 | ||
25 | TP_STRUCT__entry( | |
26 | __field(struct sk_buff *, skb ) | |
27 | __field(int, op ) | |
28 | __field(int, usage ) | |
29 | __field(int, mod_count ) | |
30 | __field(const void *, where ) | |
31 | ), | |
32 | ||
33 | TP_fast_assign( | |
34 | __entry->skb = skb; | |
35 | __entry->op = op; | |
36 | __entry->usage = usage; | |
37 | __entry->mod_count = mod_count; | |
38 | __entry->where = where; | |
39 | ), | |
40 | ||
41 | TP_printk("s=%p %s u=%d m=%d p=%pSR", | |
42 | __entry->skb, | |
43 | (__entry->op == 0 ? "NEW" : | |
44 | __entry->op == 1 ? "SEE" : | |
45 | __entry->op == 2 ? "GET" : | |
46 | __entry->op == 3 ? "FRE" : | |
47 | "PUR"), | |
48 | __entry->usage, | |
49 | __entry->mod_count, | |
50 | __entry->where) | |
51 | ); | |
52 | ||
53 | #endif /* _TRACE_RXRPC_H */ | |
54 | ||
55 | /* This part must be outside protection */ | |
56 | #include <trace/define_trace.h> |