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 | a09d09b | 2011-02-22 08:21:10 +0800 | [diff] [blame] | 60 | DECLARE_EVENT_CLASS(ocfs2__int_int, |
| 61 | TP_PROTO(int value1, int value2), |
| 62 | TP_ARGS(value1, value2), |
| 63 | TP_STRUCT__entry( |
| 64 | __field(int, value1) |
| 65 | __field(int, value2) |
| 66 | ), |
| 67 | TP_fast_assign( |
| 68 | __entry->value1 = value1; |
| 69 | __entry->value2 = value2; |
| 70 | ), |
| 71 | TP_printk("%d %d", __entry->value1, __entry->value2) |
| 72 | ); |
| 73 | |
| 74 | #define DEFINE_OCFS2_INT_INT_EVENT(name) \ |
| 75 | DEFINE_EVENT(ocfs2__int_int, name, \ |
| 76 | TP_PROTO(int val1, int val2), \ |
| 77 | TP_ARGS(val1, val2)) |
| 78 | |
Tao Ma | 2f73e13 | 2011-02-22 08:22:33 +0800 | [diff] [blame^] | 79 | DECLARE_EVENT_CLASS(ocfs2__uint_uint, |
| 80 | TP_PROTO(unsigned int value1, unsigned int value2), |
| 81 | TP_ARGS(value1, value2), |
| 82 | TP_STRUCT__entry( |
| 83 | __field(unsigned int, value1) |
| 84 | __field(unsigned int, value2) |
| 85 | ), |
| 86 | TP_fast_assign( |
| 87 | __entry->value1 = value1; |
| 88 | __entry->value2 = value2; |
| 89 | ), |
| 90 | TP_printk("%u %u", __entry->value1, __entry->value2) |
| 91 | ); |
| 92 | |
| 93 | #define DEFINE_OCFS2_UINT_UINT_EVENT(name) \ |
| 94 | DEFINE_EVENT(ocfs2__uint_uint, name, \ |
| 95 | TP_PROTO(unsigned int val1, unsigned int val2), \ |
| 96 | TP_ARGS(val1, val2)) |
| 97 | |
Tao Ma | a09d09b | 2011-02-22 08:21:10 +0800 | [diff] [blame] | 98 | DECLARE_EVENT_CLASS(ocfs2__ull_uint, |
| 99 | TP_PROTO(unsigned long long value1, unsigned int value2), |
| 100 | TP_ARGS(value1, value2), |
| 101 | TP_STRUCT__entry( |
| 102 | __field(unsigned long long, value1) |
| 103 | __field(unsigned int, value2) |
| 104 | ), |
| 105 | TP_fast_assign( |
| 106 | __entry->value1 = value1; |
| 107 | __entry->value2 = value2; |
| 108 | ), |
| 109 | TP_printk("%llu %u", __entry->value1, __entry->value2) |
| 110 | ); |
| 111 | |
| 112 | #define DEFINE_OCFS2_ULL_UINT_EVENT(name) \ |
| 113 | DEFINE_EVENT(ocfs2__ull_uint, name, \ |
| 114 | TP_PROTO(unsigned long long val1, unsigned int val2), \ |
| 115 | TP_ARGS(val1, val2)) |
| 116 | |
Tao Ma | 2f73e13 | 2011-02-22 08:22:33 +0800 | [diff] [blame^] | 117 | DECLARE_EVENT_CLASS(ocfs2__ull_ull, |
| 118 | TP_PROTO(unsigned long long value1, unsigned long long value2), |
| 119 | TP_ARGS(value1, value2), |
| 120 | TP_STRUCT__entry( |
| 121 | __field(unsigned long long, value1) |
| 122 | __field(unsigned long long, value2) |
| 123 | ), |
| 124 | TP_fast_assign( |
| 125 | __entry->value1 = value1; |
| 126 | __entry->value2 = value2; |
| 127 | ), |
| 128 | TP_printk("%llu %llu", __entry->value1, __entry->value2) |
| 129 | ); |
| 130 | |
| 131 | #define DEFINE_OCFS2_ULL_ULL_EVENT(name) \ |
| 132 | DEFINE_EVENT(ocfs2__ull_ull, name, \ |
| 133 | TP_PROTO(unsigned long long val1, unsigned long long val2), \ |
| 134 | TP_ARGS(val1, val2)) |
| 135 | |
| 136 | DECLARE_EVENT_CLASS(ocfs2__ull_uint_uint, |
| 137 | TP_PROTO(unsigned long long value1, |
| 138 | unsigned int value2, unsigned int value3), |
| 139 | TP_ARGS(value1, value2, value3), |
| 140 | TP_STRUCT__entry( |
| 141 | __field(unsigned long long, value1) |
| 142 | __field(unsigned int, value2) |
| 143 | __field(unsigned int, value3) |
| 144 | ), |
| 145 | TP_fast_assign( |
| 146 | __entry->value1 = value1; |
| 147 | __entry->value2 = value2; |
| 148 | __entry->value3 = value3; |
| 149 | ), |
| 150 | TP_printk("%llu %u %u", __entry->value1, |
| 151 | __entry->value2, __entry->value3) |
| 152 | ); |
| 153 | |
| 154 | #define DEFINE_OCFS2_ULL_UINT_UINT_EVENT(name) \ |
| 155 | DEFINE_EVENT(ocfs2__ull_uint_uint, name, \ |
| 156 | TP_PROTO(unsigned long long val1, \ |
| 157 | unsigned int val2, unsigned int val3), \ |
| 158 | TP_ARGS(val1, val2, val3)) |
| 159 | |
Tao Ma | a04733d | 2011-02-22 07:56:45 +0800 | [diff] [blame] | 160 | DECLARE_EVENT_CLASS(ocfs2__uint_uint_uint, |
| 161 | TP_PROTO(unsigned int value1, unsigned int value2, |
| 162 | unsigned int value3), |
| 163 | TP_ARGS(value1, value2, value3), |
| 164 | TP_STRUCT__entry( |
| 165 | __field( unsigned int, value1 ) |
| 166 | __field( unsigned int, value2 ) |
| 167 | __field( unsigned int, value3 ) |
| 168 | ), |
| 169 | TP_fast_assign( |
| 170 | __entry->value1 = value1; |
| 171 | __entry->value2 = value2; |
| 172 | __entry->value3 = value3; |
| 173 | ), |
| 174 | TP_printk("%u %u %u", __entry->value1, __entry->value2, __entry->value3) |
| 175 | ); |
| 176 | |
| 177 | #define DEFINE_OCFS2_UINT_UINT_UINT_EVENT(name) \ |
| 178 | DEFINE_EVENT(ocfs2__uint_uint_uint, name, \ |
| 179 | TP_PROTO(unsigned int value1, unsigned int value2, \ |
| 180 | unsigned int value3), \ |
| 181 | TP_ARGS(value1, value2, value3)) |
| 182 | |
| 183 | DECLARE_EVENT_CLASS(ocfs2__ull_int_int_int, |
| 184 | TP_PROTO(unsigned long long ull, int value1, int value2, int value3), |
| 185 | TP_ARGS(ull, value1, value2, value3), |
| 186 | TP_STRUCT__entry( |
| 187 | __field( unsigned long long, ull ) |
| 188 | __field( int, value1 ) |
| 189 | __field( int, value2 ) |
| 190 | __field( int, value3 ) |
| 191 | ), |
| 192 | TP_fast_assign( |
| 193 | __entry->ull = ull; |
| 194 | __entry->value1 = value1; |
| 195 | __entry->value2 = value2; |
| 196 | __entry->value3 = value3; |
| 197 | ), |
| 198 | TP_printk("%llu %d %d %d", |
| 199 | __entry->ull, __entry->value1, |
| 200 | __entry->value2, __entry->value3) |
| 201 | ); |
| 202 | |
| 203 | #define DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(name) \ |
| 204 | DEFINE_EVENT(ocfs2__ull_int_int_int, name, \ |
| 205 | TP_PROTO(unsigned long long ull, int value1, \ |
| 206 | int value2, int value3), \ |
| 207 | TP_ARGS(ull, value1, value2, value3)) |
| 208 | |
Tao Ma | 2f73e13 | 2011-02-22 08:22:33 +0800 | [diff] [blame^] | 209 | DECLARE_EVENT_CLASS(ocfs2__ull_uint_uint_uint, |
| 210 | TP_PROTO(unsigned long long ull, unsigned int value1, |
| 211 | unsigned int value2, unsigned int value3), |
| 212 | TP_ARGS(ull, value1, value2, value3), |
| 213 | TP_STRUCT__entry( |
| 214 | __field(unsigned long long, ull) |
| 215 | __field(unsigned int, value1) |
| 216 | __field(unsigned int, value2) |
| 217 | __field(unsigned int, value3) |
| 218 | ), |
| 219 | TP_fast_assign( |
| 220 | __entry->ull = ull; |
| 221 | __entry->value1 = value1; |
| 222 | __entry->value2 = value2; |
| 223 | __entry->value3 = value3; |
| 224 | ), |
| 225 | TP_printk("%llu %u %u %u", |
| 226 | __entry->ull, __entry->value1, |
| 227 | __entry->value2, __entry->value3) |
| 228 | ); |
| 229 | |
| 230 | #define DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(name) \ |
| 231 | DEFINE_EVENT(ocfs2__ull_uint_uint_uint, name, \ |
| 232 | TP_PROTO(unsigned long long ull, unsigned int value1, \ |
| 233 | unsigned int value2, unsigned int value3), \ |
| 234 | TP_ARGS(ull, value1, value2, value3)) |
| 235 | |
Tao Ma | a09d09b | 2011-02-22 08:21:10 +0800 | [diff] [blame] | 236 | /* Trace events for fs/ocfs2/alloc.c. */ |
| 237 | DECLARE_EVENT_CLASS(ocfs2__btree_ops, |
| 238 | TP_PROTO(unsigned long long owner,\ |
| 239 | unsigned int value1, unsigned int value2), |
| 240 | TP_ARGS(owner, value1, value2), |
| 241 | TP_STRUCT__entry( |
| 242 | __field(unsigned long long, owner) |
| 243 | __field(unsigned int, value1) |
| 244 | __field(unsigned int, value2) |
| 245 | ), |
| 246 | TP_fast_assign( |
| 247 | __entry->owner = owner; |
| 248 | __entry->value1 = value1; |
| 249 | __entry->value2 = value2; |
| 250 | ), |
| 251 | TP_printk("%llu %u %u", |
| 252 | __entry->owner, __entry->value1, __entry->value2) |
| 253 | ); |
| 254 | |
| 255 | #define DEFINE_OCFS2_BTREE_EVENT(name) \ |
| 256 | DEFINE_EVENT(ocfs2__btree_ops, name, \ |
| 257 | TP_PROTO(unsigned long long owner, \ |
| 258 | unsigned int value1, unsigned int value2), \ |
| 259 | TP_ARGS(owner, value1, value2)) |
| 260 | |
| 261 | DEFINE_OCFS2_BTREE_EVENT(ocfs2_adjust_rightmost_branch); |
| 262 | |
| 263 | DEFINE_OCFS2_BTREE_EVENT(ocfs2_rotate_tree_right); |
| 264 | |
| 265 | DEFINE_OCFS2_BTREE_EVENT(ocfs2_append_rec_to_path); |
| 266 | |
| 267 | DEFINE_OCFS2_BTREE_EVENT(ocfs2_insert_extent_start); |
| 268 | |
| 269 | DEFINE_OCFS2_BTREE_EVENT(ocfs2_add_clusters_in_btree); |
| 270 | |
| 271 | DEFINE_OCFS2_INT_EVENT(ocfs2_num_free_extents); |
| 272 | |
| 273 | DEFINE_OCFS2_INT_EVENT(ocfs2_complete_edge_insert); |
| 274 | |
| 275 | TRACE_EVENT(ocfs2_grow_tree, |
| 276 | TP_PROTO(unsigned long long owner, int depth), |
| 277 | TP_ARGS(owner, depth), |
| 278 | TP_STRUCT__entry( |
| 279 | __field(unsigned long long, owner) |
| 280 | __field(int, depth) |
| 281 | ), |
| 282 | TP_fast_assign( |
| 283 | __entry->owner = owner; |
| 284 | __entry->depth = depth; |
| 285 | ), |
| 286 | TP_printk("%llu %d", __entry->owner, __entry->depth) |
| 287 | ); |
| 288 | |
| 289 | TRACE_EVENT(ocfs2_rotate_subtree, |
| 290 | TP_PROTO(int subtree_root, unsigned long long blkno, |
| 291 | int depth), |
| 292 | TP_ARGS(subtree_root, blkno, depth), |
| 293 | TP_STRUCT__entry( |
| 294 | __field(int, subtree_root) |
| 295 | __field(unsigned long long, blkno) |
| 296 | __field(int, depth) |
| 297 | ), |
| 298 | TP_fast_assign( |
| 299 | __entry->subtree_root = subtree_root; |
| 300 | __entry->blkno = blkno; |
| 301 | __entry->depth = depth; |
| 302 | ), |
| 303 | TP_printk("%d %llu %d", __entry->subtree_root, |
| 304 | __entry->blkno, __entry->depth) |
| 305 | ); |
| 306 | |
| 307 | TRACE_EVENT(ocfs2_insert_extent, |
| 308 | TP_PROTO(unsigned int ins_appending, unsigned int ins_contig, |
| 309 | int ins_contig_index, int free_records, int ins_tree_depth), |
| 310 | TP_ARGS(ins_appending, ins_contig, ins_contig_index, free_records, |
| 311 | ins_tree_depth), |
| 312 | TP_STRUCT__entry( |
| 313 | __field(unsigned int, ins_appending) |
| 314 | __field(unsigned int, ins_contig) |
| 315 | __field(int, ins_contig_index) |
| 316 | __field(int, free_records) |
| 317 | __field(int, ins_tree_depth) |
| 318 | ), |
| 319 | TP_fast_assign( |
| 320 | __entry->ins_appending = ins_appending; |
| 321 | __entry->ins_contig = ins_contig; |
| 322 | __entry->ins_contig_index = ins_contig_index; |
| 323 | __entry->free_records = free_records; |
| 324 | __entry->ins_tree_depth = ins_tree_depth; |
| 325 | ), |
| 326 | TP_printk("%u %u %d %d %d", |
| 327 | __entry->ins_appending, __entry->ins_contig, |
| 328 | __entry->ins_contig_index, __entry->free_records, |
| 329 | __entry->ins_tree_depth) |
| 330 | ); |
| 331 | |
| 332 | TRACE_EVENT(ocfs2_split_extent, |
| 333 | TP_PROTO(int split_index, unsigned int c_contig_type, |
| 334 | unsigned int c_has_empty_extent, |
| 335 | unsigned int c_split_covers_rec), |
| 336 | TP_ARGS(split_index, c_contig_type, |
| 337 | c_has_empty_extent, c_split_covers_rec), |
| 338 | TP_STRUCT__entry( |
| 339 | __field(int, split_index) |
| 340 | __field(unsigned int, c_contig_type) |
| 341 | __field(unsigned int, c_has_empty_extent) |
| 342 | __field(unsigned int, c_split_covers_rec) |
| 343 | ), |
| 344 | TP_fast_assign( |
| 345 | __entry->split_index = split_index; |
| 346 | __entry->c_contig_type = c_contig_type; |
| 347 | __entry->c_has_empty_extent = c_has_empty_extent; |
| 348 | __entry->c_split_covers_rec = c_split_covers_rec; |
| 349 | ), |
| 350 | TP_printk("%d %u %u %u", __entry->split_index, __entry->c_contig_type, |
| 351 | __entry->c_has_empty_extent, __entry->c_split_covers_rec) |
| 352 | ); |
| 353 | |
| 354 | TRACE_EVENT(ocfs2_remove_extent, |
| 355 | TP_PROTO(unsigned long long owner, unsigned int cpos, |
| 356 | unsigned int len, int index, |
| 357 | unsigned int e_cpos, unsigned int clusters), |
| 358 | TP_ARGS(owner, cpos, len, index, e_cpos, clusters), |
| 359 | TP_STRUCT__entry( |
| 360 | __field(unsigned long long, owner) |
| 361 | __field(unsigned int, cpos) |
| 362 | __field(unsigned int, len) |
| 363 | __field(int, index) |
| 364 | __field(unsigned int, e_cpos) |
| 365 | __field(unsigned int, clusters) |
| 366 | ), |
| 367 | TP_fast_assign( |
| 368 | __entry->owner = owner; |
| 369 | __entry->cpos = cpos; |
| 370 | __entry->len = len; |
| 371 | __entry->index = index; |
| 372 | __entry->e_cpos = e_cpos; |
| 373 | __entry->clusters = clusters; |
| 374 | ), |
| 375 | TP_printk("%llu %u %u %d %u %u", |
| 376 | __entry->owner, __entry->cpos, __entry->len, __entry->index, |
| 377 | __entry->e_cpos, __entry->clusters) |
| 378 | ); |
| 379 | |
| 380 | TRACE_EVENT(ocfs2_commit_truncate, |
| 381 | TP_PROTO(unsigned long long ino, unsigned int new_cpos, |
| 382 | unsigned int clusters, unsigned int depth), |
| 383 | TP_ARGS(ino, new_cpos, clusters, depth), |
| 384 | TP_STRUCT__entry( |
| 385 | __field(unsigned long long, ino) |
| 386 | __field(unsigned int, new_cpos) |
| 387 | __field(unsigned int, clusters) |
| 388 | __field(unsigned int, depth) |
| 389 | ), |
| 390 | TP_fast_assign( |
| 391 | __entry->ino = ino; |
| 392 | __entry->new_cpos = new_cpos; |
| 393 | __entry->clusters = clusters; |
| 394 | __entry->depth = depth; |
| 395 | ), |
| 396 | TP_printk("%llu %u %u %u", |
| 397 | __entry->ino, __entry->new_cpos, |
| 398 | __entry->clusters, __entry->depth) |
| 399 | ); |
| 400 | |
| 401 | TRACE_EVENT(ocfs2_validate_extent_block, |
| 402 | TP_PROTO(unsigned long long blkno), |
| 403 | TP_ARGS(blkno), |
| 404 | TP_STRUCT__entry( |
| 405 | __field(unsigned long long, blkno) |
| 406 | ), |
| 407 | TP_fast_assign( |
| 408 | __entry->blkno = blkno; |
| 409 | ), |
| 410 | TP_printk("%llu ", __entry->blkno) |
| 411 | ); |
| 412 | |
| 413 | TRACE_EVENT(ocfs2_rotate_leaf, |
| 414 | TP_PROTO(unsigned int insert_cpos, int insert_index, |
| 415 | int has_empty, int next_free, |
| 416 | unsigned int l_count), |
| 417 | TP_ARGS(insert_cpos, insert_index, has_empty, |
| 418 | next_free, l_count), |
| 419 | TP_STRUCT__entry( |
| 420 | __field(unsigned int, insert_cpos) |
| 421 | __field(int, insert_index) |
| 422 | __field(int, has_empty) |
| 423 | __field(int, next_free) |
| 424 | __field(unsigned int, l_count) |
| 425 | ), |
| 426 | TP_fast_assign( |
| 427 | __entry->insert_cpos = insert_cpos; |
| 428 | __entry->insert_index = insert_index; |
| 429 | __entry->has_empty = has_empty; |
| 430 | __entry->next_free = next_free; |
| 431 | __entry->l_count = l_count; |
| 432 | ), |
| 433 | TP_printk("%u %d %d %d %u", __entry->insert_cpos, |
| 434 | __entry->insert_index, __entry->has_empty, |
| 435 | __entry->next_free, __entry->l_count) |
| 436 | ); |
| 437 | |
| 438 | TRACE_EVENT(ocfs2_add_clusters_in_btree_ret, |
| 439 | TP_PROTO(int status, int reason, int err), |
| 440 | TP_ARGS(status, reason, err), |
| 441 | TP_STRUCT__entry( |
| 442 | __field(int, status) |
| 443 | __field(int, reason) |
| 444 | __field(int, err) |
| 445 | ), |
| 446 | TP_fast_assign( |
| 447 | __entry->status = status; |
| 448 | __entry->reason = reason; |
| 449 | __entry->err = err; |
| 450 | ), |
| 451 | TP_printk("%d %d %d", __entry->status, |
| 452 | __entry->reason, __entry->err) |
| 453 | ); |
| 454 | |
| 455 | TRACE_EVENT(ocfs2_mark_extent_written, |
| 456 | TP_PROTO(unsigned long long owner, unsigned int cpos, |
| 457 | unsigned int len, unsigned int phys), |
| 458 | TP_ARGS(owner, cpos, len, phys), |
| 459 | TP_STRUCT__entry( |
| 460 | __field(unsigned long long, owner) |
| 461 | __field(unsigned int, cpos) |
| 462 | __field(unsigned int, len) |
| 463 | __field(unsigned int, phys) |
| 464 | ), |
| 465 | TP_fast_assign( |
| 466 | __entry->owner = owner; |
| 467 | __entry->cpos = cpos; |
| 468 | __entry->len = len; |
| 469 | __entry->phys = phys; |
| 470 | ), |
| 471 | TP_printk("%llu %u %u %u", |
| 472 | __entry->owner, __entry->cpos, |
| 473 | __entry->len, __entry->phys) |
| 474 | ); |
| 475 | |
| 476 | DECLARE_EVENT_CLASS(ocfs2__truncate_log_ops, |
| 477 | TP_PROTO(unsigned long long blkno, int index, |
| 478 | unsigned int start, unsigned int num), |
| 479 | TP_ARGS(blkno, index, start, num), |
| 480 | TP_STRUCT__entry( |
| 481 | __field(unsigned long long, blkno) |
| 482 | __field(int, index) |
| 483 | __field(unsigned int, start) |
| 484 | __field(unsigned int, num) |
| 485 | ), |
| 486 | TP_fast_assign( |
| 487 | __entry->blkno = blkno; |
| 488 | __entry->index = index; |
| 489 | __entry->start = start; |
| 490 | __entry->num = num; |
| 491 | ), |
| 492 | TP_printk("%llu %d %u %u", |
| 493 | __entry->blkno, __entry->index, |
| 494 | __entry->start, __entry->num) |
| 495 | ); |
| 496 | |
| 497 | #define DEFINE_OCFS2_TRUNCATE_LOG_OPS_EVENT(name) \ |
| 498 | DEFINE_EVENT(ocfs2__truncate_log_ops, name, \ |
| 499 | TP_PROTO(unsigned long long blkno, int index, \ |
| 500 | unsigned int start, unsigned int num), \ |
| 501 | TP_ARGS(blkno, index, start, num)) |
| 502 | |
| 503 | DEFINE_OCFS2_TRUNCATE_LOG_OPS_EVENT(ocfs2_truncate_log_append); |
| 504 | |
| 505 | DEFINE_OCFS2_TRUNCATE_LOG_OPS_EVENT(ocfs2_replay_truncate_records); |
| 506 | |
| 507 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_flush_truncate_log); |
| 508 | |
| 509 | DEFINE_OCFS2_INT_EVENT(ocfs2_begin_truncate_log_recovery); |
| 510 | |
| 511 | DEFINE_OCFS2_INT_EVENT(ocfs2_truncate_log_recovery_num); |
| 512 | |
| 513 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_complete_truncate_log_recovery); |
| 514 | |
| 515 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_free_cached_blocks); |
| 516 | |
| 517 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_cache_cluster_dealloc); |
| 518 | |
| 519 | DEFINE_OCFS2_INT_INT_EVENT(ocfs2_run_deallocs); |
| 520 | |
| 521 | TRACE_EVENT(ocfs2_cache_block_dealloc, |
| 522 | TP_PROTO(int type, int slot, unsigned long long suballoc, |
| 523 | unsigned long long blkno, unsigned int bit), |
| 524 | TP_ARGS(type, slot, suballoc, blkno, bit), |
| 525 | TP_STRUCT__entry( |
| 526 | __field(int, type) |
| 527 | __field(int, slot) |
| 528 | __field(unsigned long long, suballoc) |
| 529 | __field(unsigned long long, blkno) |
| 530 | __field(unsigned int, bit) |
| 531 | ), |
| 532 | TP_fast_assign( |
| 533 | __entry->type = type; |
| 534 | __entry->slot = slot; |
| 535 | __entry->suballoc = suballoc; |
| 536 | __entry->blkno = blkno; |
| 537 | __entry->bit = bit; |
| 538 | ), |
| 539 | TP_printk("%d %d %llu %llu %u", |
| 540 | __entry->type, __entry->slot, __entry->suballoc, |
| 541 | __entry->blkno, __entry->bit) |
| 542 | ); |
| 543 | |
| 544 | /* End of trace events for fs/ocfs2/alloc.c. */ |
Wengang Wang | 80a9a84 | 2011-02-21 11:13:14 +0800 | [diff] [blame] | 545 | |
Tao Ma | a04733d | 2011-02-22 07:56:45 +0800 | [diff] [blame] | 546 | /* Trace events for fs/ocfs2/localalloc.c. */ |
| 547 | |
| 548 | DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_la_set_sizes); |
| 549 | |
| 550 | DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_alloc_should_use_local); |
| 551 | |
| 552 | DEFINE_OCFS2_INT_EVENT(ocfs2_load_local_alloc); |
| 553 | |
| 554 | DEFINE_OCFS2_INT_EVENT(ocfs2_begin_local_alloc_recovery); |
| 555 | |
| 556 | DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_reserve_local_alloc_bits); |
| 557 | |
| 558 | DEFINE_OCFS2_UINT_EVENT(ocfs2_local_alloc_count_bits); |
| 559 | |
| 560 | DEFINE_OCFS2_INT_INT_EVENT(ocfs2_local_alloc_find_clear_bits_search_bitmap); |
| 561 | |
| 562 | DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_local_alloc_find_clear_bits); |
| 563 | |
| 564 | DEFINE_OCFS2_INT_INT_EVENT(ocfs2_sync_local_to_main); |
| 565 | |
| 566 | TRACE_EVENT(ocfs2_sync_local_to_main_free, |
| 567 | TP_PROTO(int count, int bit, unsigned long long start_blk, |
| 568 | unsigned long long blkno), |
| 569 | TP_ARGS(count, bit, start_blk, blkno), |
| 570 | TP_STRUCT__entry( |
| 571 | __field(int, count) |
| 572 | __field(int, bit) |
| 573 | __field(unsigned long long, start_blk) |
| 574 | __field(unsigned long long, blkno) |
| 575 | ), |
| 576 | TP_fast_assign( |
| 577 | __entry->count = count; |
| 578 | __entry->bit = bit; |
| 579 | __entry->start_blk = start_blk; |
| 580 | __entry->blkno = blkno; |
| 581 | ), |
| 582 | TP_printk("%d %d %llu %llu", |
| 583 | __entry->count, __entry->bit, __entry->start_blk, |
| 584 | __entry->blkno) |
| 585 | ); |
| 586 | |
| 587 | DEFINE_OCFS2_INT_INT_EVENT(ocfs2_local_alloc_new_window); |
| 588 | |
| 589 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_local_alloc_new_window_result); |
| 590 | |
| 591 | /* End of trace events for fs/ocfs2/localalloc.c. */ |
Tao Ma | 2f73e13 | 2011-02-22 08:22:33 +0800 | [diff] [blame^] | 592 | |
| 593 | /* Trace events for fs/ocfs2/suballoc.c. */ |
| 594 | |
| 595 | DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_group_descriptor); |
| 596 | |
| 597 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_block_group_alloc_contig); |
| 598 | |
| 599 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_block_group_alloc_discontig); |
| 600 | |
| 601 | DEFINE_OCFS2_ULL_EVENT(ocfs2_block_group_alloc); |
| 602 | |
| 603 | DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_reserve_suballoc_bits_nospc); |
| 604 | |
| 605 | DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_reserve_suballoc_bits_no_new_group); |
| 606 | |
| 607 | DEFINE_OCFS2_ULL_EVENT(ocfs2_reserve_new_inode_new_group); |
| 608 | |
| 609 | DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_block_group_set_bits); |
| 610 | |
| 611 | TRACE_EVENT(ocfs2_relink_block_group, |
| 612 | TP_PROTO(unsigned long long i_blkno, unsigned int chain, |
| 613 | unsigned long long bg_blkno, |
| 614 | unsigned long long prev_blkno), |
| 615 | TP_ARGS(i_blkno, chain, bg_blkno, prev_blkno), |
| 616 | TP_STRUCT__entry( |
| 617 | __field(unsigned long long, i_blkno) |
| 618 | __field(unsigned int, chain) |
| 619 | __field(unsigned long long, bg_blkno) |
| 620 | __field(unsigned long long, prev_blkno) |
| 621 | ), |
| 622 | TP_fast_assign( |
| 623 | __entry->i_blkno = i_blkno; |
| 624 | __entry->chain = chain; |
| 625 | __entry->bg_blkno = bg_blkno; |
| 626 | __entry->prev_blkno = prev_blkno; |
| 627 | ), |
| 628 | TP_printk("%llu %u %llu %llu", |
| 629 | __entry->i_blkno, __entry->chain, __entry->bg_blkno, |
| 630 | __entry->prev_blkno) |
| 631 | ); |
| 632 | |
| 633 | DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_cluster_group_search_wrong_max_bits); |
| 634 | |
| 635 | DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_cluster_group_search_max_block); |
| 636 | |
| 637 | DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_block_group_search_max_block); |
| 638 | |
| 639 | DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_search_chain_begin); |
| 640 | |
| 641 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_search_chain_succ); |
| 642 | |
| 643 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_search_chain_end); |
| 644 | |
| 645 | DEFINE_OCFS2_UINT_EVENT(ocfs2_claim_suballoc_bits); |
| 646 | |
| 647 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_claim_new_inode_at_loc); |
| 648 | |
| 649 | DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_block_group_clear_bits); |
| 650 | |
| 651 | TRACE_EVENT(ocfs2_free_suballoc_bits, |
| 652 | TP_PROTO(unsigned long long inode, unsigned long long group, |
| 653 | unsigned int start_bit, unsigned int count), |
| 654 | TP_ARGS(inode, group, start_bit, count), |
| 655 | TP_STRUCT__entry( |
| 656 | __field(unsigned long long, inode) |
| 657 | __field(unsigned long long, group) |
| 658 | __field(unsigned int, start_bit) |
| 659 | __field(unsigned int, count) |
| 660 | ), |
| 661 | TP_fast_assign( |
| 662 | __entry->inode = inode; |
| 663 | __entry->group = group; |
| 664 | __entry->start_bit = start_bit; |
| 665 | __entry->count = count; |
| 666 | ), |
| 667 | TP_printk("%llu %llu %u %u", __entry->inode, __entry->group, |
| 668 | __entry->start_bit, __entry->count) |
| 669 | ); |
| 670 | |
| 671 | TRACE_EVENT(ocfs2_free_clusters, |
| 672 | TP_PROTO(unsigned long long bg_blkno, unsigned long long start_blk, |
| 673 | unsigned int start_bit, unsigned int count), |
| 674 | TP_ARGS(bg_blkno, start_blk, start_bit, count), |
| 675 | TP_STRUCT__entry( |
| 676 | __field(unsigned long long, bg_blkno) |
| 677 | __field(unsigned long long, start_blk) |
| 678 | __field(unsigned int, start_bit) |
| 679 | __field(unsigned int, count) |
| 680 | ), |
| 681 | TP_fast_assign( |
| 682 | __entry->bg_blkno = bg_blkno; |
| 683 | __entry->start_blk = start_blk; |
| 684 | __entry->start_bit = start_bit; |
| 685 | __entry->count = count; |
| 686 | ), |
| 687 | TP_printk("%llu %llu %u %u", __entry->bg_blkno, __entry->start_blk, |
| 688 | __entry->start_bit, __entry->count) |
| 689 | ); |
| 690 | |
| 691 | DEFINE_OCFS2_ULL_EVENT(ocfs2_get_suballoc_slot_bit); |
| 692 | |
| 693 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_test_suballoc_bit); |
| 694 | |
| 695 | DEFINE_OCFS2_ULL_EVENT(ocfs2_test_inode_bit); |
| 696 | |
| 697 | /* End of trace events for fs/ocfs2/suballoc.c. */ |
Wengang Wang | 80a9a84 | 2011-02-21 11:13:14 +0800 | [diff] [blame] | 698 | #endif /* _TRACE_OCFS2_H */ |
| 699 | |
| 700 | /* This part must be outside protection */ |
| 701 | #undef TRACE_INCLUDE_PATH |
| 702 | #define TRACE_INCLUDE_PATH . |
| 703 | #define TRACE_INCLUDE_FILE ocfs2_trace |
| 704 | #include <trace/define_trace.h> |