From db216c3d5e4c040e557a50f8f5d35d5c415e8c1c Mon Sep 17 00:00:00 2001 From: Planet-Lab Support Date: Thu, 16 Sep 2004 18:47:17 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create branch 'vserver'. --- Documentation/vserver/debug.txt | 170 ++++++++++++++++++++++++++++++++ include/linux/vserver/debug.h | 46 +++++++++ 2 files changed, 216 insertions(+) create mode 100644 Documentation/vserver/debug.txt create mode 100644 include/linux/vserver/debug.h diff --git a/Documentation/vserver/debug.txt b/Documentation/vserver/debug.txt new file mode 100644 index 000000000..38be457b8 --- /dev/null +++ b/Documentation/vserver/debug.txt @@ -0,0 +1,170 @@ + +debug_switch: + + 0 1 + + 1 2 + + 2 4 + + 3 8 + + 4 16 + + 5 32 + + 6 64 + + 7 128 + + +debug_xid: + + 0 1 "alloc_vx_info(%d) = %p\n" + "dealloc_vx_info(%p)" + "loc_vx_info(%d) = %p (not available)" + "loc_vx_info(%d) = %p (found)" + "loc_vx_info(%d) = %p (new)" + + 1 2 "alloc_vx_info(%d)*" + "loc_vx_info(%d)*" + "locate_vx_info(%d)" + + 2 4 "get_vx_info(%p[#%d.%d])" + "put_vx_info(%p[#%d.%d])" + + 3 8 "set_vx_info(%p[#%d.%d.%d])" + "clr_vx_info(%p[#%d.%d.%d])" + "rcu_free_vx_info(%p): uc=%d" + + 4 16 "__hash_vx_info: %p[#%d]" + "__unhash_vx_info: %p[#%d]" + "__vx_dynamic_id: [#%d]" + + 5 32 "vx_migrate_task(%p,%p[#%d.%d])" + "task_get_vx_info(%p)" + + 6 64 + + 7 128 + + +debug_nid: + + 0 1 "alloc_nx_info() = %p" + "dealloc_nx_info(%p)" + "loc_nx_info(%d) = %p (not available)" + "loc_nx_info(%d) = %p (found)" + "loc_nx_info(%d) = %p (new)" + + 1 2 "alloc_nx_info(%d)*" + "loc_nx_info(%d)*" + + 2 4 "get_nx_info(%p[#%d.%d])" + "put_nx_info(%p[#%d.%d])" + + 3 8 "set_nx_info(%p[#%d.%d.%d])" + "clr_nx_info(%p[#%d.%d.%d])" + "rcu_free_nx_info(%p): uc=%d" + + 4 16 "__hash_nx_info: %p[#%d]" + "__unhash_nx_info: %p[#%d]" + "__nx_dynamic_id: [#%d]" + + 5 32 "nx_migrate_task(%p,%p[#%d.%d])" + "task_get_nx_info(%p)" + "create_nx_info()" + + 6 64 + + 7 128 + + +debug_dlim: + + 0 1 "alloc_dl_info(%p,%d) = %p" + "dealloc_dl_info(%p)" + "locate_dl_info(%p,#%d) = %p" + + 1 2 "alloc_dl_info(%p,%d)*" + + 2 4 "get_dl_info(%p[#%d.%d])" + "put_dl_info(%p[#%d.%d])" + + 3 8 "rcu_free_dl_info(%p)" + "__hash_dl_info: %p[#%d]" + "__unhash_dl_info: %p[#%d]" + + + 4 16 "ALLOC (%p,#%d)%c inode (%d)" + "FREE (%p,#%d)%c inode" + + 5 32 "ALLOC (%p,#%d)%c %lld bytes (%d)" + "FREE (%p,#%d)%c %lld bytes" + + 6 64 "ADJUST: %lld,%lld on %d,%d [mult=%d]" + + 7 128 "ext3_has_free_blocks(%p): free=%u, root=%u" + "ext3_has_free_blocks(%p): %u<%u+1, %c, %u!=%u r=%d" + + + +debug_cvirt: + + + 0 1 + + 1 2 + + 2 4 "vx_map_tgid: %p/%llx: %d -> %d" + "vx_rmap_tgid: %p/%llx: %d -> %d" + + 3 8 + + 4 16 + + 5 32 + + 6 64 + + 7 128 + + + +debug_net: + + + 0 1 + + 1 2 + + 2 4 "tcp_in_list(%p) %p,%p;%lx" + + 3 8 "inet_bind(%p) %p,%p;%lx" + + 4 16 "ip_route_connect(%p) %p,%p;%lx" + + 5 32 "tcp_ipv4_addr_conflict(%p,%p) %p,%p;%lx %p,%p;%lx" + + 6 64 "sk: %p [#%d] (from %d)" + "sk,req: %p [#%d] (from %d)" + "sk,egf: %p [#%d] (from %d)" + "sk,egn: %p [#%d] (from %d)" + "tw: %p [#%d] (from %d)" + + 7 128 "__sock_sendmsg: %p[%p,%p,%p;%d]:%d/%d" + "__sock_recvmsg: %p[%p,%p,%p;%d]:%d/%d" + + + + +debug_limit: + + n 2^n "vx_acc_cres[%5d,%s,%2d]: %5d%s" + "vx_cres_avail[%5d,%s,%2d]: %5ld > %5d + %5d" + + m 2^m "vx_acc_page[%5d,%s,%2d]: %5d%s" + "vx_acc_pages[%5d,%s,%2d]: %5d += %5d" + "vx_pages_avail[%5d,%s,%2d]: %5ld > %5d + %5d" + + diff --git a/include/linux/vserver/debug.h b/include/linux/vserver/debug.h new file mode 100644 index 000000000..15b52c930 --- /dev/null +++ b/include/linux/vserver/debug.h @@ -0,0 +1,46 @@ +#ifndef _VX_DEBUG_H +#define _VX_DEBUG_H + + +extern unsigned int vx_debug_switch; +extern unsigned int vx_debug_xid; +extern unsigned int vx_debug_nid; +extern unsigned int vx_debug_net; +extern unsigned int vx_debug_limit; +extern unsigned int vx_debug_dlim; +extern unsigned int vx_debug_cvirt; + + +#define VXD_CBIT(n,m) (vx_debug_ ## n & (1 << (m))) +#define VXD_CMIN(n,m) (vx_debug_ ## n > (m)) +#define VXD_MASK(n,m) (vx_debug_ ## n & (m)) + +// #define VXD_HERE __FILE__, __LINE__ + + +#ifdef CONFIG_VSERVER_DEBUG + +#define VX_LOGLEVEL "vxD: " + +#define vxdprintk(c,f,x...) \ + do { \ + if (c) \ + printk(VX_LOGLEVEL f "\n", x); \ + } while (0) + +#define vxlprintk(c,f,x...) \ + do { \ + if (c) \ + printk(VX_LOGLEVEL f " @%s:%d\n", x); \ + } while (0) + +#else + +#define vxdprintk(x...) do { } while (0) +#define vxlprintk(x...) do { } while (0) + +#endif + + + +#endif /* _VX_DEBUG_H */ -- 2.43.0