diff options
author | Artem B. Bityutskiy <dedekind@infradead.org> | 2005-09-22 07:25:00 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-11-06 16:20:33 -0500 |
commit | 733802d974e5af42acb7cd61b16c0ce6dd03b7ed (patch) | |
tree | 56f77d78d9a2df474bb1686f5d060ee1e84a4d68 /fs/jffs2/debug.h | |
parent | b523b3bac3a745fefd6f604082f2ffa09b808e5e (diff) |
[JFFS2] Debug code simplification, update TODO
Simplify the debugging code further.
Update the TODO list
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/jffs2/debug.h')
-rw-r--r-- | fs/jffs2/debug.h | 50 |
1 files changed, 32 insertions, 18 deletions
diff --git a/fs/jffs2/debug.h b/fs/jffs2/debug.h index 7328e67bebb6..da1417d38914 100644 --- a/fs/jffs2/debug.h +++ b/fs/jffs2/debug.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * For licensing information, see the file 'LICENCE' in this directory. | 8 | * For licensing information, see the file 'LICENCE' in this directory. |
9 | * | 9 | * |
10 | * $Id: debug.h,v 1.16 2005/09/14 16:57:32 dedekind Exp $ | 10 | * $Id: debug.h,v 1.18 2005/09/21 10:26:26 dedekind Exp $ |
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | #ifndef _JFFS2_DEBUG_H_ | 13 | #ifndef _JFFS2_DEBUG_H_ |
@@ -23,16 +23,23 @@ | |||
23 | /* Enable "paranoia" checks and dumps */ | 23 | /* Enable "paranoia" checks and dumps */ |
24 | #define JFFS2_DBG_PARANOIA_CHECKS | 24 | #define JFFS2_DBG_PARANOIA_CHECKS |
25 | #define JFFS2_DBG_DUMPS | 25 | #define JFFS2_DBG_DUMPS |
26 | |||
27 | /* | ||
28 | * By defining/undefining the below macros one may select debugging messages | ||
29 | * fro specific JFFS2 subsystems. | ||
30 | */ | ||
26 | #define JFFS2_DBG_READINODE_MESSAGES | 31 | #define JFFS2_DBG_READINODE_MESSAGES |
27 | #define JFFS2_DBG_FRAGTREE_MESSAGES | 32 | #define JFFS2_DBG_FRAGTREE_MESSAGES |
28 | #define JFFS2_DBG_DENTLIST_MESSAGES | 33 | #define JFFS2_DBG_DENTLIST_MESSAGES |
29 | #define JFFS2_DBG_NODEREF_MESSAGES | 34 | #define JFFS2_DBG_NODEREF_MESSAGES |
30 | #define JFFS2_DBG_INOCACHE_MESSAGES | 35 | #define JFFS2_DBG_INOCACHE_MESSAGES |
31 | #define JFFS2_DBG_SUMMARY_MESSAGES | 36 | #define JFFS2_DBG_SUMMARY_MESSAGES |
37 | #define JFFS2_DBG_FSBUILD_MESSAGES | ||
32 | #endif | 38 | #endif |
33 | 39 | ||
34 | #if CONFIG_JFFS2_FS_DEBUG == 2 | 40 | #if CONFIG_JFFS2_FS_DEBUG == 2 |
35 | #define JFFS2_DBG_FRAGTREE2_MESSAGES | 41 | #define JFFS2_DBG_FRAGTREE2_MESSAGES |
42 | #define JFFS2_DBG_MEMALLOC_MESSAGES | ||
36 | #endif | 43 | #endif |
37 | 44 | ||
38 | /* Sanity checks are supposed to be light-weight and enabled by default */ | 45 | /* Sanity checks are supposed to be light-weight and enabled by default */ |
@@ -40,7 +47,7 @@ | |||
40 | 47 | ||
41 | /* | 48 | /* |
42 | * Dx() are mainly used for debugging messages, they must go away and be | 49 | * Dx() are mainly used for debugging messages, they must go away and be |
43 | * superseded by nicer JFFS2_DBG_XXX() macros... | 50 | * superseded by nicer dbg_xxx() macros... |
44 | */ | 51 | */ |
45 | #if CONFIG_JFFS2_FS_DEBUG > 0 | 52 | #if CONFIG_JFFS2_FS_DEBUG > 0 |
46 | #define D1(x) x | 53 | #define D1(x) x |
@@ -105,56 +112,63 @@ | |||
105 | */ | 112 | */ |
106 | /* Read inode debugging messages */ | 113 | /* Read inode debugging messages */ |
107 | #ifdef JFFS2_DBG_READINODE_MESSAGES | 114 | #ifdef JFFS2_DBG_READINODE_MESSAGES |
108 | #define JFFS2_DBG_READINODE(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) | 115 | #define dbg_readinode(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) |
109 | #else | 116 | #else |
110 | #define JFFS2_DBG_READINODE(fmt, ...) | 117 | #define dbg_readinode(fmt, ...) |
111 | #endif | 118 | #endif |
112 | 119 | ||
113 | /* Fragtree build debugging messages */ | 120 | /* Fragtree build debugging messages */ |
114 | #ifdef JFFS2_DBG_FRAGTREE_MESSAGES | 121 | #ifdef JFFS2_DBG_FRAGTREE_MESSAGES |
115 | #define JFFS2_DBG_FRAGTREE(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) | 122 | #define dbg_fragtree(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) |
116 | #else | 123 | #else |
117 | #define JFFS2_DBG_FRAGTREE(fmt, ...) | 124 | #define dbg_fragtree(fmt, ...) |
118 | #endif | 125 | #endif |
119 | #ifdef JFFS2_DBG_FRAGTREE2_MESSAGES | 126 | #ifdef JFFS2_DBG_FRAGTREE2_MESSAGES |
120 | #define JFFS2_DBG_FRAGTREE2(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) | 127 | #define dbg_fragtree2(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) |
121 | #else | 128 | #else |
122 | #define JFFS2_DBG_FRAGTREE2(fmt, ...) | 129 | #define dbg_fragtree2(fmt, ...) |
123 | #endif | 130 | #endif |
124 | 131 | ||
125 | /* Directory entry list manilulation debugging messages */ | 132 | /* Directory entry list manilulation debugging messages */ |
126 | #ifdef JFFS2_DBG_DENTLIST_MESSAGES | 133 | #ifdef JFFS2_DBG_DENTLIST_MESSAGES |
127 | #define JFFS2_DBG_DENTLIST(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) | 134 | #define dbg_dentlist(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) |
128 | #else | 135 | #else |
129 | #define JFFS2_DBG_DENTLIST(fmt, ...) | 136 | #define dbg_dentlist(fmt, ...) |
130 | #endif | 137 | #endif |
131 | 138 | ||
132 | /* Print the messages about manipulating node_refs */ | 139 | /* Print the messages about manipulating node_refs */ |
133 | #ifdef JFFS2_DBG_NODEREF_MESSAGES | 140 | #ifdef JFFS2_DBG_NODEREF_MESSAGES |
134 | #define JFFS2_DBG_NODEREF(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) | 141 | #define dbg_noderef(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) |
135 | #else | 142 | #else |
136 | #define JFFS2_DBG_NODEREF(fmt, ...) | 143 | #define dbg_noderef(fmt, ...) |
137 | #endif | 144 | #endif |
138 | 145 | ||
139 | /* Manipulations with the list of inodes (JFFS2 inocache) */ | 146 | /* Manipulations with the list of inodes (JFFS2 inocache) */ |
140 | #ifdef JFFS2_DBG_INOCACHE_MESSAGES | 147 | #ifdef JFFS2_DBG_INOCACHE_MESSAGES |
141 | #define JFFS2_DBG_INOCACHE(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) | 148 | #define dbg_inocache(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) |
142 | #else | 149 | #else |
143 | #define JFFS2_DBG_INOCACHE(fmt, ...) | 150 | #define dbg_inocache(fmt, ...) |
144 | #endif | 151 | #endif |
145 | 152 | ||
146 | /* Summary debugging messages */ | 153 | /* Summary debugging messages */ |
147 | #ifdef JFFS2_DBG_SUMMARY_MESSAGES | 154 | #ifdef JFFS2_DBG_SUMMARY_MESSAGES |
148 | #define JFFS2_DBG_SUMMARY(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) | 155 | #define dbg_summary(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) |
156 | #else | ||
157 | #define dbg_summary(fmt, ...) | ||
158 | #endif | ||
159 | |||
160 | /* File system build messages */ | ||
161 | #ifdef JFFS2_DBG_FSBUILD_MESSAGES | ||
162 | #define dbg_fsbuild(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) | ||
149 | #else | 163 | #else |
150 | #define JFFS2_DBG_SUMMARY(fmt, ...) | 164 | #define dbg_fsbuild(fmt, ...) |
151 | #endif | 165 | #endif |
152 | 166 | ||
153 | /* Watch the object allocations */ | 167 | /* Watch the object allocations */ |
154 | #ifdef JFFS2_DBG_MEMALLOC_MESSAGES | 168 | #ifdef JFFS2_DBG_MEMALLOC_MESSAGES |
155 | #define JFFS2_DBG_MEMALLOC(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) | 169 | #define dbg_memalloc(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) |
156 | #else | 170 | #else |
157 | #define JFFS2_DBG_MEMALLOC(fmt, ...) | 171 | #define dbg_memalloc(fmt, ...) |
158 | #endif | 172 | #endif |
159 | 173 | ||
160 | 174 | ||