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