-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
David Howells
committed
Aug 23, 2016
1 parent
01a90a4
commit df844fd
Showing
10 changed files
with
135 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* AF_RXRPC tracepoints | ||
* | ||
* Copyright (C) 2016 Red Hat, Inc. All Rights Reserved. | ||
* Written by David Howells (dhowells@redhat.com) | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public Licence | ||
* as published by the Free Software Foundation; either version | ||
* 2 of the Licence, or (at your option) any later version. | ||
*/ | ||
#undef TRACE_SYSTEM | ||
#define TRACE_SYSTEM rxrpc | ||
|
||
#if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ) | ||
#define _TRACE_RXRPC_H | ||
|
||
#include <linux/tracepoint.h> | ||
|
||
TRACE_EVENT(rxrpc_skb, | ||
TP_PROTO(struct sk_buff *skb, int op, int usage, int mod_count, | ||
const void *where), | ||
|
||
TP_ARGS(skb, op, usage, mod_count, where), | ||
|
||
TP_STRUCT__entry( | ||
__field(struct sk_buff *, skb ) | ||
__field(int, op ) | ||
__field(int, usage ) | ||
__field(int, mod_count ) | ||
__field(const void *, where ) | ||
), | ||
|
||
TP_fast_assign( | ||
__entry->skb = skb; | ||
__entry->op = op; | ||
__entry->usage = usage; | ||
__entry->mod_count = mod_count; | ||
__entry->where = where; | ||
), | ||
|
||
TP_printk("s=%p %s u=%d m=%d p=%pSR", | ||
__entry->skb, | ||
(__entry->op == 0 ? "NEW" : | ||
__entry->op == 1 ? "SEE" : | ||
__entry->op == 2 ? "GET" : | ||
__entry->op == 3 ? "FRE" : | ||
"PUR"), | ||
__entry->usage, | ||
__entry->mod_count, | ||
__entry->where) | ||
); | ||
|
||
#endif /* _TRACE_RXRPC_H */ | ||
|
||
/* This part must be outside protection */ | ||
#include <trace/define_trace.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters