Wengang Wang | 80a9a84 | 2011-02-21 11:13:14 +0800 | [diff] [blame] | 1 | #undef TRACE_SYSTEM |
| 2 | #define TRACE_SYSTEM ocfs2 |
| 3 | |
| 4 | #if !defined(_TRACE_OCFS2_H) || defined(TRACE_HEADER_MULTI_READ) |
| 5 | #define _TRACE_OCFS2_H |
| 6 | |
| 7 | #include <linux/tracepoint.h> |
| 8 | |
Tao Ma | a09d09b | 2011-02-22 08:21:10 +0800 | [diff] [blame] | 9 | DECLARE_EVENT_CLASS(ocfs2__int, |
| 10 | TP_PROTO(int num), |
| 11 | TP_ARGS(num), |
| 12 | TP_STRUCT__entry( |
| 13 | __field(int, num) |
| 14 | ), |
| 15 | TP_fast_assign( |
| 16 | __entry->num = num; |
| 17 | ), |
| 18 | TP_printk("%d", __entry->num) |
| 19 | ); |
| 20 | |
| 21 | #define DEFINE_OCFS2_INT_EVENT(name) \ |
| 22 | DEFINE_EVENT(ocfs2__int, name, \ |
| 23 | TP_PROTO(int num), \ |
| 24 | TP_ARGS(num)) |
| 25 | |
Tao Ma | a04733d | 2011-02-22 07:56:45 +0800 | [diff] [blame] | 26 | DECLARE_EVENT_CLASS(ocfs2__uint, |
| 27 | TP_PROTO(unsigned int num), |
| 28 | TP_ARGS(num), |
| 29 | TP_STRUCT__entry( |
| 30 | __field( unsigned int, num ) |
| 31 | ), |
| 32 | TP_fast_assign( |
| 33 | __entry->num = num; |
| 34 | ), |
| 35 | TP_printk("%u", __entry->num) |
| 36 | ); |
| 37 | |
| 38 | #define DEFINE_OCFS2_UINT_EVENT(name) \ |
| 39 | DEFINE_EVENT(ocfs2__uint, name, \ |
| 40 | TP_PROTO(unsigned int num), \ |
| 41 | TP_ARGS(num)) |
| 42 | |
Tao Ma | 2f73e13 | 2011-02-22 08:22:33 +0800 | [diff] [blame] | 43 | DECLARE_EVENT_CLASS(ocfs2__ull, |
| 44 | TP_PROTO(unsigned long long blkno), |
| 45 | TP_ARGS(blkno), |
| 46 | TP_STRUCT__entry( |
| 47 | __field(unsigned long long, blkno) |
| 48 | ), |
| 49 | TP_fast_assign( |
| 50 | __entry->blkno = blkno; |
| 51 | ), |
| 52 | TP_printk("%llu", __entry->blkno) |
| 53 | ); |
| 54 | |
| 55 | #define DEFINE_OCFS2_ULL_EVENT(name) \ |
| 56 | DEFINE_EVENT(ocfs2__ull, name, \ |
| 57 | TP_PROTO(unsigned long long num), \ |
| 58 | TP_ARGS(num)) |
| 59 | |
Tao Ma | 32a42d3 | 2011-02-23 21:29:08 +0800 | [diff] [blame^] | 60 | DECLARE_EVENT_CLASS(ocfs2__pointer, |
| 61 | TP_PROTO(void *pointer), |
| 62 | TP_ARGS(pointer), |
| 63 | TP_STRUCT__entry( |
| 64 | __field(void *, pointer) |
| 65 | ), |
| 66 | TP_fast_assign( |
| 67 | __entry->pointer = pointer; |
| 68 | ), |
| 69 | TP_printk("%p", __entry->pointer) |
| 70 | ); |
| 71 | |
| 72 | #define DEFINE_OCFS2_POINTER_EVENT(name) \ |
| 73 | DEFINE_EVENT(ocfs2__pointer, name, \ |
| 74 | TP_PROTO(void *pointer), \ |
| 75 | TP_ARGS(pointer)) |
| 76 | |
Tao Ma | a09d09b | 2011-02-22 08:21:10 +0800 | [diff] [blame] | 77 | DECLARE_EVENT_CLASS(ocfs2__int_int, |
| 78 | TP_PROTO(int value1, int value2), |
| 79 | TP_ARGS(value1, value2), |
| 80 | TP_STRUCT__entry( |
| 81 | __field(int, value1) |
| 82 | __field(int, value2) |
| 83 | ), |
| 84 | TP_fast_assign( |
| 85 | __entry->value1 = value1; |
| 86 | __entry->value2 = value2; |
| 87 | ), |
| 88 | TP_printk("%d %d", __entry->value1, __entry->value2) |
| 89 | ); |
| 90 | |
| 91 | #define DEFINE_OCFS2_INT_INT_EVENT(name) \ |
| 92 | DEFINE_EVENT(ocfs2__int_int, name, \ |
| 93 | TP_PROTO(int val1, int val2), \ |
| 94 | TP_ARGS(val1, val2)) |
| 95 | |
Tao Ma | 2f73e13 | 2011-02-22 08:22:33 +0800 | [diff] [blame] | 96 | DECLARE_EVENT_CLASS(ocfs2__uint_uint, |
| 97 | TP_PROTO(unsigned int value1, unsigned int value2), |
| 98 | TP_ARGS(value1, value2), |
| 99 | TP_STRUCT__entry( |
| 100 | __field(unsigned int, value1) |
| 101 | __field(unsigned int, value2) |
| 102 | ), |
| 103 | TP_fast_assign( |
| 104 | __entry->value1 = value1; |
| 105 | __entry->value2 = value2; |
| 106 | ), |
| 107 | TP_printk("%u %u", __entry->value1, __entry->value2) |
| 108 | ); |
| 109 | |
| 110 | #define DEFINE_OCFS2_UINT_UINT_EVENT(name) \ |
| 111 | DEFINE_EVENT(ocfs2__uint_uint, name, \ |
| 112 | TP_PROTO(unsigned int val1, unsigned int val2), \ |
| 113 | TP_ARGS(val1, val2)) |
| 114 | |
Tao Ma | a09d09b | 2011-02-22 08:21:10 +0800 | [diff] [blame] | 115 | DECLARE_EVENT_CLASS(ocfs2__ull_uint, |
| 116 | TP_PROTO(unsigned long long value1, unsigned int value2), |
| 117 | TP_ARGS(value1, value2), |
| 118 | TP_STRUCT__entry( |
| 119 | __field(unsigned long long, value1) |
| 120 | __field(unsigned int, value2) |
| 121 | ), |
| 122 | TP_fast_assign( |
| 123 | __entry->value1 = value1; |
| 124 | __entry->value2 = value2; |
| 125 | ), |
| 126 | TP_printk("%llu %u", __entry->value1, __entry->value2) |
| 127 | ); |
| 128 | |
| 129 | #define DEFINE_OCFS2_ULL_UINT_EVENT(name) \ |
| 130 | DEFINE_EVENT(ocfs2__ull_uint, name, \ |
| 131 | TP_PROTO(unsigned long long val1, unsigned int val2), \ |
| 132 | TP_ARGS(val1, val2)) |
| 133 | |
Tao Ma | 64f3b26 | 2011-02-22 22:24:57 +0800 | [diff] [blame] | 134 | DECLARE_EVENT_CLASS(ocfs2__ull_int, |
| 135 | TP_PROTO(unsigned long long value1, int value2), |
| 136 | TP_ARGS(value1, value2), |
| 137 | TP_STRUCT__entry( |
| 138 | __field(unsigned long long, value1) |
| 139 | __field(int, value2) |
| 140 | ), |
| 141 | TP_fast_assign( |
| 142 | __entry->value1 = value1; |
| 143 | __entry->value2 = value2; |
| 144 | ), |
| 145 | TP_printk("%llu %d", __entry->value1, __entry->value2) |
| 146 | ); |
| 147 | |
| 148 | #define DEFINE_OCFS2_ULL_INT_EVENT(name) \ |
| 149 | DEFINE_EVENT(ocfs2__ull_int, name, \ |
| 150 | TP_PROTO(unsigned long long val1, int val2), \ |
| 151 | TP_ARGS(val1, val2)) |
| 152 | |
Tao Ma | 2f73e13 | 2011-02-22 08:22:33 +0800 | [diff] [blame] | 153 | DECLARE_EVENT_CLASS(ocfs2__ull_ull, |
| 154 | TP_PROTO(unsigned long long value1, unsigned long long value2), |
| 155 | TP_ARGS(value1, value2), |
| 156 | TP_STRUCT__entry( |
| 157 | __field(unsigned long long, value1) |
| 158 | __field(unsigned long long, value2) |
| 159 | ), |
| 160 | TP_fast_assign( |
| 161 | __entry->value1 = value1; |
| 162 | __entry->value2 = value2; |
| 163 | ), |
| 164 | TP_printk("%llu %llu", __entry->value1, __entry->value2) |
| 165 | ); |
| 166 | |
| 167 | #define DEFINE_OCFS2_ULL_ULL_EVENT(name) \ |
| 168 | DEFINE_EVENT(ocfs2__ull_ull, name, \ |
| 169 | TP_PROTO(unsigned long long val1, unsigned long long val2), \ |
| 170 | TP_ARGS(val1, val2)) |
| 171 | |
Tao Ma | 198aac28 | 2011-02-22 08:20:04 +0800 | [diff] [blame] | 172 | DECLARE_EVENT_CLASS(ocfs2__ull_ull_uint, |
| 173 | TP_PROTO(unsigned long long value1, |
| 174 | unsigned long long value2, unsigned int value3), |
| 175 | TP_ARGS(value1, value2, value3), |
| 176 | TP_STRUCT__entry( |
| 177 | __field(unsigned long long, value1) |
| 178 | __field(unsigned long long, value2) |
| 179 | __field(unsigned int, value3) |
| 180 | ), |
| 181 | TP_fast_assign( |
| 182 | __entry->value1 = value1; |
| 183 | __entry->value2 = value2; |
| 184 | __entry->value3 = value3; |
| 185 | ), |
| 186 | TP_printk("%llu %llu %u", |
| 187 | __entry->value1, __entry->value2, __entry->value3) |
| 188 | ); |
| 189 | |
| 190 | #define DEFINE_OCFS2_ULL_ULL_UINT_EVENT(name) \ |
| 191 | DEFINE_EVENT(ocfs2__ull_ull_uint, name, \ |
| 192 | TP_PROTO(unsigned long long val1, \ |
| 193 | unsigned long long val2, unsigned int val3), \ |
| 194 | TP_ARGS(val1, val2, val3)) |
| 195 | |
Tao Ma | 2f73e13 | 2011-02-22 08:22:33 +0800 | [diff] [blame] | 196 | DECLARE_EVENT_CLASS(ocfs2__ull_uint_uint, |
| 197 | TP_PROTO(unsigned long long value1, |
| 198 | unsigned int value2, unsigned int value3), |
| 199 | TP_ARGS(value1, value2, value3), |
| 200 | TP_STRUCT__entry( |
| 201 | __field(unsigned long long, value1) |
| 202 | __field(unsigned int, value2) |
| 203 | __field(unsigned int, value3) |
| 204 | ), |
| 205 | TP_fast_assign( |
| 206 | __entry->value1 = value1; |
| 207 | __entry->value2 = value2; |
| 208 | __entry->value3 = value3; |
| 209 | ), |
| 210 | TP_printk("%llu %u %u", __entry->value1, |
| 211 | __entry->value2, __entry->value3) |
| 212 | ); |
| 213 | |
| 214 | #define DEFINE_OCFS2_ULL_UINT_UINT_EVENT(name) \ |
| 215 | DEFINE_EVENT(ocfs2__ull_uint_uint, name, \ |
| 216 | TP_PROTO(unsigned long long val1, \ |
| 217 | unsigned int val2, unsigned int val3), \ |
| 218 | TP_ARGS(val1, val2, val3)) |
| 219 | |
Tao Ma | a04733d | 2011-02-22 07:56:45 +0800 | [diff] [blame] | 220 | DECLARE_EVENT_CLASS(ocfs2__uint_uint_uint, |
| 221 | TP_PROTO(unsigned int value1, unsigned int value2, |
| 222 | unsigned int value3), |
| 223 | TP_ARGS(value1, value2, value3), |
| 224 | TP_STRUCT__entry( |
| 225 | __field( unsigned int, value1 ) |
| 226 | __field( unsigned int, value2 ) |
| 227 | __field( unsigned int, value3 ) |
| 228 | ), |
| 229 | TP_fast_assign( |
| 230 | __entry->value1 = value1; |
| 231 | __entry->value2 = value2; |
| 232 | __entry->value3 = value3; |
| 233 | ), |
| 234 | TP_printk("%u %u %u", __entry->value1, __entry->value2, __entry->value3) |
| 235 | ); |
| 236 | |
| 237 | #define DEFINE_OCFS2_UINT_UINT_UINT_EVENT(name) \ |
| 238 | DEFINE_EVENT(ocfs2__uint_uint_uint, name, \ |
| 239 | TP_PROTO(unsigned int value1, unsigned int value2, \ |
| 240 | unsigned int value3), \ |
| 241 | TP_ARGS(value1, value2, value3)) |
| 242 | |
Tao Ma | 468eedd | 2011-02-22 22:14:41 +0800 | [diff] [blame] | 243 | DECLARE_EVENT_CLASS(ocfs2__ull_ull_ull, |
| 244 | TP_PROTO(unsigned long long value1, |
| 245 | unsigned long long value2, unsigned long long value3), |
| 246 | TP_ARGS(value1, value2, value3), |
| 247 | TP_STRUCT__entry( |
| 248 | __field(unsigned long long, value1) |
| 249 | __field(unsigned long long, value2) |
| 250 | __field(unsigned long long, value3) |
| 251 | ), |
| 252 | TP_fast_assign( |
| 253 | __entry->value1 = value1; |
| 254 | __entry->value2 = value2; |
| 255 | __entry->value3 = value3; |
| 256 | ), |
| 257 | TP_printk("%llu %llu %llu", |
| 258 | __entry->value1, __entry->value2, __entry->value3) |
| 259 | ); |
| 260 | |
| 261 | #define DEFINE_OCFS2_ULL_ULL_ULL_EVENT(name) \ |
| 262 | DEFINE_EVENT(ocfs2__ull_ull_ull, name, \ |
| 263 | TP_PROTO(unsigned long long value1, unsigned long long value2, \ |
| 264 | unsigned long long value3), \ |
| 265 | TP_ARGS(value1, value2, value3)) |
| 266 | |
Tao Ma | a04733d | 2011-02-22 07:56:45 +0800 | [diff] [blame] | 267 | DECLARE_EVENT_CLASS(ocfs2__ull_int_int_int, |
| 268 | TP_PROTO(unsigned long long ull, int value1, int value2, int value3), |
| 269 | TP_ARGS(ull, value1, value2, value3), |
| 270 | TP_STRUCT__entry( |
| 271 | __field( unsigned long long, ull ) |
| 272 | __field( int, value1 ) |
| 273 | __field( int, value2 ) |
| 274 | __field( int, value3 ) |
| 275 | ), |
| 276 | TP_fast_assign( |
| 277 | __entry->ull = ull; |
| 278 | __entry->value1 = value1; |
| 279 | __entry->value2 = value2; |
| 280 | __entry->value3 = value3; |
| 281 | ), |
| 282 | TP_printk("%llu %d %d %d", |
| 283 | __entry->ull, __entry->value1, |
| 284 | __entry->value2, __entry->value3) |
| 285 | ); |
| 286 | |
| 287 | #define DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(name) \ |
| 288 | DEFINE_EVENT(ocfs2__ull_int_int_int, name, \ |
| 289 | TP_PROTO(unsigned long long ull, int value1, \ |
| 290 | int value2, int value3), \ |
| 291 | TP_ARGS(ull, value1, value2, value3)) |
| 292 | |
Tao Ma | 2f73e13 | 2011-02-22 08:22:33 +0800 | [diff] [blame] | 293 | DECLARE_EVENT_CLASS(ocfs2__ull_uint_uint_uint, |
| 294 | TP_PROTO(unsigned long long ull, unsigned int value1, |
| 295 | unsigned int value2, unsigned int value3), |
| 296 | TP_ARGS(ull, value1, value2, value3), |
| 297 | TP_STRUCT__entry( |
| 298 | __field(unsigned long long, ull) |
| 299 | __field(unsigned int, value1) |
| 300 | __field(unsigned int, value2) |
| 301 | __field(unsigned int, value3) |
| 302 | ), |
| 303 | TP_fast_assign( |
| 304 | __entry->ull = ull; |
| 305 | __entry->value1 = value1; |
| 306 | __entry->value2 = value2; |
| 307 | __entry->value3 = value3; |
| 308 | ), |
| 309 | TP_printk("%llu %u %u %u", |
| 310 | __entry->ull, __entry->value1, |
| 311 | __entry->value2, __entry->value3) |
| 312 | ); |
| 313 | |
| 314 | #define DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(name) \ |
| 315 | DEFINE_EVENT(ocfs2__ull_uint_uint_uint, name, \ |
| 316 | TP_PROTO(unsigned long long ull, unsigned int value1, \ |
| 317 | unsigned int value2, unsigned int value3), \ |
| 318 | TP_ARGS(ull, value1, value2, value3)) |
| 319 | |
Tao Ma | a09d09b | 2011-02-22 08:21:10 +0800 | [diff] [blame] | 320 | /* Trace events for fs/ocfs2/alloc.c. */ |
| 321 | DECLARE_EVENT_CLASS(ocfs2__btree_ops, |
| 322 | TP_PROTO(unsigned long long owner,\ |
| 323 | unsigned int value1, unsigned int value2), |
| 324 | TP_ARGS(owner, value1, value2), |
| 325 | TP_STRUCT__entry( |
| 326 | __field(unsigned long long, owner) |
| 327 | __field(unsigned int, value1) |
| 328 | __field(unsigned int, value2) |
| 329 | ), |
| 330 | TP_fast_assign( |
| 331 | __entry->owner = owner; |
| 332 | __entry->value1 = value1; |
| 333 | __entry->value2 = value2; |
| 334 | ), |
| 335 | TP_printk("%llu %u %u", |
| 336 | __entry->owner, __entry->value1, __entry->value2) |
| 337 | ); |
| 338 | |
| 339 | #define DEFINE_OCFS2_BTREE_EVENT(name) \ |
| 340 | DEFINE_EVENT(ocfs2__btree_ops, name, \ |
| 341 | TP_PROTO(unsigned long long owner, \ |
| 342 | unsigned int value1, unsigned int value2), \ |
| 343 | TP_ARGS(owner, value1, value2)) |
| 344 | |
| 345 | DEFINE_OCFS2_BTREE_EVENT(ocfs2_adjust_rightmost_branch); |
| 346 | |
| 347 | DEFINE_OCFS2_BTREE_EVENT(ocfs2_rotate_tree_right); |
| 348 | |
| 349 | DEFINE_OCFS2_BTREE_EVENT(ocfs2_append_rec_to_path); |
| 350 | |
| 351 | DEFINE_OCFS2_BTREE_EVENT(ocfs2_insert_extent_start); |
| 352 | |
| 353 | DEFINE_OCFS2_BTREE_EVENT(ocfs2_add_clusters_in_btree); |
| 354 | |
| 355 | DEFINE_OCFS2_INT_EVENT(ocfs2_num_free_extents); |
| 356 | |
| 357 | DEFINE_OCFS2_INT_EVENT(ocfs2_complete_edge_insert); |
| 358 | |
| 359 | TRACE_EVENT(ocfs2_grow_tree, |
| 360 | TP_PROTO(unsigned long long owner, int depth), |
| 361 | TP_ARGS(owner, depth), |
| 362 | TP_STRUCT__entry( |
| 363 | __field(unsigned long long, owner) |
| 364 | __field(int, depth) |
| 365 | ), |
| 366 | TP_fast_assign( |
| 367 | __entry->owner = owner; |
| 368 | __entry->depth = depth; |
| 369 | ), |
| 370 | TP_printk("%llu %d", __entry->owner, __entry->depth) |
| 371 | ); |
| 372 | |
| 373 | TRACE_EVENT(ocfs2_rotate_subtree, |
| 374 | TP_PROTO(int subtree_root, unsigned long long blkno, |
| 375 | int depth), |
| 376 | TP_ARGS(subtree_root, blkno, depth), |
| 377 | TP_STRUCT__entry( |
| 378 | __field(int, subtree_root) |
| 379 | __field(unsigned long long, blkno) |
| 380 | __field(int, depth) |
| 381 | ), |
| 382 | TP_fast_assign( |
| 383 | __entry->subtree_root = subtree_root; |
| 384 | __entry->blkno = blkno; |
| 385 | __entry->depth = depth; |
| 386 | ), |
| 387 | TP_printk("%d %llu %d", __entry->subtree_root, |
| 388 | __entry->blkno, __entry->depth) |
| 389 | ); |
| 390 | |
| 391 | TRACE_EVENT(ocfs2_insert_extent, |
| 392 | TP_PROTO(unsigned int ins_appending, unsigned int ins_contig, |
| 393 | int ins_contig_index, int free_records, int ins_tree_depth), |
| 394 | TP_ARGS(ins_appending, ins_contig, ins_contig_index, free_records, |
| 395 | ins_tree_depth), |
| 396 | TP_STRUCT__entry( |
| 397 | __field(unsigned int, ins_appending) |
| 398 | __field(unsigned int, ins_contig) |
| 399 | __field(int, ins_contig_index) |
| 400 | __field(int, free_records) |
| 401 | __field(int, ins_tree_depth) |
| 402 | ), |
| 403 | TP_fast_assign( |
| 404 | __entry->ins_appending = ins_appending; |
| 405 | __entry->ins_contig = ins_contig; |
| 406 | __entry->ins_contig_index = ins_contig_index; |
| 407 | __entry->free_records = free_records; |
| 408 | __entry->ins_tree_depth = ins_tree_depth; |
| 409 | ), |
| 410 | TP_printk("%u %u %d %d %d", |
| 411 | __entry->ins_appending, __entry->ins_contig, |
| 412 | __entry->ins_contig_index, __entry->free_records, |
| 413 | __entry->ins_tree_depth) |
| 414 | ); |
| 415 | |
| 416 | TRACE_EVENT(ocfs2_split_extent, |
| 417 | TP_PROTO(int split_index, unsigned int c_contig_type, |
| 418 | unsigned int c_has_empty_extent, |
| 419 | unsigned int c_split_covers_rec), |
| 420 | TP_ARGS(split_index, c_contig_type, |
| 421 | c_has_empty_extent, c_split_covers_rec), |
| 422 | TP_STRUCT__entry( |
| 423 | __field(int, split_index) |
| 424 | __field(unsigned int, c_contig_type) |
| 425 | __field(unsigned int, c_has_empty_extent) |
| 426 | __field(unsigned int, c_split_covers_rec) |
| 427 | ), |
| 428 | TP_fast_assign( |
| 429 | __entry->split_index = split_index; |
| 430 | __entry->c_contig_type = c_contig_type; |
| 431 | __entry->c_has_empty_extent = c_has_empty_extent; |
| 432 | __entry->c_split_covers_rec = c_split_covers_rec; |
| 433 | ), |
| 434 | TP_printk("%d %u %u %u", __entry->split_index, __entry->c_contig_type, |
| 435 | __entry->c_has_empty_extent, __entry->c_split_covers_rec) |
| 436 | ); |
| 437 | |
| 438 | TRACE_EVENT(ocfs2_remove_extent, |
| 439 | TP_PROTO(unsigned long long owner, unsigned int cpos, |
| 440 | unsigned int len, int index, |
| 441 | unsigned int e_cpos, unsigned int clusters), |
| 442 | TP_ARGS(owner, cpos, len, index, e_cpos, clusters), |
| 443 | TP_STRUCT__entry( |
| 444 | __field(unsigned long long, owner) |
| 445 | __field(unsigned int, cpos) |
| 446 | __field(unsigned int, len) |
| 447 | __field(int, index) |
| 448 | __field(unsigned int, e_cpos) |
| 449 | __field(unsigned int, clusters) |
| 450 | ), |
| 451 | TP_fast_assign( |
| 452 | __entry->owner = owner; |
| 453 | __entry->cpos = cpos; |
| 454 | __entry->len = len; |
| 455 | __entry->index = index; |
| 456 | __entry->e_cpos = e_cpos; |
| 457 | __entry->clusters = clusters; |
| 458 | ), |
| 459 | TP_printk("%llu %u %u %d %u %u", |
| 460 | __entry->owner, __entry->cpos, __entry->len, __entry->index, |
| 461 | __entry->e_cpos, __entry->clusters) |
| 462 | ); |
| 463 | |
| 464 | TRACE_EVENT(ocfs2_commit_truncate, |
| 465 | TP_PROTO(unsigned long long ino, unsigned int new_cpos, |
| 466 | unsigned int clusters, unsigned int depth), |
| 467 | TP_ARGS(ino, new_cpos, clusters, depth), |
| 468 | TP_STRUCT__entry( |
| 469 | __field(unsigned long long, ino) |
| 470 | __field(unsigned int, new_cpos) |
| 471 | __field(unsigned int, clusters) |
| 472 | __field(unsigned int, depth) |
| 473 | ), |
| 474 | TP_fast_assign( |
| 475 | __entry->ino = ino; |
| 476 | __entry->new_cpos = new_cpos; |
| 477 | __entry->clusters = clusters; |
| 478 | __entry->depth = depth; |
| 479 | ), |
| 480 | TP_printk("%llu %u %u %u", |
| 481 | __entry->ino, __entry->new_cpos, |
| 482 | __entry->clusters, __entry->depth) |
| 483 | ); |
| 484 | |
| 485 | TRACE_EVENT(ocfs2_validate_extent_block, |
| 486 | TP_PROTO(unsigned long long blkno), |
| 487 | TP_ARGS(blkno), |
| 488 | TP_STRUCT__entry( |
| 489 | __field(unsigned long long, blkno) |
| 490 | ), |
| 491 | TP_fast_assign( |
| 492 | __entry->blkno = blkno; |
| 493 | ), |
| 494 | TP_printk("%llu ", __entry->blkno) |
| 495 | ); |
| 496 | |
| 497 | TRACE_EVENT(ocfs2_rotate_leaf, |
| 498 | TP_PROTO(unsigned int insert_cpos, int insert_index, |
| 499 | int has_empty, int next_free, |
| 500 | unsigned int l_count), |
| 501 | TP_ARGS(insert_cpos, insert_index, has_empty, |
| 502 | next_free, l_count), |
| 503 | TP_STRUCT__entry( |
| 504 | __field(unsigned int, insert_cpos) |
| 505 | __field(int, insert_index) |
| 506 | __field(int, has_empty) |
| 507 | __field(int, next_free) |
| 508 | __field(unsigned int, l_count) |
| 509 | ), |
| 510 | TP_fast_assign( |
| 511 | __entry->insert_cpos = insert_cpos; |
| 512 | __entry->insert_index = insert_index; |
| 513 | __entry->has_empty = has_empty; |
| 514 | __entry->next_free = next_free; |
| 515 | __entry->l_count = l_count; |
| 516 | ), |
| 517 | TP_printk("%u %d %d %d %u", __entry->insert_cpos, |
| 518 | __entry->insert_index, __entry->has_empty, |
| 519 | __entry->next_free, __entry->l_count) |
| 520 | ); |
| 521 | |
| 522 | TRACE_EVENT(ocfs2_add_clusters_in_btree_ret, |
| 523 | TP_PROTO(int status, int reason, int err), |
| 524 | TP_ARGS(status, reason, err), |
| 525 | TP_STRUCT__entry( |
| 526 | __field(int, status) |
| 527 | __field(int, reason) |
| 528 | __field(int, err) |
| 529 | ), |
| 530 | TP_fast_assign( |
| 531 | __entry->status = status; |
| 532 | __entry->reason = reason; |
| 533 | __entry->err = err; |
| 534 | ), |
| 535 | TP_printk("%d %d %d", __entry->status, |
| 536 | __entry->reason, __entry->err) |
| 537 | ); |
| 538 | |
| 539 | TRACE_EVENT(ocfs2_mark_extent_written, |
| 540 | TP_PROTO(unsigned long long owner, unsigned int cpos, |
| 541 | unsigned int len, unsigned int phys), |
| 542 | TP_ARGS(owner, cpos, len, phys), |
| 543 | TP_STRUCT__entry( |
| 544 | __field(unsigned long long, owner) |
| 545 | __field(unsigned int, cpos) |
| 546 | __field(unsigned int, len) |
| 547 | __field(unsigned int, phys) |
| 548 | ), |
| 549 | TP_fast_assign( |
| 550 | __entry->owner = owner; |
| 551 | __entry->cpos = cpos; |
| 552 | __entry->len = len; |
| 553 | __entry->phys = phys; |
| 554 | ), |
| 555 | TP_printk("%llu %u %u %u", |
| 556 | __entry->owner, __entry->cpos, |
| 557 | __entry->len, __entry->phys) |
| 558 | ); |
| 559 | |
| 560 | DECLARE_EVENT_CLASS(ocfs2__truncate_log_ops, |
| 561 | TP_PROTO(unsigned long long blkno, int index, |
| 562 | unsigned int start, unsigned int num), |
| 563 | TP_ARGS(blkno, index, start, num), |
| 564 | TP_STRUCT__entry( |
| 565 | __field(unsigned long long, blkno) |
| 566 | __field(int, index) |
| 567 | __field(unsigned int, start) |
| 568 | __field(unsigned int, num) |
| 569 | ), |
| 570 | TP_fast_assign( |
| 571 | __entry->blkno = blkno; |
| 572 | __entry->index = index; |
| 573 | __entry->start = start; |
| 574 | __entry->num = num; |
| 575 | ), |
| 576 | TP_printk("%llu %d %u %u", |
| 577 | __entry->blkno, __entry->index, |
| 578 | __entry->start, __entry->num) |
| 579 | ); |
| 580 | |
| 581 | #define DEFINE_OCFS2_TRUNCATE_LOG_OPS_EVENT(name) \ |
| 582 | DEFINE_EVENT(ocfs2__truncate_log_ops, name, \ |
| 583 | TP_PROTO(unsigned long long blkno, int index, \ |
| 584 | unsigned int start, unsigned int num), \ |
| 585 | TP_ARGS(blkno, index, start, num)) |
| 586 | |
| 587 | DEFINE_OCFS2_TRUNCATE_LOG_OPS_EVENT(ocfs2_truncate_log_append); |
| 588 | |
| 589 | DEFINE_OCFS2_TRUNCATE_LOG_OPS_EVENT(ocfs2_replay_truncate_records); |
| 590 | |
| 591 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_flush_truncate_log); |
| 592 | |
| 593 | DEFINE_OCFS2_INT_EVENT(ocfs2_begin_truncate_log_recovery); |
| 594 | |
| 595 | DEFINE_OCFS2_INT_EVENT(ocfs2_truncate_log_recovery_num); |
| 596 | |
| 597 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_complete_truncate_log_recovery); |
| 598 | |
| 599 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_free_cached_blocks); |
| 600 | |
| 601 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_cache_cluster_dealloc); |
| 602 | |
| 603 | DEFINE_OCFS2_INT_INT_EVENT(ocfs2_run_deallocs); |
| 604 | |
| 605 | TRACE_EVENT(ocfs2_cache_block_dealloc, |
| 606 | TP_PROTO(int type, int slot, unsigned long long suballoc, |
| 607 | unsigned long long blkno, unsigned int bit), |
| 608 | TP_ARGS(type, slot, suballoc, blkno, bit), |
| 609 | TP_STRUCT__entry( |
| 610 | __field(int, type) |
| 611 | __field(int, slot) |
| 612 | __field(unsigned long long, suballoc) |
| 613 | __field(unsigned long long, blkno) |
| 614 | __field(unsigned int, bit) |
| 615 | ), |
| 616 | TP_fast_assign( |
| 617 | __entry->type = type; |
| 618 | __entry->slot = slot; |
| 619 | __entry->suballoc = suballoc; |
| 620 | __entry->blkno = blkno; |
| 621 | __entry->bit = bit; |
| 622 | ), |
| 623 | TP_printk("%d %d %llu %llu %u", |
| 624 | __entry->type, __entry->slot, __entry->suballoc, |
| 625 | __entry->blkno, __entry->bit) |
| 626 | ); |
| 627 | |
| 628 | /* End of trace events for fs/ocfs2/alloc.c. */ |
Wengang Wang | 80a9a84 | 2011-02-21 11:13:14 +0800 | [diff] [blame] | 629 | |
Tao Ma | a04733d | 2011-02-22 07:56:45 +0800 | [diff] [blame] | 630 | /* Trace events for fs/ocfs2/localalloc.c. */ |
| 631 | |
| 632 | DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_la_set_sizes); |
| 633 | |
| 634 | DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_alloc_should_use_local); |
| 635 | |
| 636 | DEFINE_OCFS2_INT_EVENT(ocfs2_load_local_alloc); |
| 637 | |
| 638 | DEFINE_OCFS2_INT_EVENT(ocfs2_begin_local_alloc_recovery); |
| 639 | |
| 640 | DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_reserve_local_alloc_bits); |
| 641 | |
| 642 | DEFINE_OCFS2_UINT_EVENT(ocfs2_local_alloc_count_bits); |
| 643 | |
| 644 | DEFINE_OCFS2_INT_INT_EVENT(ocfs2_local_alloc_find_clear_bits_search_bitmap); |
| 645 | |
| 646 | DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_local_alloc_find_clear_bits); |
| 647 | |
| 648 | DEFINE_OCFS2_INT_INT_EVENT(ocfs2_sync_local_to_main); |
| 649 | |
| 650 | TRACE_EVENT(ocfs2_sync_local_to_main_free, |
| 651 | TP_PROTO(int count, int bit, unsigned long long start_blk, |
| 652 | unsigned long long blkno), |
| 653 | TP_ARGS(count, bit, start_blk, blkno), |
| 654 | TP_STRUCT__entry( |
| 655 | __field(int, count) |
| 656 | __field(int, bit) |
| 657 | __field(unsigned long long, start_blk) |
| 658 | __field(unsigned long long, blkno) |
| 659 | ), |
| 660 | TP_fast_assign( |
| 661 | __entry->count = count; |
| 662 | __entry->bit = bit; |
| 663 | __entry->start_blk = start_blk; |
| 664 | __entry->blkno = blkno; |
| 665 | ), |
| 666 | TP_printk("%d %d %llu %llu", |
| 667 | __entry->count, __entry->bit, __entry->start_blk, |
| 668 | __entry->blkno) |
| 669 | ); |
| 670 | |
| 671 | DEFINE_OCFS2_INT_INT_EVENT(ocfs2_local_alloc_new_window); |
| 672 | |
| 673 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_local_alloc_new_window_result); |
| 674 | |
| 675 | /* End of trace events for fs/ocfs2/localalloc.c. */ |
Tao Ma | 2f73e13 | 2011-02-22 08:22:33 +0800 | [diff] [blame] | 676 | |
Tao Ma | a543870 | 2011-02-22 08:24:01 +0800 | [diff] [blame] | 677 | /* Trace events for fs/ocfs2/resize.c. */ |
| 678 | |
| 679 | DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_update_last_group_and_inode); |
| 680 | |
| 681 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_group_extend); |
| 682 | |
| 683 | DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_group_add); |
| 684 | |
| 685 | /* End of trace events for fs/ocfs2/resize.c. */ |
| 686 | |
Tao Ma | 2f73e13 | 2011-02-22 08:22:33 +0800 | [diff] [blame] | 687 | /* Trace events for fs/ocfs2/suballoc.c. */ |
| 688 | |
| 689 | DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_group_descriptor); |
| 690 | |
| 691 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_block_group_alloc_contig); |
| 692 | |
| 693 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_block_group_alloc_discontig); |
| 694 | |
| 695 | DEFINE_OCFS2_ULL_EVENT(ocfs2_block_group_alloc); |
| 696 | |
| 697 | DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_reserve_suballoc_bits_nospc); |
| 698 | |
| 699 | DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_reserve_suballoc_bits_no_new_group); |
| 700 | |
| 701 | DEFINE_OCFS2_ULL_EVENT(ocfs2_reserve_new_inode_new_group); |
| 702 | |
| 703 | DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_block_group_set_bits); |
| 704 | |
| 705 | TRACE_EVENT(ocfs2_relink_block_group, |
| 706 | TP_PROTO(unsigned long long i_blkno, unsigned int chain, |
| 707 | unsigned long long bg_blkno, |
| 708 | unsigned long long prev_blkno), |
| 709 | TP_ARGS(i_blkno, chain, bg_blkno, prev_blkno), |
| 710 | TP_STRUCT__entry( |
| 711 | __field(unsigned long long, i_blkno) |
| 712 | __field(unsigned int, chain) |
| 713 | __field(unsigned long long, bg_blkno) |
| 714 | __field(unsigned long long, prev_blkno) |
| 715 | ), |
| 716 | TP_fast_assign( |
| 717 | __entry->i_blkno = i_blkno; |
| 718 | __entry->chain = chain; |
| 719 | __entry->bg_blkno = bg_blkno; |
| 720 | __entry->prev_blkno = prev_blkno; |
| 721 | ), |
| 722 | TP_printk("%llu %u %llu %llu", |
| 723 | __entry->i_blkno, __entry->chain, __entry->bg_blkno, |
| 724 | __entry->prev_blkno) |
| 725 | ); |
| 726 | |
| 727 | DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_cluster_group_search_wrong_max_bits); |
| 728 | |
| 729 | DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_cluster_group_search_max_block); |
| 730 | |
| 731 | DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_block_group_search_max_block); |
| 732 | |
| 733 | DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_search_chain_begin); |
| 734 | |
| 735 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_search_chain_succ); |
| 736 | |
| 737 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_search_chain_end); |
| 738 | |
| 739 | DEFINE_OCFS2_UINT_EVENT(ocfs2_claim_suballoc_bits); |
| 740 | |
| 741 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_claim_new_inode_at_loc); |
| 742 | |
| 743 | DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_block_group_clear_bits); |
| 744 | |
| 745 | TRACE_EVENT(ocfs2_free_suballoc_bits, |
| 746 | TP_PROTO(unsigned long long inode, unsigned long long group, |
| 747 | unsigned int start_bit, unsigned int count), |
| 748 | TP_ARGS(inode, group, start_bit, count), |
| 749 | TP_STRUCT__entry( |
| 750 | __field(unsigned long long, inode) |
| 751 | __field(unsigned long long, group) |
| 752 | __field(unsigned int, start_bit) |
| 753 | __field(unsigned int, count) |
| 754 | ), |
| 755 | TP_fast_assign( |
| 756 | __entry->inode = inode; |
| 757 | __entry->group = group; |
| 758 | __entry->start_bit = start_bit; |
| 759 | __entry->count = count; |
| 760 | ), |
| 761 | TP_printk("%llu %llu %u %u", __entry->inode, __entry->group, |
| 762 | __entry->start_bit, __entry->count) |
| 763 | ); |
| 764 | |
| 765 | TRACE_EVENT(ocfs2_free_clusters, |
| 766 | TP_PROTO(unsigned long long bg_blkno, unsigned long long start_blk, |
| 767 | unsigned int start_bit, unsigned int count), |
| 768 | TP_ARGS(bg_blkno, start_blk, start_bit, count), |
| 769 | TP_STRUCT__entry( |
| 770 | __field(unsigned long long, bg_blkno) |
| 771 | __field(unsigned long long, start_blk) |
| 772 | __field(unsigned int, start_bit) |
| 773 | __field(unsigned int, count) |
| 774 | ), |
| 775 | TP_fast_assign( |
| 776 | __entry->bg_blkno = bg_blkno; |
| 777 | __entry->start_blk = start_blk; |
| 778 | __entry->start_bit = start_bit; |
| 779 | __entry->count = count; |
| 780 | ), |
| 781 | TP_printk("%llu %llu %u %u", __entry->bg_blkno, __entry->start_blk, |
| 782 | __entry->start_bit, __entry->count) |
| 783 | ); |
| 784 | |
| 785 | DEFINE_OCFS2_ULL_EVENT(ocfs2_get_suballoc_slot_bit); |
| 786 | |
| 787 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_test_suballoc_bit); |
| 788 | |
| 789 | DEFINE_OCFS2_ULL_EVENT(ocfs2_test_inode_bit); |
| 790 | |
| 791 | /* End of trace events for fs/ocfs2/suballoc.c. */ |
Tao Ma | 198aac28 | 2011-02-22 08:20:04 +0800 | [diff] [blame] | 792 | |
| 793 | /* Trace events for fs/ocfs2/refcounttree.c. */ |
| 794 | |
| 795 | DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_refcount_block); |
| 796 | |
| 797 | DEFINE_OCFS2_ULL_EVENT(ocfs2_purge_refcount_trees); |
| 798 | |
| 799 | DEFINE_OCFS2_ULL_EVENT(ocfs2_create_refcount_tree); |
| 800 | |
| 801 | DEFINE_OCFS2_ULL_EVENT(ocfs2_create_refcount_tree_blkno); |
| 802 | |
| 803 | DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_change_refcount_rec); |
| 804 | |
| 805 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_expand_inline_ref_root); |
| 806 | |
| 807 | DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_divide_leaf_refcount_block); |
| 808 | |
| 809 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_new_leaf_refcount_block); |
| 810 | |
| 811 | DECLARE_EVENT_CLASS(ocfs2__refcount_tree_ops, |
| 812 | TP_PROTO(unsigned long long blkno, int index, |
| 813 | unsigned long long cpos, |
| 814 | unsigned int clusters, unsigned int refcount), |
| 815 | TP_ARGS(blkno, index, cpos, clusters, refcount), |
| 816 | TP_STRUCT__entry( |
| 817 | __field(unsigned long long, blkno) |
| 818 | __field(int, index) |
| 819 | __field(unsigned long long, cpos) |
| 820 | __field(unsigned int, clusters) |
| 821 | __field(unsigned int, refcount) |
| 822 | ), |
| 823 | TP_fast_assign( |
| 824 | __entry->blkno = blkno; |
| 825 | __entry->index = index; |
| 826 | __entry->cpos = cpos; |
| 827 | __entry->clusters = clusters; |
| 828 | __entry->refcount = refcount; |
| 829 | ), |
| 830 | TP_printk("%llu %d %llu %u %u", __entry->blkno, __entry->index, |
| 831 | __entry->cpos, __entry->clusters, __entry->refcount) |
| 832 | ); |
| 833 | |
| 834 | #define DEFINE_OCFS2_REFCOUNT_TREE_OPS_EVENT(name) \ |
| 835 | DEFINE_EVENT(ocfs2__refcount_tree_ops, name, \ |
| 836 | TP_PROTO(unsigned long long blkno, int index, \ |
| 837 | unsigned long long cpos, \ |
| 838 | unsigned int count, unsigned int refcount), \ |
| 839 | TP_ARGS(blkno, index, cpos, count, refcount)) |
| 840 | |
| 841 | DEFINE_OCFS2_REFCOUNT_TREE_OPS_EVENT(ocfs2_insert_refcount_rec); |
| 842 | |
| 843 | TRACE_EVENT(ocfs2_split_refcount_rec, |
| 844 | TP_PROTO(unsigned long long cpos, |
| 845 | unsigned int clusters, unsigned int refcount, |
| 846 | unsigned long long split_cpos, |
| 847 | unsigned int split_clusters, unsigned int split_refcount), |
| 848 | TP_ARGS(cpos, clusters, refcount, |
| 849 | split_cpos, split_clusters, split_refcount), |
| 850 | TP_STRUCT__entry( |
| 851 | __field(unsigned long long, cpos) |
| 852 | __field(unsigned int, clusters) |
| 853 | __field(unsigned int, refcount) |
| 854 | __field(unsigned long long, split_cpos) |
| 855 | __field(unsigned int, split_clusters) |
| 856 | __field(unsigned int, split_refcount) |
| 857 | ), |
| 858 | TP_fast_assign( |
| 859 | __entry->cpos = cpos; |
| 860 | __entry->clusters = clusters; |
| 861 | __entry->refcount = refcount; |
| 862 | __entry->split_cpos = split_cpos; |
| 863 | __entry->split_clusters = split_clusters; |
| 864 | __entry->split_refcount = split_refcount; |
| 865 | ), |
| 866 | TP_printk("%llu %u %u %llu %u %u", |
| 867 | __entry->cpos, __entry->clusters, __entry->refcount, |
| 868 | __entry->split_cpos, __entry->split_clusters, |
| 869 | __entry->split_refcount) |
| 870 | ); |
| 871 | |
| 872 | DEFINE_OCFS2_REFCOUNT_TREE_OPS_EVENT(ocfs2_split_refcount_rec_insert); |
| 873 | |
| 874 | DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_increase_refcount_begin); |
| 875 | |
| 876 | DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_increase_refcount_change); |
| 877 | |
| 878 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_increase_refcount_insert); |
| 879 | |
| 880 | DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_increase_refcount_split); |
| 881 | |
| 882 | DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_remove_refcount_extent); |
| 883 | |
| 884 | DEFINE_OCFS2_ULL_EVENT(ocfs2_restore_refcount_block); |
| 885 | |
| 886 | DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_decrease_refcount_rec); |
| 887 | |
| 888 | TRACE_EVENT(ocfs2_decrease_refcount, |
| 889 | TP_PROTO(unsigned long long owner, |
| 890 | unsigned long long cpos, |
| 891 | unsigned int len, int delete), |
| 892 | TP_ARGS(owner, cpos, len, delete), |
| 893 | TP_STRUCT__entry( |
| 894 | __field(unsigned long long, owner) |
| 895 | __field(unsigned long long, cpos) |
| 896 | __field(unsigned int, len) |
| 897 | __field(int, delete) |
| 898 | ), |
| 899 | TP_fast_assign( |
| 900 | __entry->owner = owner; |
| 901 | __entry->cpos = cpos; |
| 902 | __entry->len = len; |
| 903 | __entry->delete = delete; |
| 904 | ), |
| 905 | TP_printk("%llu %llu %u %d", |
| 906 | __entry->owner, __entry->cpos, __entry->len, __entry->delete) |
| 907 | ); |
| 908 | |
| 909 | DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_mark_extent_refcounted); |
| 910 | |
| 911 | DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_calc_refcount_meta_credits); |
| 912 | |
| 913 | TRACE_EVENT(ocfs2_calc_refcount_meta_credits_iterate, |
| 914 | TP_PROTO(int recs_add, unsigned long long cpos, |
| 915 | unsigned int clusters, unsigned long long r_cpos, |
| 916 | unsigned int r_clusters, unsigned int refcount, int index), |
| 917 | TP_ARGS(recs_add, cpos, clusters, r_cpos, r_clusters, refcount, index), |
| 918 | TP_STRUCT__entry( |
| 919 | __field(int, recs_add) |
| 920 | __field(unsigned long long, cpos) |
| 921 | __field(unsigned int, clusters) |
| 922 | __field(unsigned long long, r_cpos) |
| 923 | __field(unsigned int, r_clusters) |
| 924 | __field(unsigned int, refcount) |
| 925 | __field(int, index) |
| 926 | ), |
| 927 | TP_fast_assign( |
| 928 | __entry->recs_add = recs_add; |
| 929 | __entry->cpos = cpos; |
| 930 | __entry->clusters = clusters; |
| 931 | __entry->r_cpos = r_cpos; |
| 932 | __entry->r_clusters = r_clusters; |
| 933 | __entry->refcount = refcount; |
| 934 | __entry->index = index; |
| 935 | ), |
| 936 | TP_printk("%d %llu %u %llu %u %u %d", |
| 937 | __entry->recs_add, __entry->cpos, __entry->clusters, |
| 938 | __entry->r_cpos, __entry->r_clusters, |
| 939 | __entry->refcount, __entry->index) |
| 940 | ); |
| 941 | |
| 942 | DEFINE_OCFS2_INT_INT_EVENT(ocfs2_add_refcount_flag); |
| 943 | |
| 944 | DEFINE_OCFS2_INT_INT_EVENT(ocfs2_prepare_refcount_change_for_del); |
| 945 | |
| 946 | DEFINE_OCFS2_INT_INT_EVENT(ocfs2_lock_refcount_allocators); |
| 947 | |
| 948 | DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_duplicate_clusters_by_page); |
| 949 | |
| 950 | DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_duplicate_clusters_by_jbd); |
| 951 | |
| 952 | TRACE_EVENT(ocfs2_clear_ext_refcount, |
| 953 | TP_PROTO(unsigned long long ino, unsigned int cpos, |
| 954 | unsigned int len, unsigned int p_cluster, |
| 955 | unsigned int ext_flags), |
| 956 | TP_ARGS(ino, cpos, len, p_cluster, ext_flags), |
| 957 | TP_STRUCT__entry( |
| 958 | __field(unsigned long long, ino) |
| 959 | __field(unsigned int, cpos) |
| 960 | __field(unsigned int, len) |
| 961 | __field(unsigned int, p_cluster) |
| 962 | __field(unsigned int, ext_flags) |
| 963 | ), |
| 964 | TP_fast_assign( |
| 965 | __entry->ino = ino; |
| 966 | __entry->cpos = cpos; |
| 967 | __entry->len = len; |
| 968 | __entry->p_cluster = p_cluster; |
| 969 | __entry->ext_flags = ext_flags; |
| 970 | ), |
| 971 | TP_printk("%llu %u %u %u %u", |
| 972 | __entry->ino, __entry->cpos, __entry->len, |
| 973 | __entry->p_cluster, __entry->ext_flags) |
| 974 | ); |
| 975 | |
| 976 | TRACE_EVENT(ocfs2_replace_clusters, |
| 977 | TP_PROTO(unsigned long long ino, unsigned int cpos, |
| 978 | unsigned int old, unsigned int new, unsigned int len, |
| 979 | unsigned int ext_flags), |
| 980 | TP_ARGS(ino, cpos, old, new, len, ext_flags), |
| 981 | TP_STRUCT__entry( |
| 982 | __field(unsigned long long, ino) |
| 983 | __field(unsigned int, cpos) |
| 984 | __field(unsigned int, old) |
| 985 | __field(unsigned int, new) |
| 986 | __field(unsigned int, len) |
| 987 | __field(unsigned int, ext_flags) |
| 988 | ), |
| 989 | TP_fast_assign( |
| 990 | __entry->ino = ino; |
| 991 | __entry->cpos = cpos; |
| 992 | __entry->old = old; |
| 993 | __entry->new = new; |
| 994 | __entry->len = len; |
| 995 | __entry->ext_flags = ext_flags; |
| 996 | ), |
| 997 | TP_printk("%llu %u %u %u %u %u", |
| 998 | __entry->ino, __entry->cpos, __entry->old, __entry->new, |
| 999 | __entry->len, __entry->ext_flags) |
| 1000 | ); |
| 1001 | |
| 1002 | DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_make_clusters_writable); |
| 1003 | |
| 1004 | TRACE_EVENT(ocfs2_refcount_cow_hunk, |
| 1005 | TP_PROTO(unsigned long long ino, unsigned int cpos, |
| 1006 | unsigned int write_len, unsigned int max_cpos, |
| 1007 | unsigned int cow_start, unsigned int cow_len), |
| 1008 | TP_ARGS(ino, cpos, write_len, max_cpos, cow_start, cow_len), |
| 1009 | TP_STRUCT__entry( |
| 1010 | __field(unsigned long long, ino) |
| 1011 | __field(unsigned int, cpos) |
| 1012 | __field(unsigned int, write_len) |
| 1013 | __field(unsigned int, max_cpos) |
| 1014 | __field(unsigned int, cow_start) |
| 1015 | __field(unsigned int, cow_len) |
| 1016 | ), |
| 1017 | TP_fast_assign( |
| 1018 | __entry->ino = ino; |
| 1019 | __entry->cpos = cpos; |
| 1020 | __entry->write_len = write_len; |
| 1021 | __entry->max_cpos = max_cpos; |
| 1022 | __entry->cow_start = cow_start; |
| 1023 | __entry->cow_len = cow_len; |
| 1024 | ), |
| 1025 | TP_printk("%llu %u %u %u %u %u", |
| 1026 | __entry->ino, __entry->cpos, __entry->write_len, |
| 1027 | __entry->max_cpos, __entry->cow_start, __entry->cow_len) |
| 1028 | ); |
| 1029 | |
| 1030 | /* End of trace events for fs/ocfs2/refcounttree.c. */ |
Tao Ma | 9558156 | 2011-02-22 21:33:59 +0800 | [diff] [blame] | 1031 | |
| 1032 | /* Trace events for fs/ocfs2/aops.c. */ |
| 1033 | |
| 1034 | DECLARE_EVENT_CLASS(ocfs2__get_block, |
| 1035 | TP_PROTO(unsigned long long ino, unsigned long long iblock, |
| 1036 | void *bh_result, int create), |
| 1037 | TP_ARGS(ino, iblock, bh_result, create), |
| 1038 | TP_STRUCT__entry( |
| 1039 | __field(unsigned long long, ino) |
| 1040 | __field(unsigned long long, iblock) |
| 1041 | __field(void *, bh_result) |
| 1042 | __field(int, create) |
| 1043 | ), |
| 1044 | TP_fast_assign( |
| 1045 | __entry->ino = ino; |
| 1046 | __entry->iblock = iblock; |
| 1047 | __entry->bh_result = bh_result; |
| 1048 | __entry->create = create; |
| 1049 | ), |
| 1050 | TP_printk("%llu %llu %p %d", |
| 1051 | __entry->ino, __entry->iblock, |
| 1052 | __entry->bh_result, __entry->create) |
| 1053 | ); |
| 1054 | |
| 1055 | #define DEFINE_OCFS2_GET_BLOCK_EVENT(name) \ |
| 1056 | DEFINE_EVENT(ocfs2__get_block, name, \ |
| 1057 | TP_PROTO(unsigned long long ino, unsigned long long iblock, \ |
| 1058 | void *bh_result, int create), \ |
| 1059 | TP_ARGS(ino, iblock, bh_result, create)) |
| 1060 | |
| 1061 | DEFINE_OCFS2_GET_BLOCK_EVENT(ocfs2_symlink_get_block); |
| 1062 | |
| 1063 | DEFINE_OCFS2_GET_BLOCK_EVENT(ocfs2_get_block); |
| 1064 | |
| 1065 | DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_get_block_end); |
| 1066 | |
| 1067 | DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_readpage); |
| 1068 | |
| 1069 | DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_writepage); |
| 1070 | |
| 1071 | DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_bmap); |
| 1072 | |
| 1073 | TRACE_EVENT(ocfs2_try_to_write_inline_data, |
| 1074 | TP_PROTO(unsigned long long ino, unsigned int len, |
| 1075 | unsigned long long pos, unsigned int flags), |
| 1076 | TP_ARGS(ino, len, pos, flags), |
| 1077 | TP_STRUCT__entry( |
| 1078 | __field(unsigned long long, ino) |
| 1079 | __field(unsigned int, len) |
| 1080 | __field(unsigned long long, pos) |
| 1081 | __field(unsigned int, flags) |
| 1082 | ), |
| 1083 | TP_fast_assign( |
| 1084 | __entry->ino = ino; |
| 1085 | __entry->len = len; |
| 1086 | __entry->pos = pos; |
| 1087 | __entry->flags = flags; |
| 1088 | ), |
| 1089 | TP_printk("%llu %u %llu 0x%x", |
| 1090 | __entry->ino, __entry->len, __entry->pos, __entry->flags) |
| 1091 | ); |
| 1092 | |
| 1093 | TRACE_EVENT(ocfs2_write_begin_nolock, |
| 1094 | TP_PROTO(unsigned long long ino, |
| 1095 | long long i_size, unsigned int i_clusters, |
| 1096 | unsigned long long pos, unsigned int len, |
| 1097 | unsigned int flags, void *page, |
| 1098 | unsigned int clusters, unsigned int extents_to_split), |
| 1099 | TP_ARGS(ino, i_size, i_clusters, pos, len, flags, |
| 1100 | page, clusters, extents_to_split), |
| 1101 | TP_STRUCT__entry( |
| 1102 | __field(unsigned long long, ino) |
| 1103 | __field(long long, i_size) |
| 1104 | __field(unsigned int, i_clusters) |
| 1105 | __field(unsigned long long, pos) |
| 1106 | __field(unsigned int, len) |
| 1107 | __field(unsigned int, flags) |
| 1108 | __field(void *, page) |
| 1109 | __field(unsigned int, clusters) |
| 1110 | __field(unsigned int, extents_to_split) |
| 1111 | ), |
| 1112 | TP_fast_assign( |
| 1113 | __entry->ino = ino; |
| 1114 | __entry->i_size = i_size; |
| 1115 | __entry->i_clusters = i_clusters; |
| 1116 | __entry->pos = pos; |
| 1117 | __entry->len = len; |
| 1118 | __entry->flags = flags; |
| 1119 | __entry->page = page; |
| 1120 | __entry->clusters = clusters; |
| 1121 | __entry->extents_to_split = extents_to_split; |
| 1122 | ), |
| 1123 | TP_printk("%llu %lld %u %llu %u %u %p %u %u", |
| 1124 | __entry->ino, __entry->i_size, __entry->i_clusters, |
| 1125 | __entry->pos, __entry->len, |
| 1126 | __entry->flags, __entry->page, __entry->clusters, |
| 1127 | __entry->extents_to_split) |
| 1128 | ); |
| 1129 | |
| 1130 | TRACE_EVENT(ocfs2_write_end_inline, |
| 1131 | TP_PROTO(unsigned long long ino, |
| 1132 | unsigned long long pos, unsigned int copied, |
| 1133 | unsigned int id_count, unsigned int features), |
| 1134 | TP_ARGS(ino, pos, copied, id_count, features), |
| 1135 | TP_STRUCT__entry( |
| 1136 | __field(unsigned long long, ino) |
| 1137 | __field(unsigned long long, pos) |
| 1138 | __field(unsigned int, copied) |
| 1139 | __field(unsigned int, id_count) |
| 1140 | __field(unsigned int, features) |
| 1141 | ), |
| 1142 | TP_fast_assign( |
| 1143 | __entry->ino = ino; |
| 1144 | __entry->pos = pos; |
| 1145 | __entry->copied = copied; |
| 1146 | __entry->id_count = id_count; |
| 1147 | __entry->features = features; |
| 1148 | ), |
| 1149 | TP_printk("%llu %llu %u %u %u", |
| 1150 | __entry->ino, __entry->pos, __entry->copied, |
| 1151 | __entry->id_count, __entry->features) |
| 1152 | ); |
| 1153 | |
| 1154 | /* End of trace events for fs/ocfs2/aops.c. */ |
Tao Ma | 614a9e8 | 2011-02-22 21:59:46 +0800 | [diff] [blame] | 1155 | |
| 1156 | /* Trace events for fs/ocfs2/mmap.c. */ |
| 1157 | |
| 1158 | TRACE_EVENT(ocfs2_fault, |
| 1159 | TP_PROTO(unsigned long long ino, |
| 1160 | void *area, void *page, unsigned long pgoff), |
| 1161 | TP_ARGS(ino, area, page, pgoff), |
| 1162 | TP_STRUCT__entry( |
| 1163 | __field(unsigned long long, ino) |
| 1164 | __field(void *, area) |
| 1165 | __field(void *, page) |
| 1166 | __field(unsigned long, pgoff) |
| 1167 | ), |
| 1168 | TP_fast_assign( |
| 1169 | __entry->ino = ino; |
| 1170 | __entry->area = area; |
| 1171 | __entry->page = page; |
| 1172 | __entry->pgoff = pgoff; |
| 1173 | ), |
| 1174 | TP_printk("%llu %p %p %lu", |
| 1175 | __entry->ino, __entry->area, __entry->page, __entry->pgoff) |
| 1176 | ); |
| 1177 | |
| 1178 | /* End of trace events for fs/ocfs2/mmap.c. */ |
| 1179 | |
Tao Ma | 468eedd | 2011-02-22 22:14:41 +0800 | [diff] [blame] | 1180 | /* Trace events for fs/ocfs2/file.c. */ |
| 1181 | |
| 1182 | DECLARE_EVENT_CLASS(ocfs2__file_ops, |
| 1183 | TP_PROTO(void *inode, void *file, void *dentry, |
| 1184 | unsigned long long ino, |
| 1185 | unsigned int d_len, const unsigned char *d_name, |
| 1186 | unsigned long long para), |
| 1187 | TP_ARGS(inode, file, dentry, ino, d_len, d_name, para), |
| 1188 | TP_STRUCT__entry( |
| 1189 | __field(void *, inode) |
| 1190 | __field(void *, file) |
| 1191 | __field(void *, dentry) |
| 1192 | __field(unsigned long long, ino) |
| 1193 | __field(unsigned int, d_len) |
| 1194 | __string(d_name, d_name) |
| 1195 | __field(unsigned long long, para) |
| 1196 | ), |
| 1197 | TP_fast_assign( |
| 1198 | __entry->inode = inode; |
| 1199 | __entry->file = file; |
| 1200 | __entry->dentry = dentry; |
| 1201 | __entry->ino = ino; |
| 1202 | __entry->d_len = d_len; |
| 1203 | __assign_str(d_name, d_name); |
| 1204 | __entry->para = para; |
| 1205 | ), |
| 1206 | TP_printk("%p %p %p %llu %llu %.*s", __entry->inode, __entry->file, |
| 1207 | __entry->dentry, __entry->ino, __entry->para, |
| 1208 | __entry->d_len, __get_str(d_name)) |
| 1209 | ); |
| 1210 | |
| 1211 | #define DEFINE_OCFS2_FILE_OPS(name) \ |
| 1212 | DEFINE_EVENT(ocfs2__file_ops, name, \ |
| 1213 | TP_PROTO(void *inode, void *file, void *dentry, \ |
| 1214 | unsigned long long ino, \ |
| 1215 | unsigned int d_len, const unsigned char *d_name, \ |
| 1216 | unsigned long long mode), \ |
| 1217 | TP_ARGS(inode, file, dentry, ino, d_len, d_name, mode)) |
| 1218 | |
| 1219 | DEFINE_OCFS2_FILE_OPS(ocfs2_file_open); |
| 1220 | |
| 1221 | DEFINE_OCFS2_FILE_OPS(ocfs2_file_release); |
| 1222 | |
| 1223 | DEFINE_OCFS2_FILE_OPS(ocfs2_sync_file); |
| 1224 | |
| 1225 | DEFINE_OCFS2_FILE_OPS(ocfs2_file_aio_write); |
| 1226 | |
| 1227 | DEFINE_OCFS2_FILE_OPS(ocfs2_file_splice_write); |
| 1228 | |
| 1229 | DEFINE_OCFS2_FILE_OPS(ocfs2_file_splice_read); |
| 1230 | |
| 1231 | DEFINE_OCFS2_FILE_OPS(ocfs2_file_aio_read); |
| 1232 | |
| 1233 | DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_truncate_file); |
| 1234 | |
| 1235 | DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_truncate_file_error); |
| 1236 | |
| 1237 | TRACE_EVENT(ocfs2_extend_allocation, |
| 1238 | TP_PROTO(unsigned long long ip_blkno, unsigned long long size, |
| 1239 | unsigned int clusters, unsigned int clusters_to_add, |
| 1240 | int why, int restart_func), |
| 1241 | TP_ARGS(ip_blkno, size, clusters, clusters_to_add, why, restart_func), |
| 1242 | TP_STRUCT__entry( |
| 1243 | __field(unsigned long long, ip_blkno) |
| 1244 | __field(unsigned long long, size) |
| 1245 | __field(unsigned int, clusters) |
| 1246 | __field(unsigned int, clusters_to_add) |
| 1247 | __field(int, why) |
| 1248 | __field(int, restart_func) |
| 1249 | ), |
| 1250 | TP_fast_assign( |
| 1251 | __entry->ip_blkno = ip_blkno; |
| 1252 | __entry->size = size; |
| 1253 | __entry->clusters = clusters; |
| 1254 | __entry->clusters_to_add = clusters_to_add; |
| 1255 | __entry->why = why; |
| 1256 | __entry->restart_func = restart_func; |
| 1257 | ), |
| 1258 | TP_printk("%llu %llu %u %u %d %d", |
| 1259 | __entry->ip_blkno, __entry->size, __entry->clusters, |
| 1260 | __entry->clusters_to_add, __entry->why, __entry->restart_func) |
| 1261 | ); |
| 1262 | |
| 1263 | TRACE_EVENT(ocfs2_extend_allocation_end, |
| 1264 | TP_PROTO(unsigned long long ino, |
| 1265 | unsigned int di_clusters, unsigned long long di_size, |
| 1266 | unsigned int ip_clusters, unsigned long long i_size), |
| 1267 | TP_ARGS(ino, di_clusters, di_size, ip_clusters, i_size), |
| 1268 | TP_STRUCT__entry( |
| 1269 | __field(unsigned long long, ino) |
| 1270 | __field(unsigned int, di_clusters) |
| 1271 | __field(unsigned long long, di_size) |
| 1272 | __field(unsigned int, ip_clusters) |
| 1273 | __field(unsigned long long, i_size) |
| 1274 | ), |
| 1275 | TP_fast_assign( |
| 1276 | __entry->ino = ino; |
| 1277 | __entry->di_clusters = di_clusters; |
| 1278 | __entry->di_size = di_size; |
| 1279 | __entry->ip_clusters = ip_clusters; |
| 1280 | __entry->i_size = i_size; |
| 1281 | ), |
| 1282 | TP_printk("%llu %u %llu %u %llu", __entry->ino, __entry->di_clusters, |
| 1283 | __entry->di_size, __entry->ip_clusters, __entry->i_size) |
| 1284 | ); |
| 1285 | |
| 1286 | TRACE_EVENT(ocfs2_write_zero_page, |
| 1287 | TP_PROTO(unsigned long long ino, |
| 1288 | unsigned long long abs_from, unsigned long long abs_to, |
| 1289 | unsigned long index, unsigned int zero_from, |
| 1290 | unsigned int zero_to), |
| 1291 | TP_ARGS(ino, abs_from, abs_to, index, zero_from, zero_to), |
| 1292 | TP_STRUCT__entry( |
| 1293 | __field(unsigned long long, ino) |
| 1294 | __field(unsigned long long, abs_from) |
| 1295 | __field(unsigned long long, abs_to) |
| 1296 | __field(unsigned long, index) |
| 1297 | __field(unsigned int, zero_from) |
| 1298 | __field(unsigned int, zero_to) |
| 1299 | ), |
| 1300 | TP_fast_assign( |
| 1301 | __entry->ino = ino; |
| 1302 | __entry->abs_from = abs_from; |
| 1303 | __entry->abs_to = abs_to; |
| 1304 | __entry->index = index; |
| 1305 | __entry->zero_from = zero_from; |
| 1306 | __entry->zero_to = zero_to; |
| 1307 | ), |
| 1308 | TP_printk("%llu %llu %llu %lu %u %u", __entry->ino, |
| 1309 | __entry->abs_from, __entry->abs_to, |
| 1310 | __entry->index, __entry->zero_from, __entry->zero_to) |
| 1311 | ); |
| 1312 | |
| 1313 | DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_zero_extend_range); |
| 1314 | |
| 1315 | DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_zero_extend); |
| 1316 | |
| 1317 | TRACE_EVENT(ocfs2_setattr, |
| 1318 | TP_PROTO(void *inode, void *dentry, |
| 1319 | unsigned long long ino, |
| 1320 | unsigned int d_len, const unsigned char *d_name, |
| 1321 | unsigned int ia_valid, unsigned int ia_mode, |
| 1322 | unsigned int ia_uid, unsigned int ia_gid), |
| 1323 | TP_ARGS(inode, dentry, ino, d_len, d_name, |
| 1324 | ia_valid, ia_mode, ia_uid, ia_gid), |
| 1325 | TP_STRUCT__entry( |
| 1326 | __field(void *, inode) |
| 1327 | __field(void *, dentry) |
| 1328 | __field(unsigned long long, ino) |
| 1329 | __field(unsigned int, d_len) |
| 1330 | __string(d_name, d_name) |
| 1331 | __field(unsigned int, ia_valid) |
| 1332 | __field(unsigned int, ia_mode) |
| 1333 | __field(unsigned int, ia_uid) |
| 1334 | __field(unsigned int, ia_gid) |
| 1335 | ), |
| 1336 | TP_fast_assign( |
| 1337 | __entry->inode = inode; |
| 1338 | __entry->dentry = dentry; |
| 1339 | __entry->ino = ino; |
| 1340 | __entry->d_len = d_len; |
| 1341 | __assign_str(d_name, d_name); |
| 1342 | __entry->ia_valid = ia_valid; |
| 1343 | __entry->ia_mode = ia_mode; |
| 1344 | __entry->ia_uid = ia_uid; |
| 1345 | __entry->ia_gid = ia_gid; |
| 1346 | ), |
| 1347 | TP_printk("%p %p %llu %.*s %u %u %u %u", __entry->inode, |
| 1348 | __entry->dentry, __entry->ino, __entry->d_len, |
| 1349 | __get_str(d_name), __entry->ia_valid, __entry->ia_mode, |
| 1350 | __entry->ia_uid, __entry->ia_gid) |
| 1351 | ); |
| 1352 | |
| 1353 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_write_remove_suid); |
| 1354 | |
| 1355 | DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_zero_partial_clusters); |
| 1356 | |
| 1357 | DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_zero_partial_clusters_range1); |
| 1358 | |
| 1359 | DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_zero_partial_clusters_range2); |
| 1360 | |
| 1361 | DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_remove_inode_range); |
| 1362 | |
| 1363 | TRACE_EVENT(ocfs2_prepare_inode_for_write, |
| 1364 | TP_PROTO(unsigned long long ino, unsigned long long saved_pos, |
| 1365 | int appending, unsigned long count, |
| 1366 | int *direct_io, int *has_refcount), |
| 1367 | TP_ARGS(ino, saved_pos, appending, count, direct_io, has_refcount), |
| 1368 | TP_STRUCT__entry( |
| 1369 | __field(unsigned long long, ino) |
| 1370 | __field(unsigned long long, saved_pos) |
| 1371 | __field(int, appending) |
| 1372 | __field(unsigned long, count) |
| 1373 | __field(int, direct_io) |
| 1374 | __field(int, has_refcount) |
| 1375 | ), |
| 1376 | TP_fast_assign( |
| 1377 | __entry->ino = ino; |
| 1378 | __entry->saved_pos = saved_pos; |
| 1379 | __entry->appending = appending; |
| 1380 | __entry->count = count; |
| 1381 | __entry->direct_io = direct_io ? *direct_io : -1; |
| 1382 | __entry->has_refcount = has_refcount ? *has_refcount : -1; |
| 1383 | ), |
| 1384 | TP_printk("%llu %llu %d %lu %d %d", __entry->ino, |
| 1385 | __entry->saved_pos, __entry->appending, __entry->count, |
| 1386 | __entry->direct_io, __entry->has_refcount) |
| 1387 | ); |
| 1388 | |
| 1389 | DEFINE_OCFS2_INT_EVENT(generic_file_aio_read_ret); |
| 1390 | |
| 1391 | /* End of trace events for fs/ocfs2/file.c. */ |
| 1392 | |
Tao Ma | 64f3b26 | 2011-02-22 22:24:57 +0800 | [diff] [blame] | 1393 | /* Trace events for fs/ocfs2/inode.c. */ |
| 1394 | |
| 1395 | TRACE_EVENT(ocfs2_iget_begin, |
| 1396 | TP_PROTO(unsigned long long ino, unsigned int flags, int sysfile_type), |
| 1397 | TP_ARGS(ino, flags, sysfile_type), |
| 1398 | TP_STRUCT__entry( |
| 1399 | __field(unsigned long long, ino) |
| 1400 | __field(unsigned int, flags) |
| 1401 | __field(int, sysfile_type) |
| 1402 | ), |
| 1403 | TP_fast_assign( |
| 1404 | __entry->ino = ino; |
| 1405 | __entry->flags = flags; |
| 1406 | __entry->sysfile_type = sysfile_type; |
| 1407 | ), |
| 1408 | TP_printk("%llu %u %d", __entry->ino, |
| 1409 | __entry->flags, __entry->sysfile_type) |
| 1410 | ); |
| 1411 | |
| 1412 | DEFINE_OCFS2_ULL_EVENT(ocfs2_iget5_locked); |
| 1413 | |
| 1414 | TRACE_EVENT(ocfs2_iget_end, |
| 1415 | TP_PROTO(void *inode, unsigned long long ino), |
| 1416 | TP_ARGS(inode, ino), |
| 1417 | TP_STRUCT__entry( |
| 1418 | __field(void *, inode) |
| 1419 | __field(unsigned long long, ino) |
| 1420 | ), |
| 1421 | TP_fast_assign( |
| 1422 | __entry->inode = inode; |
| 1423 | __entry->ino = ino; |
| 1424 | ), |
| 1425 | TP_printk("%p %llu", __entry->inode, __entry->ino) |
| 1426 | ); |
| 1427 | |
| 1428 | TRACE_EVENT(ocfs2_find_actor, |
| 1429 | TP_PROTO(void *inode, unsigned long long ino, |
| 1430 | void *args, unsigned long long fi_blkno), |
| 1431 | TP_ARGS(inode, ino, args, fi_blkno), |
| 1432 | TP_STRUCT__entry( |
| 1433 | __field(void *, inode) |
| 1434 | __field(unsigned long long, ino) |
| 1435 | __field(void *, args) |
| 1436 | __field(unsigned long long, fi_blkno) |
| 1437 | ), |
| 1438 | TP_fast_assign( |
| 1439 | __entry->inode = inode; |
| 1440 | __entry->ino = ino; |
| 1441 | __entry->args = args; |
| 1442 | __entry->fi_blkno = fi_blkno; |
| 1443 | ), |
| 1444 | TP_printk("%p %llu %p %llu", __entry->inode, __entry->ino, |
| 1445 | __entry->args, __entry->fi_blkno) |
| 1446 | ); |
| 1447 | |
| 1448 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_populate_inode); |
| 1449 | |
| 1450 | DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_read_locked_inode); |
| 1451 | |
| 1452 | DEFINE_OCFS2_INT_INT_EVENT(ocfs2_check_orphan_recovery_state); |
| 1453 | |
| 1454 | DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_inode_block); |
| 1455 | |
| 1456 | TRACE_EVENT(ocfs2_inode_is_valid_to_delete, |
| 1457 | TP_PROTO(void *task, void *dc_task, unsigned long long ino, |
| 1458 | unsigned int flags), |
| 1459 | TP_ARGS(task, dc_task, ino, flags), |
| 1460 | TP_STRUCT__entry( |
| 1461 | __field(void *, task) |
| 1462 | __field(void *, dc_task) |
| 1463 | __field(unsigned long long, ino) |
| 1464 | __field(unsigned int, flags) |
| 1465 | ), |
| 1466 | TP_fast_assign( |
| 1467 | __entry->task = task; |
| 1468 | __entry->dc_task = dc_task; |
| 1469 | __entry->ino = ino; |
| 1470 | __entry->flags = flags; |
| 1471 | ), |
| 1472 | TP_printk("%p %p %llu %u", __entry->task, __entry->dc_task, |
| 1473 | __entry->ino, __entry->flags) |
| 1474 | ); |
| 1475 | |
| 1476 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_query_inode_wipe_begin); |
| 1477 | |
| 1478 | DEFINE_OCFS2_UINT_EVENT(ocfs2_query_inode_wipe_succ); |
| 1479 | |
| 1480 | DEFINE_OCFS2_INT_INT_EVENT(ocfs2_query_inode_wipe_end); |
| 1481 | |
| 1482 | DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_cleanup_delete_inode); |
| 1483 | |
| 1484 | DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_delete_inode); |
| 1485 | |
| 1486 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_clear_inode); |
| 1487 | |
| 1488 | DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_drop_inode); |
| 1489 | |
| 1490 | TRACE_EVENT(ocfs2_inode_revalidate, |
| 1491 | TP_PROTO(void *inode, unsigned long long ino, |
| 1492 | unsigned int flags), |
| 1493 | TP_ARGS(inode, ino, flags), |
| 1494 | TP_STRUCT__entry( |
| 1495 | __field(void *, inode) |
| 1496 | __field(unsigned long long, ino) |
| 1497 | __field(unsigned int, flags) |
| 1498 | ), |
| 1499 | TP_fast_assign( |
| 1500 | __entry->inode = inode; |
| 1501 | __entry->ino = ino; |
| 1502 | __entry->flags = flags; |
| 1503 | ), |
| 1504 | TP_printk("%p %llu %u", __entry->inode, __entry->ino, __entry->flags) |
| 1505 | ); |
| 1506 | |
| 1507 | DEFINE_OCFS2_ULL_EVENT(ocfs2_mark_inode_dirty); |
| 1508 | |
| 1509 | /* End of trace events for fs/ocfs2/inode.c. */ |
Tao Ma | a716357 | 2011-02-22 22:27:33 +0800 | [diff] [blame] | 1510 | |
| 1511 | /* Trace events for fs/ocfs2/extent_map.c. */ |
| 1512 | |
| 1513 | TRACE_EVENT(ocfs2_read_virt_blocks, |
| 1514 | TP_PROTO(void *inode, unsigned long long vblock, int nr, |
| 1515 | void *bhs, unsigned int flags, void *validate), |
| 1516 | TP_ARGS(inode, vblock, nr, bhs, flags, validate), |
| 1517 | TP_STRUCT__entry( |
| 1518 | __field(void *, inode) |
| 1519 | __field(unsigned long long, vblock) |
| 1520 | __field(int, nr) |
| 1521 | __field(void *, bhs) |
| 1522 | __field(unsigned int, flags) |
| 1523 | __field(void *, validate) |
| 1524 | ), |
| 1525 | TP_fast_assign( |
| 1526 | __entry->inode = inode; |
| 1527 | __entry->vblock = vblock; |
| 1528 | __entry->nr = nr; |
| 1529 | __entry->bhs = bhs; |
| 1530 | __entry->flags = flags; |
| 1531 | __entry->validate = validate; |
| 1532 | ), |
| 1533 | TP_printk("%p %llu %d %p %x %p", __entry->inode, __entry->vblock, |
| 1534 | __entry->nr, __entry->bhs, __entry->flags, __entry->validate) |
| 1535 | ); |
| 1536 | |
| 1537 | /* End of trace events for fs/ocfs2/extent_map.c. */ |
| 1538 | |
Tao Ma | a873108 | 2011-02-22 22:29:08 +0800 | [diff] [blame] | 1539 | /* Trace events for fs/ocfs2/slot_map.c. */ |
| 1540 | |
| 1541 | DEFINE_OCFS2_UINT_EVENT(ocfs2_refresh_slot_info); |
| 1542 | |
| 1543 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_map_slot_buffers); |
| 1544 | |
| 1545 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_map_slot_buffers_block); |
| 1546 | |
| 1547 | DEFINE_OCFS2_INT_EVENT(ocfs2_find_slot); |
| 1548 | |
| 1549 | /* End of trace events for fs/ocfs2/slot_map.c. */ |
Tao Ma | b5770f9 | 2011-02-23 21:17:39 +0800 | [diff] [blame] | 1550 | |
| 1551 | /* Trace events for fs/ocfs2/heartbeat.c. */ |
| 1552 | |
| 1553 | DEFINE_OCFS2_INT_EVENT(ocfs2_do_node_down); |
| 1554 | |
| 1555 | /* End of trace events for fs/ocfs2/heartbeat.c. */ |
| 1556 | |
Tao Ma | 32a42d3 | 2011-02-23 21:29:08 +0800 | [diff] [blame^] | 1557 | /* Trace events for fs/ocfs2/super.c. */ |
| 1558 | |
| 1559 | TRACE_EVENT(ocfs2_remount, |
| 1560 | TP_PROTO(unsigned long s_flags, unsigned long osb_flags, int flags), |
| 1561 | TP_ARGS(s_flags, osb_flags, flags), |
| 1562 | TP_STRUCT__entry( |
| 1563 | __field(unsigned long, s_flags) |
| 1564 | __field(unsigned long, osb_flags) |
| 1565 | __field(int, flags) |
| 1566 | ), |
| 1567 | TP_fast_assign( |
| 1568 | __entry->s_flags = s_flags; |
| 1569 | __entry->osb_flags = osb_flags; |
| 1570 | __entry->flags = flags; |
| 1571 | ), |
| 1572 | TP_printk("%lu %lu %d", __entry->s_flags, |
| 1573 | __entry->osb_flags, __entry->flags) |
| 1574 | ); |
| 1575 | |
| 1576 | TRACE_EVENT(ocfs2_fill_super, |
| 1577 | TP_PROTO(void *sb, void *data, int silent), |
| 1578 | TP_ARGS(sb, data, silent), |
| 1579 | TP_STRUCT__entry( |
| 1580 | __field(void *, sb) |
| 1581 | __field(void *, data) |
| 1582 | __field(int, silent) |
| 1583 | ), |
| 1584 | TP_fast_assign( |
| 1585 | __entry->sb = sb; |
| 1586 | __entry->data = data; |
| 1587 | __entry->silent = silent; |
| 1588 | ), |
| 1589 | TP_printk("%p %p %d", __entry->sb, |
| 1590 | __entry->data, __entry->silent) |
| 1591 | ); |
| 1592 | |
| 1593 | TRACE_EVENT(ocfs2_parse_options, |
| 1594 | TP_PROTO(int is_remount, char *options), |
| 1595 | TP_ARGS(is_remount, options), |
| 1596 | TP_STRUCT__entry( |
| 1597 | __field(int, is_remount) |
| 1598 | __string(options, options) |
| 1599 | ), |
| 1600 | TP_fast_assign( |
| 1601 | __entry->is_remount = is_remount; |
| 1602 | __assign_str(options, options); |
| 1603 | ), |
| 1604 | TP_printk("%d %s", __entry->is_remount, __get_str(options)) |
| 1605 | ); |
| 1606 | |
| 1607 | DEFINE_OCFS2_POINTER_EVENT(ocfs2_put_super); |
| 1608 | |
| 1609 | TRACE_EVENT(ocfs2_statfs, |
| 1610 | TP_PROTO(void *sb, void *buf), |
| 1611 | TP_ARGS(sb, buf), |
| 1612 | TP_STRUCT__entry( |
| 1613 | __field(void *, sb) |
| 1614 | __field(void *, buf) |
| 1615 | ), |
| 1616 | TP_fast_assign( |
| 1617 | __entry->sb = sb; |
| 1618 | __entry->buf = buf; |
| 1619 | ), |
| 1620 | TP_printk("%p %p", __entry->sb, __entry->buf) |
| 1621 | ); |
| 1622 | |
| 1623 | DEFINE_OCFS2_POINTER_EVENT(ocfs2_dismount_volume); |
| 1624 | |
| 1625 | TRACE_EVENT(ocfs2_initialize_super, |
| 1626 | TP_PROTO(char *label, char *uuid_str, unsigned long long root_dir, |
| 1627 | unsigned long long system_dir, int cluster_bits), |
| 1628 | TP_ARGS(label, uuid_str, root_dir, system_dir, cluster_bits), |
| 1629 | TP_STRUCT__entry( |
| 1630 | __string(label, label) |
| 1631 | __string(uuid_str, uuid_str) |
| 1632 | __field(unsigned long long, root_dir) |
| 1633 | __field(unsigned long long, system_dir) |
| 1634 | __field(int, cluster_bits) |
| 1635 | ), |
| 1636 | TP_fast_assign( |
| 1637 | __assign_str(label, label); |
| 1638 | __assign_str(uuid_str, uuid_str); |
| 1639 | __entry->root_dir = root_dir; |
| 1640 | __entry->system_dir = system_dir; |
| 1641 | __entry->cluster_bits = cluster_bits; |
| 1642 | ), |
| 1643 | TP_printk("%s %s %llu %llu %d", __get_str(label), __get_str(uuid_str), |
| 1644 | __entry->root_dir, __entry->system_dir, __entry->cluster_bits) |
| 1645 | ); |
| 1646 | |
| 1647 | /* End of trace events for fs/ocfs2/super.c. */ |
Wengang Wang | 80a9a84 | 2011-02-21 11:13:14 +0800 | [diff] [blame] | 1648 | #endif /* _TRACE_OCFS2_H */ |
| 1649 | |
| 1650 | /* This part must be outside protection */ |
| 1651 | #undef TRACE_INCLUDE_PATH |
| 1652 | #define TRACE_INCLUDE_PATH . |
| 1653 | #define TRACE_INCLUDE_FILE ocfs2_trace |
| 1654 | #include <trace/define_trace.h> |