~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/sunrpc/debug.h

Version: ~ [ linux-5.4-rc3 ] ~ [ linux-5.3.6 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.79 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.149 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.196 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.196 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.75 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * linux/include/linux/sunrpc/debug.h
  3  *
  4  * Debugging support for sunrpc module
  5  *
  6  * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
  7  */
  8 #ifndef _LINUX_SUNRPC_DEBUG_H_
  9 #define _LINUX_SUNRPC_DEBUG_H_
 10 
 11 #include <uapi/linux/sunrpc/debug.h>
 12 
 13 /*
 14  * Debugging macros etc
 15  */
 16 #if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
 17 extern unsigned int             rpc_debug;
 18 extern unsigned int             nfs_debug;
 19 extern unsigned int             nfsd_debug;
 20 extern unsigned int             nlm_debug;
 21 #endif
 22 
 23 #define dprintk(args...)        dfprintk(FACILITY, ## args)
 24 #define dprintk_rcu(args...)    dfprintk_rcu(FACILITY, ## args)
 25 
 26 #undef ifdebug
 27 #if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
 28 # define ifdebug(fac)           if (unlikely(rpc_debug & RPCDBG_##fac))
 29 
 30 # define dfprintk(fac, args...) \
 31         do { \
 32                 ifdebug(fac) \
 33                         printk(KERN_DEFAULT args); \
 34         } while (0)
 35 
 36 # define dfprintk_rcu(fac, args...)     \
 37         do { \
 38                 ifdebug(fac) { \
 39                         rcu_read_lock(); \
 40                         printk(KERN_DEFAULT args); \
 41                         rcu_read_unlock(); \
 42                 } \
 43         } while (0)
 44 
 45 # define RPC_IFDEBUG(x)         x
 46 #else
 47 # define ifdebug(fac)           if (0)
 48 # define dfprintk(fac, args...) do {} while (0)
 49 # define dfprintk_rcu(fac, args...)     do {} while (0)
 50 # define RPC_IFDEBUG(x)
 51 #endif
 52 
 53 /*
 54  * Sysctl interface for RPC debugging
 55  */
 56 
 57 struct rpc_clnt;
 58 struct rpc_xprt;
 59 
 60 #if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
 61 void            rpc_register_sysctl(void);
 62 void            rpc_unregister_sysctl(void);
 63 void            sunrpc_debugfs_init(void);
 64 void            sunrpc_debugfs_exit(void);
 65 void            rpc_clnt_debugfs_register(struct rpc_clnt *);
 66 void            rpc_clnt_debugfs_unregister(struct rpc_clnt *);
 67 void            rpc_xprt_debugfs_register(struct rpc_xprt *);
 68 void            rpc_xprt_debugfs_unregister(struct rpc_xprt *);
 69 #else
 70 static inline void
 71 sunrpc_debugfs_init(void)
 72 {
 73         return;
 74 }
 75 
 76 static inline void
 77 sunrpc_debugfs_exit(void)
 78 {
 79         return;
 80 }
 81 
 82 static inline void
 83 rpc_clnt_debugfs_register(struct rpc_clnt *clnt)
 84 {
 85         return;
 86 }
 87 
 88 static inline void
 89 rpc_clnt_debugfs_unregister(struct rpc_clnt *clnt)
 90 {
 91         return;
 92 }
 93 
 94 static inline void
 95 rpc_xprt_debugfs_register(struct rpc_xprt *xprt)
 96 {
 97         return;
 98 }
 99 
100 static inline void
101 rpc_xprt_debugfs_unregister(struct rpc_xprt *xprt)
102 {
103         return;
104 }
105 #endif
106 
107 #endif /* _LINUX_SUNRPC_DEBUG_H_ */
108 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp