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