diff options
author | Tao Ma <boyu.mt@taobao.com> | 2011-02-22 09:14:41 -0500 |
---|---|---|
committer | Tao Ma <boyu.mt@taobao.com> | 2011-02-22 09:14:41 -0500 |
commit | 468eedde23d6c9335935773f4f5764267d5a7763 (patch) | |
tree | 7daaae752dc2e1793ba83bc854e5f8daa4879223 /fs/ocfs2/ocfs2_trace.h | |
parent | da561c9cfa3022f6134ef52686d52931d3d1df3d (diff) |
ocfs2: Remove mlog(0) from fs/ocfs2/file.c
This is the 2nd step to remove the debug info of INODE.
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Diffstat (limited to 'fs/ocfs2/ocfs2_trace.h')
-rw-r--r-- | fs/ocfs2/ocfs2_trace.h | 237 |
1 files changed, 237 insertions, 0 deletions
diff --git a/fs/ocfs2/ocfs2_trace.h b/fs/ocfs2/ocfs2_trace.h index 77148e7a14f8..16013b5588c6 100644 --- a/fs/ocfs2/ocfs2_trace.h +++ b/fs/ocfs2/ocfs2_trace.h | |||
@@ -204,6 +204,30 @@ DEFINE_EVENT(ocfs2__uint_uint_uint, name, \ | |||
204 | unsigned int value3), \ | 204 | unsigned int value3), \ |
205 | TP_ARGS(value1, value2, value3)) | 205 | TP_ARGS(value1, value2, value3)) |
206 | 206 | ||
207 | DECLARE_EVENT_CLASS(ocfs2__ull_ull_ull, | ||
208 | TP_PROTO(unsigned long long value1, | ||
209 | unsigned long long value2, unsigned long long value3), | ||
210 | TP_ARGS(value1, value2, value3), | ||
211 | TP_STRUCT__entry( | ||
212 | __field(unsigned long long, value1) | ||
213 | __field(unsigned long long, value2) | ||
214 | __field(unsigned long long, value3) | ||
215 | ), | ||
216 | TP_fast_assign( | ||
217 | __entry->value1 = value1; | ||
218 | __entry->value2 = value2; | ||
219 | __entry->value3 = value3; | ||
220 | ), | ||
221 | TP_printk("%llu %llu %llu", | ||
222 | __entry->value1, __entry->value2, __entry->value3) | ||
223 | ); | ||
224 | |||
225 | #define DEFINE_OCFS2_ULL_ULL_ULL_EVENT(name) \ | ||
226 | DEFINE_EVENT(ocfs2__ull_ull_ull, name, \ | ||
227 | TP_PROTO(unsigned long long value1, unsigned long long value2, \ | ||
228 | unsigned long long value3), \ | ||
229 | TP_ARGS(value1, value2, value3)) | ||
230 | |||
207 | DECLARE_EVENT_CLASS(ocfs2__ull_int_int_int, | 231 | DECLARE_EVENT_CLASS(ocfs2__ull_int_int_int, |
208 | TP_PROTO(unsigned long long ull, int value1, int value2, int value3), | 232 | TP_PROTO(unsigned long long ull, int value1, int value2, int value3), |
209 | TP_ARGS(ull, value1, value2, value3), | 233 | TP_ARGS(ull, value1, value2, value3), |
@@ -1117,6 +1141,219 @@ TRACE_EVENT(ocfs2_fault, | |||
1117 | 1141 | ||
1118 | /* End of trace events for fs/ocfs2/mmap.c. */ | 1142 | /* End of trace events for fs/ocfs2/mmap.c. */ |
1119 | 1143 | ||
1144 | /* Trace events for fs/ocfs2/file.c. */ | ||
1145 | |||
1146 | DECLARE_EVENT_CLASS(ocfs2__file_ops, | ||
1147 | TP_PROTO(void *inode, void *file, void *dentry, | ||
1148 | unsigned long long ino, | ||
1149 | unsigned int d_len, const unsigned char *d_name, | ||
1150 | unsigned long long para), | ||
1151 | TP_ARGS(inode, file, dentry, ino, d_len, d_name, para), | ||
1152 | TP_STRUCT__entry( | ||
1153 | __field(void *, inode) | ||
1154 | __field(void *, file) | ||
1155 | __field(void *, dentry) | ||
1156 | __field(unsigned long long, ino) | ||
1157 | __field(unsigned int, d_len) | ||
1158 | __string(d_name, d_name) | ||
1159 | __field(unsigned long long, para) | ||
1160 | ), | ||
1161 | TP_fast_assign( | ||
1162 | __entry->inode = inode; | ||
1163 | __entry->file = file; | ||
1164 | __entry->dentry = dentry; | ||
1165 | __entry->ino = ino; | ||
1166 | __entry->d_len = d_len; | ||
1167 | __assign_str(d_name, d_name); | ||
1168 | __entry->para = para; | ||
1169 | ), | ||
1170 | TP_printk("%p %p %p %llu %llu %.*s", __entry->inode, __entry->file, | ||
1171 | __entry->dentry, __entry->ino, __entry->para, | ||
1172 | __entry->d_len, __get_str(d_name)) | ||
1173 | ); | ||
1174 | |||
1175 | #define DEFINE_OCFS2_FILE_OPS(name) \ | ||
1176 | DEFINE_EVENT(ocfs2__file_ops, name, \ | ||
1177 | TP_PROTO(void *inode, void *file, void *dentry, \ | ||
1178 | unsigned long long ino, \ | ||
1179 | unsigned int d_len, const unsigned char *d_name, \ | ||
1180 | unsigned long long mode), \ | ||
1181 | TP_ARGS(inode, file, dentry, ino, d_len, d_name, mode)) | ||
1182 | |||
1183 | DEFINE_OCFS2_FILE_OPS(ocfs2_file_open); | ||
1184 | |||
1185 | DEFINE_OCFS2_FILE_OPS(ocfs2_file_release); | ||
1186 | |||
1187 | DEFINE_OCFS2_FILE_OPS(ocfs2_sync_file); | ||
1188 | |||
1189 | DEFINE_OCFS2_FILE_OPS(ocfs2_file_aio_write); | ||
1190 | |||
1191 | DEFINE_OCFS2_FILE_OPS(ocfs2_file_splice_write); | ||
1192 | |||
1193 | DEFINE_OCFS2_FILE_OPS(ocfs2_file_splice_read); | ||
1194 | |||
1195 | DEFINE_OCFS2_FILE_OPS(ocfs2_file_aio_read); | ||
1196 | |||
1197 | DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_truncate_file); | ||
1198 | |||
1199 | DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_truncate_file_error); | ||
1200 | |||
1201 | TRACE_EVENT(ocfs2_extend_allocation, | ||
1202 | TP_PROTO(unsigned long long ip_blkno, unsigned long long size, | ||
1203 | unsigned int clusters, unsigned int clusters_to_add, | ||
1204 | int why, int restart_func), | ||
1205 | TP_ARGS(ip_blkno, size, clusters, clusters_to_add, why, restart_func), | ||
1206 | TP_STRUCT__entry( | ||
1207 | __field(unsigned long long, ip_blkno) | ||
1208 | __field(unsigned long long, size) | ||
1209 | __field(unsigned int, clusters) | ||
1210 | __field(unsigned int, clusters_to_add) | ||
1211 | __field(int, why) | ||
1212 | __field(int, restart_func) | ||
1213 | ), | ||
1214 | TP_fast_assign( | ||
1215 | __entry->ip_blkno = ip_blkno; | ||
1216 | __entry->size = size; | ||
1217 | __entry->clusters = clusters; | ||
1218 | __entry->clusters_to_add = clusters_to_add; | ||
1219 | __entry->why = why; | ||
1220 | __entry->restart_func = restart_func; | ||
1221 | ), | ||
1222 | TP_printk("%llu %llu %u %u %d %d", | ||
1223 | __entry->ip_blkno, __entry->size, __entry->clusters, | ||
1224 | __entry->clusters_to_add, __entry->why, __entry->restart_func) | ||
1225 | ); | ||
1226 | |||
1227 | TRACE_EVENT(ocfs2_extend_allocation_end, | ||
1228 | TP_PROTO(unsigned long long ino, | ||
1229 | unsigned int di_clusters, unsigned long long di_size, | ||
1230 | unsigned int ip_clusters, unsigned long long i_size), | ||
1231 | TP_ARGS(ino, di_clusters, di_size, ip_clusters, i_size), | ||
1232 | TP_STRUCT__entry( | ||
1233 | __field(unsigned long long, ino) | ||
1234 | __field(unsigned int, di_clusters) | ||
1235 | __field(unsigned long long, di_size) | ||
1236 | __field(unsigned int, ip_clusters) | ||
1237 | __field(unsigned long long, i_size) | ||
1238 | ), | ||
1239 | TP_fast_assign( | ||
1240 | __entry->ino = ino; | ||
1241 | __entry->di_clusters = di_clusters; | ||
1242 | __entry->di_size = di_size; | ||
1243 | __entry->ip_clusters = ip_clusters; | ||
1244 | __entry->i_size = i_size; | ||
1245 | ), | ||
1246 | TP_printk("%llu %u %llu %u %llu", __entry->ino, __entry->di_clusters, | ||
1247 | __entry->di_size, __entry->ip_clusters, __entry->i_size) | ||
1248 | ); | ||
1249 | |||
1250 | TRACE_EVENT(ocfs2_write_zero_page, | ||
1251 | TP_PROTO(unsigned long long ino, | ||
1252 | unsigned long long abs_from, unsigned long long abs_to, | ||
1253 | unsigned long index, unsigned int zero_from, | ||
1254 | unsigned int zero_to), | ||
1255 | TP_ARGS(ino, abs_from, abs_to, index, zero_from, zero_to), | ||
1256 | TP_STRUCT__entry( | ||
1257 | __field(unsigned long long, ino) | ||
1258 | __field(unsigned long long, abs_from) | ||
1259 | __field(unsigned long long, abs_to) | ||
1260 | __field(unsigned long, index) | ||
1261 | __field(unsigned int, zero_from) | ||
1262 | __field(unsigned int, zero_to) | ||
1263 | ), | ||
1264 | TP_fast_assign( | ||
1265 | __entry->ino = ino; | ||
1266 | __entry->abs_from = abs_from; | ||
1267 | __entry->abs_to = abs_to; | ||
1268 | __entry->index = index; | ||
1269 | __entry->zero_from = zero_from; | ||
1270 | __entry->zero_to = zero_to; | ||
1271 | ), | ||
1272 | TP_printk("%llu %llu %llu %lu %u %u", __entry->ino, | ||
1273 | __entry->abs_from, __entry->abs_to, | ||
1274 | __entry->index, __entry->zero_from, __entry->zero_to) | ||
1275 | ); | ||
1276 | |||
1277 | DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_zero_extend_range); | ||
1278 | |||
1279 | DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_zero_extend); | ||
1280 | |||
1281 | TRACE_EVENT(ocfs2_setattr, | ||
1282 | TP_PROTO(void *inode, void *dentry, | ||
1283 | unsigned long long ino, | ||
1284 | unsigned int d_len, const unsigned char *d_name, | ||
1285 | unsigned int ia_valid, unsigned int ia_mode, | ||
1286 | unsigned int ia_uid, unsigned int ia_gid), | ||
1287 | TP_ARGS(inode, dentry, ino, d_len, d_name, | ||
1288 | ia_valid, ia_mode, ia_uid, ia_gid), | ||
1289 | TP_STRUCT__entry( | ||
1290 | __field(void *, inode) | ||
1291 | __field(void *, dentry) | ||
1292 | __field(unsigned long long, ino) | ||
1293 | __field(unsigned int, d_len) | ||
1294 | __string(d_name, d_name) | ||
1295 | __field(unsigned int, ia_valid) | ||
1296 | __field(unsigned int, ia_mode) | ||
1297 | __field(unsigned int, ia_uid) | ||
1298 | __field(unsigned int, ia_gid) | ||
1299 | ), | ||
1300 | TP_fast_assign( | ||
1301 | __entry->inode = inode; | ||
1302 | __entry->dentry = dentry; | ||
1303 | __entry->ino = ino; | ||
1304 | __entry->d_len = d_len; | ||
1305 | __assign_str(d_name, d_name); | ||
1306 | __entry->ia_valid = ia_valid; | ||
1307 | __entry->ia_mode = ia_mode; | ||
1308 | __entry->ia_uid = ia_uid; | ||
1309 | __entry->ia_gid = ia_gid; | ||
1310 | ), | ||
1311 | TP_printk("%p %p %llu %.*s %u %u %u %u", __entry->inode, | ||
1312 | __entry->dentry, __entry->ino, __entry->d_len, | ||
1313 | __get_str(d_name), __entry->ia_valid, __entry->ia_mode, | ||
1314 | __entry->ia_uid, __entry->ia_gid) | ||
1315 | ); | ||
1316 | |||
1317 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_write_remove_suid); | ||
1318 | |||
1319 | DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_zero_partial_clusters); | ||
1320 | |||
1321 | DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_zero_partial_clusters_range1); | ||
1322 | |||
1323 | DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_zero_partial_clusters_range2); | ||
1324 | |||
1325 | DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_remove_inode_range); | ||
1326 | |||
1327 | TRACE_EVENT(ocfs2_prepare_inode_for_write, | ||
1328 | TP_PROTO(unsigned long long ino, unsigned long long saved_pos, | ||
1329 | int appending, unsigned long count, | ||
1330 | int *direct_io, int *has_refcount), | ||
1331 | TP_ARGS(ino, saved_pos, appending, count, direct_io, has_refcount), | ||
1332 | TP_STRUCT__entry( | ||
1333 | __field(unsigned long long, ino) | ||
1334 | __field(unsigned long long, saved_pos) | ||
1335 | __field(int, appending) | ||
1336 | __field(unsigned long, count) | ||
1337 | __field(int, direct_io) | ||
1338 | __field(int, has_refcount) | ||
1339 | ), | ||
1340 | TP_fast_assign( | ||
1341 | __entry->ino = ino; | ||
1342 | __entry->saved_pos = saved_pos; | ||
1343 | __entry->appending = appending; | ||
1344 | __entry->count = count; | ||
1345 | __entry->direct_io = direct_io ? *direct_io : -1; | ||
1346 | __entry->has_refcount = has_refcount ? *has_refcount : -1; | ||
1347 | ), | ||
1348 | TP_printk("%llu %llu %d %lu %d %d", __entry->ino, | ||
1349 | __entry->saved_pos, __entry->appending, __entry->count, | ||
1350 | __entry->direct_io, __entry->has_refcount) | ||
1351 | ); | ||
1352 | |||
1353 | DEFINE_OCFS2_INT_EVENT(generic_file_aio_read_ret); | ||
1354 | |||
1355 | /* End of trace events for fs/ocfs2/file.c. */ | ||
1356 | |||
1120 | #endif /* _TRACE_OCFS2_H */ | 1357 | #endif /* _TRACE_OCFS2_H */ |
1121 | 1358 | ||
1122 | /* This part must be outside protection */ | 1359 | /* This part must be outside protection */ |