diff options
| author | David Howells <dhowells@redhat.com> | 2016-08-23 10:27:24 -0400 |
|---|---|---|
| committer | David Howells <dhowells@redhat.com> | 2016-08-23 10:27:24 -0400 |
| commit | df844fd46b98c2efde8f4ac2d50d59bc90c4c679 (patch) | |
| tree | 0a067071fa1bf6fe2fc41de100d822e9585289a0 /include/trace | |
| parent | 01a90a459850ed1f1573f06f00f7b9d466339df0 (diff) | |
rxrpc: Use a tracepoint for skb accounting debugging
Use a tracepoint to log various skb accounting points to help in debugging
refcounting errors.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'include/trace')
| -rw-r--r-- | include/trace/events/rxrpc.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/include/trace/events/rxrpc.h b/include/trace/events/rxrpc.h new file mode 100644 index 000000000000..15283ee3e41a --- /dev/null +++ b/include/trace/events/rxrpc.h | |||
| @@ -0,0 +1,56 @@ | |||
| 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> | ||
