blob: f8f5fc5e6c059ce56a7e3eade7e8d7a65e4b0efb [file] [log] [blame]
Wengang Wang80a9a842011-02-21 11:13:14 +08001#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 Maa09d09b2011-02-22 08:21:10 +08009DECLARE_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) \
22DEFINE_EVENT(ocfs2__int, name, \
23 TP_PROTO(int num), \
24 TP_ARGS(num))
25
Tao Maa04733d2011-02-22 07:56:45 +080026DECLARE_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) \
39DEFINE_EVENT(ocfs2__uint, name, \
40 TP_PROTO(unsigned int num), \
41 TP_ARGS(num))
42
Tao Ma2f73e132011-02-22 08:22:33 +080043DECLARE_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) \
56DEFINE_EVENT(ocfs2__ull, name, \
57 TP_PROTO(unsigned long long num), \
58 TP_ARGS(num))
59
Tao Ma32a42d32011-02-23 21:29:08 +080060DECLARE_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) \
73DEFINE_EVENT(ocfs2__pointer, name, \
74 TP_PROTO(void *pointer), \
75 TP_ARGS(pointer))
76
Tao Ma402b4182011-02-23 22:01:17 +080077DECLARE_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) \
90DEFINE_EVENT(ocfs2__string, name, \
91 TP_PROTO(const char *name), \
92 TP_ARGS(name))
93
Tao Maa09d09b2011-02-22 08:21:10 +080094DECLARE_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) \
109DEFINE_EVENT(ocfs2__int_int, name, \
110 TP_PROTO(int val1, int val2), \
111 TP_ARGS(val1, val2))
112
Tao Ma1db986a2011-02-23 22:19:12 +0800113DECLARE_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) \
128DEFINE_EVENT(ocfs2__uint_int, name, \
129 TP_PROTO(unsigned int val1, int val2), \
130 TP_ARGS(val1, val2))
131
Tao Ma2f73e132011-02-22 08:22:33 +0800132DECLARE_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) \
147DEFINE_EVENT(ocfs2__uint_uint, name, \
148 TP_PROTO(unsigned int val1, unsigned int val2), \
149 TP_ARGS(val1, val2))
150
Tao Maa09d09b2011-02-22 08:21:10 +0800151DECLARE_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) \
166DEFINE_EVENT(ocfs2__ull_uint, name, \
167 TP_PROTO(unsigned long long val1, unsigned int val2), \
168 TP_ARGS(val1, val2))
169
Tao Ma64f3b262011-02-22 22:24:57 +0800170DECLARE_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) \
185DEFINE_EVENT(ocfs2__ull_int, name, \
186 TP_PROTO(unsigned long long val1, int val2), \
187 TP_ARGS(val1, val2))
188
Tao Ma2f73e132011-02-22 08:22:33 +0800189DECLARE_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) \
204DEFINE_EVENT(ocfs2__ull_ull, name, \
205 TP_PROTO(unsigned long long val1, unsigned long long val2), \
206 TP_ARGS(val1, val2))
207
Tao Ma198aac22011-02-22 08:20:04 +0800208DECLARE_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) \
227DEFINE_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 Ma2f73e132011-02-22 08:22:33 +0800232DECLARE_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) \
251DEFINE_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 Maa04733d2011-02-22 07:56:45 +0800256DECLARE_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) \
274DEFINE_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 Ma468eedd2011-02-22 22:14:41 +0800279DECLARE_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) \
298DEFINE_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 Maa04733d2011-02-22 07:56:45 +0800303DECLARE_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) \
324DEFINE_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 Ma2f73e132011-02-22 08:22:33 +0800329DECLARE_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) \
351DEFINE_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 Ma402b4182011-02-23 22:01:17 +0800356DECLARE_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) \
378DEFINE_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 Maa09d09b2011-02-22 08:21:10 +0800383/* Trace events for fs/ocfs2/alloc.c. */
384DECLARE_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) \
403DEFINE_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
408DEFINE_OCFS2_BTREE_EVENT(ocfs2_adjust_rightmost_branch);
409
410DEFINE_OCFS2_BTREE_EVENT(ocfs2_rotate_tree_right);
411
412DEFINE_OCFS2_BTREE_EVENT(ocfs2_append_rec_to_path);
413
414DEFINE_OCFS2_BTREE_EVENT(ocfs2_insert_extent_start);
415
416DEFINE_OCFS2_BTREE_EVENT(ocfs2_add_clusters_in_btree);
417
418DEFINE_OCFS2_INT_EVENT(ocfs2_num_free_extents);
419
420DEFINE_OCFS2_INT_EVENT(ocfs2_complete_edge_insert);
421
422TRACE_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
436TRACE_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
454TRACE_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
479TRACE_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
501TRACE_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
527TRACE_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
548TRACE_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
560TRACE_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
585TRACE_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
602TRACE_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
623DECLARE_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) \
645DEFINE_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
650DEFINE_OCFS2_TRUNCATE_LOG_OPS_EVENT(ocfs2_truncate_log_append);
651
652DEFINE_OCFS2_TRUNCATE_LOG_OPS_EVENT(ocfs2_replay_truncate_records);
653
654DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_flush_truncate_log);
655
656DEFINE_OCFS2_INT_EVENT(ocfs2_begin_truncate_log_recovery);
657
658DEFINE_OCFS2_INT_EVENT(ocfs2_truncate_log_recovery_num);
659
660DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_complete_truncate_log_recovery);
661
662DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_free_cached_blocks);
663
664DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_cache_cluster_dealloc);
665
666DEFINE_OCFS2_INT_INT_EVENT(ocfs2_run_deallocs);
667
668TRACE_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
Tao Ma10fca352011-05-23 10:36:45 +0800691TRACE_EVENT(ocfs2_trim_extent,
692 TP_PROTO(struct super_block *sb, unsigned long long blk,
693 unsigned long long count),
694 TP_ARGS(sb, blk, count),
695 TP_STRUCT__entry(
696 __field(int, dev_major)
697 __field(int, dev_minor)
698 __field(unsigned long long, blk)
699 __field(__u64, count)
700 ),
701 TP_fast_assign(
702 __entry->dev_major = MAJOR(sb->s_dev);
703 __entry->dev_minor = MINOR(sb->s_dev);
704 __entry->blk = blk;
705 __entry->count = count;
706 ),
707 TP_printk("%d %d %llu %llu",
708 __entry->dev_major, __entry->dev_minor,
709 __entry->blk, __entry->count)
710);
711
712DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_trim_group);
713
714DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_trim_fs);
715
Tao Maa09d09b2011-02-22 08:21:10 +0800716/* End of trace events for fs/ocfs2/alloc.c. */
Wengang Wang80a9a842011-02-21 11:13:14 +0800717
Tao Maa04733d2011-02-22 07:56:45 +0800718/* Trace events for fs/ocfs2/localalloc.c. */
719
720DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_la_set_sizes);
721
722DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_alloc_should_use_local);
723
724DEFINE_OCFS2_INT_EVENT(ocfs2_load_local_alloc);
725
726DEFINE_OCFS2_INT_EVENT(ocfs2_begin_local_alloc_recovery);
727
728DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_reserve_local_alloc_bits);
729
730DEFINE_OCFS2_UINT_EVENT(ocfs2_local_alloc_count_bits);
731
732DEFINE_OCFS2_INT_INT_EVENT(ocfs2_local_alloc_find_clear_bits_search_bitmap);
733
734DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_local_alloc_find_clear_bits);
735
736DEFINE_OCFS2_INT_INT_EVENT(ocfs2_sync_local_to_main);
737
738TRACE_EVENT(ocfs2_sync_local_to_main_free,
739 TP_PROTO(int count, int bit, unsigned long long start_blk,
740 unsigned long long blkno),
741 TP_ARGS(count, bit, start_blk, blkno),
742 TP_STRUCT__entry(
743 __field(int, count)
744 __field(int, bit)
745 __field(unsigned long long, start_blk)
746 __field(unsigned long long, blkno)
747 ),
748 TP_fast_assign(
749 __entry->count = count;
750 __entry->bit = bit;
751 __entry->start_blk = start_blk;
752 __entry->blkno = blkno;
753 ),
754 TP_printk("%d %d %llu %llu",
755 __entry->count, __entry->bit, __entry->start_blk,
756 __entry->blkno)
757);
758
759DEFINE_OCFS2_INT_INT_EVENT(ocfs2_local_alloc_new_window);
760
761DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_local_alloc_new_window_result);
762
763/* End of trace events for fs/ocfs2/localalloc.c. */
Tao Ma2f73e132011-02-22 08:22:33 +0800764
Tao Maa5438702011-02-22 08:24:01 +0800765/* Trace events for fs/ocfs2/resize.c. */
766
767DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_update_last_group_and_inode);
768
769DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_group_extend);
770
771DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_group_add);
772
773/* End of trace events for fs/ocfs2/resize.c. */
774
Tao Ma2f73e132011-02-22 08:22:33 +0800775/* Trace events for fs/ocfs2/suballoc.c. */
776
777DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_group_descriptor);
778
779DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_block_group_alloc_contig);
780
781DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_block_group_alloc_discontig);
782
783DEFINE_OCFS2_ULL_EVENT(ocfs2_block_group_alloc);
784
785DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_reserve_suballoc_bits_nospc);
786
787DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_reserve_suballoc_bits_no_new_group);
788
789DEFINE_OCFS2_ULL_EVENT(ocfs2_reserve_new_inode_new_group);
790
791DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_block_group_set_bits);
792
793TRACE_EVENT(ocfs2_relink_block_group,
794 TP_PROTO(unsigned long long i_blkno, unsigned int chain,
795 unsigned long long bg_blkno,
796 unsigned long long prev_blkno),
797 TP_ARGS(i_blkno, chain, bg_blkno, prev_blkno),
798 TP_STRUCT__entry(
799 __field(unsigned long long, i_blkno)
800 __field(unsigned int, chain)
801 __field(unsigned long long, bg_blkno)
802 __field(unsigned long long, prev_blkno)
803 ),
804 TP_fast_assign(
805 __entry->i_blkno = i_blkno;
806 __entry->chain = chain;
807 __entry->bg_blkno = bg_blkno;
808 __entry->prev_blkno = prev_blkno;
809 ),
810 TP_printk("%llu %u %llu %llu",
811 __entry->i_blkno, __entry->chain, __entry->bg_blkno,
812 __entry->prev_blkno)
813);
814
815DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_cluster_group_search_wrong_max_bits);
816
817DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_cluster_group_search_max_block);
818
819DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_block_group_search_max_block);
820
821DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_search_chain_begin);
822
823DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_search_chain_succ);
824
825DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_search_chain_end);
826
827DEFINE_OCFS2_UINT_EVENT(ocfs2_claim_suballoc_bits);
828
829DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_claim_new_inode_at_loc);
830
831DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_block_group_clear_bits);
832
833TRACE_EVENT(ocfs2_free_suballoc_bits,
834 TP_PROTO(unsigned long long inode, unsigned long long group,
835 unsigned int start_bit, unsigned int count),
836 TP_ARGS(inode, group, start_bit, count),
837 TP_STRUCT__entry(
838 __field(unsigned long long, inode)
839 __field(unsigned long long, group)
840 __field(unsigned int, start_bit)
841 __field(unsigned int, count)
842 ),
843 TP_fast_assign(
844 __entry->inode = inode;
845 __entry->group = group;
846 __entry->start_bit = start_bit;
847 __entry->count = count;
848 ),
849 TP_printk("%llu %llu %u %u", __entry->inode, __entry->group,
850 __entry->start_bit, __entry->count)
851);
852
853TRACE_EVENT(ocfs2_free_clusters,
854 TP_PROTO(unsigned long long bg_blkno, unsigned long long start_blk,
855 unsigned int start_bit, unsigned int count),
856 TP_ARGS(bg_blkno, start_blk, start_bit, count),
857 TP_STRUCT__entry(
858 __field(unsigned long long, bg_blkno)
859 __field(unsigned long long, start_blk)
860 __field(unsigned int, start_bit)
861 __field(unsigned int, count)
862 ),
863 TP_fast_assign(
864 __entry->bg_blkno = bg_blkno;
865 __entry->start_blk = start_blk;
866 __entry->start_bit = start_bit;
867 __entry->count = count;
868 ),
869 TP_printk("%llu %llu %u %u", __entry->bg_blkno, __entry->start_blk,
870 __entry->start_bit, __entry->count)
871);
872
873DEFINE_OCFS2_ULL_EVENT(ocfs2_get_suballoc_slot_bit);
874
875DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_test_suballoc_bit);
876
877DEFINE_OCFS2_ULL_EVENT(ocfs2_test_inode_bit);
878
879/* End of trace events for fs/ocfs2/suballoc.c. */
Tao Ma198aac22011-02-22 08:20:04 +0800880
881/* Trace events for fs/ocfs2/refcounttree.c. */
882
883DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_refcount_block);
884
885DEFINE_OCFS2_ULL_EVENT(ocfs2_purge_refcount_trees);
886
887DEFINE_OCFS2_ULL_EVENT(ocfs2_create_refcount_tree);
888
889DEFINE_OCFS2_ULL_EVENT(ocfs2_create_refcount_tree_blkno);
890
891DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_change_refcount_rec);
892
893DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_expand_inline_ref_root);
894
895DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_divide_leaf_refcount_block);
896
897DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_new_leaf_refcount_block);
898
899DECLARE_EVENT_CLASS(ocfs2__refcount_tree_ops,
900 TP_PROTO(unsigned long long blkno, int index,
901 unsigned long long cpos,
902 unsigned int clusters, unsigned int refcount),
903 TP_ARGS(blkno, index, cpos, clusters, refcount),
904 TP_STRUCT__entry(
905 __field(unsigned long long, blkno)
906 __field(int, index)
907 __field(unsigned long long, cpos)
908 __field(unsigned int, clusters)
909 __field(unsigned int, refcount)
910 ),
911 TP_fast_assign(
912 __entry->blkno = blkno;
913 __entry->index = index;
914 __entry->cpos = cpos;
915 __entry->clusters = clusters;
916 __entry->refcount = refcount;
917 ),
918 TP_printk("%llu %d %llu %u %u", __entry->blkno, __entry->index,
919 __entry->cpos, __entry->clusters, __entry->refcount)
920);
921
922#define DEFINE_OCFS2_REFCOUNT_TREE_OPS_EVENT(name) \
923DEFINE_EVENT(ocfs2__refcount_tree_ops, name, \
924 TP_PROTO(unsigned long long blkno, int index, \
925 unsigned long long cpos, \
926 unsigned int count, unsigned int refcount), \
927 TP_ARGS(blkno, index, cpos, count, refcount))
928
929DEFINE_OCFS2_REFCOUNT_TREE_OPS_EVENT(ocfs2_insert_refcount_rec);
930
931TRACE_EVENT(ocfs2_split_refcount_rec,
932 TP_PROTO(unsigned long long cpos,
933 unsigned int clusters, unsigned int refcount,
934 unsigned long long split_cpos,
935 unsigned int split_clusters, unsigned int split_refcount),
936 TP_ARGS(cpos, clusters, refcount,
937 split_cpos, split_clusters, split_refcount),
938 TP_STRUCT__entry(
939 __field(unsigned long long, cpos)
940 __field(unsigned int, clusters)
941 __field(unsigned int, refcount)
942 __field(unsigned long long, split_cpos)
943 __field(unsigned int, split_clusters)
944 __field(unsigned int, split_refcount)
945 ),
946 TP_fast_assign(
947 __entry->cpos = cpos;
948 __entry->clusters = clusters;
949 __entry->refcount = refcount;
950 __entry->split_cpos = split_cpos;
951 __entry->split_clusters = split_clusters;
952 __entry->split_refcount = split_refcount;
953 ),
954 TP_printk("%llu %u %u %llu %u %u",
955 __entry->cpos, __entry->clusters, __entry->refcount,
956 __entry->split_cpos, __entry->split_clusters,
957 __entry->split_refcount)
958);
959
960DEFINE_OCFS2_REFCOUNT_TREE_OPS_EVENT(ocfs2_split_refcount_rec_insert);
961
962DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_increase_refcount_begin);
963
964DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_increase_refcount_change);
965
966DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_increase_refcount_insert);
967
968DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_increase_refcount_split);
969
970DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_remove_refcount_extent);
971
972DEFINE_OCFS2_ULL_EVENT(ocfs2_restore_refcount_block);
973
974DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_decrease_refcount_rec);
975
976TRACE_EVENT(ocfs2_decrease_refcount,
977 TP_PROTO(unsigned long long owner,
978 unsigned long long cpos,
979 unsigned int len, int delete),
980 TP_ARGS(owner, cpos, len, delete),
981 TP_STRUCT__entry(
982 __field(unsigned long long, owner)
983 __field(unsigned long long, cpos)
984 __field(unsigned int, len)
985 __field(int, delete)
986 ),
987 TP_fast_assign(
988 __entry->owner = owner;
989 __entry->cpos = cpos;
990 __entry->len = len;
991 __entry->delete = delete;
992 ),
993 TP_printk("%llu %llu %u %d",
994 __entry->owner, __entry->cpos, __entry->len, __entry->delete)
995);
996
997DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_mark_extent_refcounted);
998
999DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_calc_refcount_meta_credits);
1000
1001TRACE_EVENT(ocfs2_calc_refcount_meta_credits_iterate,
1002 TP_PROTO(int recs_add, unsigned long long cpos,
1003 unsigned int clusters, unsigned long long r_cpos,
1004 unsigned int r_clusters, unsigned int refcount, int index),
1005 TP_ARGS(recs_add, cpos, clusters, r_cpos, r_clusters, refcount, index),
1006 TP_STRUCT__entry(
1007 __field(int, recs_add)
1008 __field(unsigned long long, cpos)
1009 __field(unsigned int, clusters)
1010 __field(unsigned long long, r_cpos)
1011 __field(unsigned int, r_clusters)
1012 __field(unsigned int, refcount)
1013 __field(int, index)
1014 ),
1015 TP_fast_assign(
1016 __entry->recs_add = recs_add;
1017 __entry->cpos = cpos;
1018 __entry->clusters = clusters;
1019 __entry->r_cpos = r_cpos;
1020 __entry->r_clusters = r_clusters;
1021 __entry->refcount = refcount;
1022 __entry->index = index;
1023 ),
1024 TP_printk("%d %llu %u %llu %u %u %d",
1025 __entry->recs_add, __entry->cpos, __entry->clusters,
1026 __entry->r_cpos, __entry->r_clusters,
1027 __entry->refcount, __entry->index)
1028);
1029
1030DEFINE_OCFS2_INT_INT_EVENT(ocfs2_add_refcount_flag);
1031
1032DEFINE_OCFS2_INT_INT_EVENT(ocfs2_prepare_refcount_change_for_del);
1033
1034DEFINE_OCFS2_INT_INT_EVENT(ocfs2_lock_refcount_allocators);
1035
1036DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_duplicate_clusters_by_page);
1037
1038DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_duplicate_clusters_by_jbd);
1039
1040TRACE_EVENT(ocfs2_clear_ext_refcount,
1041 TP_PROTO(unsigned long long ino, unsigned int cpos,
1042 unsigned int len, unsigned int p_cluster,
1043 unsigned int ext_flags),
1044 TP_ARGS(ino, cpos, len, p_cluster, ext_flags),
1045 TP_STRUCT__entry(
1046 __field(unsigned long long, ino)
1047 __field(unsigned int, cpos)
1048 __field(unsigned int, len)
1049 __field(unsigned int, p_cluster)
1050 __field(unsigned int, ext_flags)
1051 ),
1052 TP_fast_assign(
1053 __entry->ino = ino;
1054 __entry->cpos = cpos;
1055 __entry->len = len;
1056 __entry->p_cluster = p_cluster;
1057 __entry->ext_flags = ext_flags;
1058 ),
1059 TP_printk("%llu %u %u %u %u",
1060 __entry->ino, __entry->cpos, __entry->len,
1061 __entry->p_cluster, __entry->ext_flags)
1062);
1063
1064TRACE_EVENT(ocfs2_replace_clusters,
1065 TP_PROTO(unsigned long long ino, unsigned int cpos,
1066 unsigned int old, unsigned int new, unsigned int len,
1067 unsigned int ext_flags),
1068 TP_ARGS(ino, cpos, old, new, len, ext_flags),
1069 TP_STRUCT__entry(
1070 __field(unsigned long long, ino)
1071 __field(unsigned int, cpos)
1072 __field(unsigned int, old)
1073 __field(unsigned int, new)
1074 __field(unsigned int, len)
1075 __field(unsigned int, ext_flags)
1076 ),
1077 TP_fast_assign(
1078 __entry->ino = ino;
1079 __entry->cpos = cpos;
1080 __entry->old = old;
1081 __entry->new = new;
1082 __entry->len = len;
1083 __entry->ext_flags = ext_flags;
1084 ),
1085 TP_printk("%llu %u %u %u %u %u",
1086 __entry->ino, __entry->cpos, __entry->old, __entry->new,
1087 __entry->len, __entry->ext_flags)
1088);
1089
1090DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_make_clusters_writable);
1091
1092TRACE_EVENT(ocfs2_refcount_cow_hunk,
1093 TP_PROTO(unsigned long long ino, unsigned int cpos,
1094 unsigned int write_len, unsigned int max_cpos,
1095 unsigned int cow_start, unsigned int cow_len),
1096 TP_ARGS(ino, cpos, write_len, max_cpos, cow_start, cow_len),
1097 TP_STRUCT__entry(
1098 __field(unsigned long long, ino)
1099 __field(unsigned int, cpos)
1100 __field(unsigned int, write_len)
1101 __field(unsigned int, max_cpos)
1102 __field(unsigned int, cow_start)
1103 __field(unsigned int, cow_len)
1104 ),
1105 TP_fast_assign(
1106 __entry->ino = ino;
1107 __entry->cpos = cpos;
1108 __entry->write_len = write_len;
1109 __entry->max_cpos = max_cpos;
1110 __entry->cow_start = cow_start;
1111 __entry->cow_len = cow_len;
1112 ),
1113 TP_printk("%llu %u %u %u %u %u",
1114 __entry->ino, __entry->cpos, __entry->write_len,
1115 __entry->max_cpos, __entry->cow_start, __entry->cow_len)
1116);
1117
1118/* End of trace events for fs/ocfs2/refcounttree.c. */
Tao Ma95581562011-02-22 21:33:59 +08001119
1120/* Trace events for fs/ocfs2/aops.c. */
1121
1122DECLARE_EVENT_CLASS(ocfs2__get_block,
1123 TP_PROTO(unsigned long long ino, unsigned long long iblock,
1124 void *bh_result, int create),
1125 TP_ARGS(ino, iblock, bh_result, create),
1126 TP_STRUCT__entry(
1127 __field(unsigned long long, ino)
1128 __field(unsigned long long, iblock)
1129 __field(void *, bh_result)
1130 __field(int, create)
1131 ),
1132 TP_fast_assign(
1133 __entry->ino = ino;
1134 __entry->iblock = iblock;
1135 __entry->bh_result = bh_result;
1136 __entry->create = create;
1137 ),
1138 TP_printk("%llu %llu %p %d",
1139 __entry->ino, __entry->iblock,
1140 __entry->bh_result, __entry->create)
1141);
1142
1143#define DEFINE_OCFS2_GET_BLOCK_EVENT(name) \
1144DEFINE_EVENT(ocfs2__get_block, name, \
1145 TP_PROTO(unsigned long long ino, unsigned long long iblock, \
1146 void *bh_result, int create), \
1147 TP_ARGS(ino, iblock, bh_result, create))
1148
1149DEFINE_OCFS2_GET_BLOCK_EVENT(ocfs2_symlink_get_block);
1150
1151DEFINE_OCFS2_GET_BLOCK_EVENT(ocfs2_get_block);
1152
1153DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_get_block_end);
1154
1155DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_readpage);
1156
1157DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_writepage);
1158
1159DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_bmap);
1160
1161TRACE_EVENT(ocfs2_try_to_write_inline_data,
1162 TP_PROTO(unsigned long long ino, unsigned int len,
1163 unsigned long long pos, unsigned int flags),
1164 TP_ARGS(ino, len, pos, flags),
1165 TP_STRUCT__entry(
1166 __field(unsigned long long, ino)
1167 __field(unsigned int, len)
1168 __field(unsigned long long, pos)
1169 __field(unsigned int, flags)
1170 ),
1171 TP_fast_assign(
1172 __entry->ino = ino;
1173 __entry->len = len;
1174 __entry->pos = pos;
1175 __entry->flags = flags;
1176 ),
1177 TP_printk("%llu %u %llu 0x%x",
1178 __entry->ino, __entry->len, __entry->pos, __entry->flags)
1179);
1180
1181TRACE_EVENT(ocfs2_write_begin_nolock,
1182 TP_PROTO(unsigned long long ino,
1183 long long i_size, unsigned int i_clusters,
1184 unsigned long long pos, unsigned int len,
1185 unsigned int flags, void *page,
1186 unsigned int clusters, unsigned int extents_to_split),
1187 TP_ARGS(ino, i_size, i_clusters, pos, len, flags,
1188 page, clusters, extents_to_split),
1189 TP_STRUCT__entry(
1190 __field(unsigned long long, ino)
1191 __field(long long, i_size)
1192 __field(unsigned int, i_clusters)
1193 __field(unsigned long long, pos)
1194 __field(unsigned int, len)
1195 __field(unsigned int, flags)
1196 __field(void *, page)
1197 __field(unsigned int, clusters)
1198 __field(unsigned int, extents_to_split)
1199 ),
1200 TP_fast_assign(
1201 __entry->ino = ino;
1202 __entry->i_size = i_size;
1203 __entry->i_clusters = i_clusters;
1204 __entry->pos = pos;
1205 __entry->len = len;
1206 __entry->flags = flags;
1207 __entry->page = page;
1208 __entry->clusters = clusters;
1209 __entry->extents_to_split = extents_to_split;
1210 ),
1211 TP_printk("%llu %lld %u %llu %u %u %p %u %u",
1212 __entry->ino, __entry->i_size, __entry->i_clusters,
1213 __entry->pos, __entry->len,
1214 __entry->flags, __entry->page, __entry->clusters,
1215 __entry->extents_to_split)
1216);
1217
1218TRACE_EVENT(ocfs2_write_end_inline,
1219 TP_PROTO(unsigned long long ino,
1220 unsigned long long pos, unsigned int copied,
1221 unsigned int id_count, unsigned int features),
1222 TP_ARGS(ino, pos, copied, id_count, features),
1223 TP_STRUCT__entry(
1224 __field(unsigned long long, ino)
1225 __field(unsigned long long, pos)
1226 __field(unsigned int, copied)
1227 __field(unsigned int, id_count)
1228 __field(unsigned int, features)
1229 ),
1230 TP_fast_assign(
1231 __entry->ino = ino;
1232 __entry->pos = pos;
1233 __entry->copied = copied;
1234 __entry->id_count = id_count;
1235 __entry->features = features;
1236 ),
1237 TP_printk("%llu %llu %u %u %u",
1238 __entry->ino, __entry->pos, __entry->copied,
1239 __entry->id_count, __entry->features)
1240);
1241
1242/* End of trace events for fs/ocfs2/aops.c. */
Tao Ma614a9e82011-02-22 21:59:46 +08001243
1244/* Trace events for fs/ocfs2/mmap.c. */
1245
1246TRACE_EVENT(ocfs2_fault,
1247 TP_PROTO(unsigned long long ino,
1248 void *area, void *page, unsigned long pgoff),
1249 TP_ARGS(ino, area, page, pgoff),
1250 TP_STRUCT__entry(
1251 __field(unsigned long long, ino)
1252 __field(void *, area)
1253 __field(void *, page)
1254 __field(unsigned long, pgoff)
1255 ),
1256 TP_fast_assign(
1257 __entry->ino = ino;
1258 __entry->area = area;
1259 __entry->page = page;
1260 __entry->pgoff = pgoff;
1261 ),
1262 TP_printk("%llu %p %p %lu",
1263 __entry->ino, __entry->area, __entry->page, __entry->pgoff)
1264);
1265
1266/* End of trace events for fs/ocfs2/mmap.c. */
1267
Tao Ma468eedd2011-02-22 22:14:41 +08001268/* Trace events for fs/ocfs2/file.c. */
1269
1270DECLARE_EVENT_CLASS(ocfs2__file_ops,
1271 TP_PROTO(void *inode, void *file, void *dentry,
1272 unsigned long long ino,
1273 unsigned int d_len, const unsigned char *d_name,
1274 unsigned long long para),
1275 TP_ARGS(inode, file, dentry, ino, d_len, d_name, para),
1276 TP_STRUCT__entry(
1277 __field(void *, inode)
1278 __field(void *, file)
1279 __field(void *, dentry)
1280 __field(unsigned long long, ino)
1281 __field(unsigned int, d_len)
1282 __string(d_name, d_name)
1283 __field(unsigned long long, para)
1284 ),
1285 TP_fast_assign(
1286 __entry->inode = inode;
1287 __entry->file = file;
1288 __entry->dentry = dentry;
1289 __entry->ino = ino;
1290 __entry->d_len = d_len;
1291 __assign_str(d_name, d_name);
1292 __entry->para = para;
1293 ),
1294 TP_printk("%p %p %p %llu %llu %.*s", __entry->inode, __entry->file,
1295 __entry->dentry, __entry->ino, __entry->para,
1296 __entry->d_len, __get_str(d_name))
1297);
1298
1299#define DEFINE_OCFS2_FILE_OPS(name) \
1300DEFINE_EVENT(ocfs2__file_ops, name, \
1301TP_PROTO(void *inode, void *file, void *dentry, \
1302 unsigned long long ino, \
1303 unsigned int d_len, const unsigned char *d_name, \
1304 unsigned long long mode), \
1305 TP_ARGS(inode, file, dentry, ino, d_len, d_name, mode))
1306
1307DEFINE_OCFS2_FILE_OPS(ocfs2_file_open);
1308
1309DEFINE_OCFS2_FILE_OPS(ocfs2_file_release);
1310
1311DEFINE_OCFS2_FILE_OPS(ocfs2_sync_file);
1312
1313DEFINE_OCFS2_FILE_OPS(ocfs2_file_aio_write);
1314
1315DEFINE_OCFS2_FILE_OPS(ocfs2_file_splice_write);
1316
1317DEFINE_OCFS2_FILE_OPS(ocfs2_file_splice_read);
1318
1319DEFINE_OCFS2_FILE_OPS(ocfs2_file_aio_read);
1320
1321DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_truncate_file);
1322
1323DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_truncate_file_error);
1324
1325TRACE_EVENT(ocfs2_extend_allocation,
1326 TP_PROTO(unsigned long long ip_blkno, unsigned long long size,
1327 unsigned int clusters, unsigned int clusters_to_add,
1328 int why, int restart_func),
1329 TP_ARGS(ip_blkno, size, clusters, clusters_to_add, why, restart_func),
1330 TP_STRUCT__entry(
1331 __field(unsigned long long, ip_blkno)
1332 __field(unsigned long long, size)
1333 __field(unsigned int, clusters)
1334 __field(unsigned int, clusters_to_add)
1335 __field(int, why)
1336 __field(int, restart_func)
1337 ),
1338 TP_fast_assign(
1339 __entry->ip_blkno = ip_blkno;
1340 __entry->size = size;
1341 __entry->clusters = clusters;
1342 __entry->clusters_to_add = clusters_to_add;
1343 __entry->why = why;
1344 __entry->restart_func = restart_func;
1345 ),
1346 TP_printk("%llu %llu %u %u %d %d",
1347 __entry->ip_blkno, __entry->size, __entry->clusters,
1348 __entry->clusters_to_add, __entry->why, __entry->restart_func)
1349);
1350
1351TRACE_EVENT(ocfs2_extend_allocation_end,
1352 TP_PROTO(unsigned long long ino,
1353 unsigned int di_clusters, unsigned long long di_size,
1354 unsigned int ip_clusters, unsigned long long i_size),
1355 TP_ARGS(ino, di_clusters, di_size, ip_clusters, i_size),
1356 TP_STRUCT__entry(
1357 __field(unsigned long long, ino)
1358 __field(unsigned int, di_clusters)
1359 __field(unsigned long long, di_size)
1360 __field(unsigned int, ip_clusters)
1361 __field(unsigned long long, i_size)
1362 ),
1363 TP_fast_assign(
1364 __entry->ino = ino;
1365 __entry->di_clusters = di_clusters;
1366 __entry->di_size = di_size;
1367 __entry->ip_clusters = ip_clusters;
1368 __entry->i_size = i_size;
1369 ),
1370 TP_printk("%llu %u %llu %u %llu", __entry->ino, __entry->di_clusters,
1371 __entry->di_size, __entry->ip_clusters, __entry->i_size)
1372);
1373
1374TRACE_EVENT(ocfs2_write_zero_page,
1375 TP_PROTO(unsigned long long ino,
1376 unsigned long long abs_from, unsigned long long abs_to,
1377 unsigned long index, unsigned int zero_from,
1378 unsigned int zero_to),
1379 TP_ARGS(ino, abs_from, abs_to, index, zero_from, zero_to),
1380 TP_STRUCT__entry(
1381 __field(unsigned long long, ino)
1382 __field(unsigned long long, abs_from)
1383 __field(unsigned long long, abs_to)
1384 __field(unsigned long, index)
1385 __field(unsigned int, zero_from)
1386 __field(unsigned int, zero_to)
1387 ),
1388 TP_fast_assign(
1389 __entry->ino = ino;
1390 __entry->abs_from = abs_from;
1391 __entry->abs_to = abs_to;
1392 __entry->index = index;
1393 __entry->zero_from = zero_from;
1394 __entry->zero_to = zero_to;
1395 ),
1396 TP_printk("%llu %llu %llu %lu %u %u", __entry->ino,
1397 __entry->abs_from, __entry->abs_to,
1398 __entry->index, __entry->zero_from, __entry->zero_to)
1399);
1400
1401DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_zero_extend_range);
1402
1403DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_zero_extend);
1404
1405TRACE_EVENT(ocfs2_setattr,
1406 TP_PROTO(void *inode, void *dentry,
1407 unsigned long long ino,
1408 unsigned int d_len, const unsigned char *d_name,
1409 unsigned int ia_valid, unsigned int ia_mode,
1410 unsigned int ia_uid, unsigned int ia_gid),
1411 TP_ARGS(inode, dentry, ino, d_len, d_name,
1412 ia_valid, ia_mode, ia_uid, ia_gid),
1413 TP_STRUCT__entry(
1414 __field(void *, inode)
1415 __field(void *, dentry)
1416 __field(unsigned long long, ino)
1417 __field(unsigned int, d_len)
1418 __string(d_name, d_name)
1419 __field(unsigned int, ia_valid)
1420 __field(unsigned int, ia_mode)
1421 __field(unsigned int, ia_uid)
1422 __field(unsigned int, ia_gid)
1423 ),
1424 TP_fast_assign(
1425 __entry->inode = inode;
1426 __entry->dentry = dentry;
1427 __entry->ino = ino;
1428 __entry->d_len = d_len;
1429 __assign_str(d_name, d_name);
1430 __entry->ia_valid = ia_valid;
1431 __entry->ia_mode = ia_mode;
1432 __entry->ia_uid = ia_uid;
1433 __entry->ia_gid = ia_gid;
1434 ),
1435 TP_printk("%p %p %llu %.*s %u %u %u %u", __entry->inode,
1436 __entry->dentry, __entry->ino, __entry->d_len,
1437 __get_str(d_name), __entry->ia_valid, __entry->ia_mode,
1438 __entry->ia_uid, __entry->ia_gid)
1439);
1440
1441DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_write_remove_suid);
1442
1443DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_zero_partial_clusters);
1444
1445DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_zero_partial_clusters_range1);
1446
1447DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_zero_partial_clusters_range2);
1448
1449DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_remove_inode_range);
1450
1451TRACE_EVENT(ocfs2_prepare_inode_for_write,
1452 TP_PROTO(unsigned long long ino, unsigned long long saved_pos,
Ryan Dingf1f973f2016-03-25 14:21:12 -07001453 unsigned long count),
1454 TP_ARGS(ino, saved_pos, count),
Tao Ma468eedd2011-02-22 22:14:41 +08001455 TP_STRUCT__entry(
1456 __field(unsigned long long, ino)
1457 __field(unsigned long long, saved_pos)
Tao Ma468eedd2011-02-22 22:14:41 +08001458 __field(unsigned long, count)
Tao Ma468eedd2011-02-22 22:14:41 +08001459 ),
1460 TP_fast_assign(
1461 __entry->ino = ino;
1462 __entry->saved_pos = saved_pos;
Tao Ma468eedd2011-02-22 22:14:41 +08001463 __entry->count = count;
Tao Ma468eedd2011-02-22 22:14:41 +08001464 ),
Ryan Dingf1f973f2016-03-25 14:21:12 -07001465 TP_printk("%llu %llu %lu", __entry->ino,
1466 __entry->saved_pos, __entry->count)
Tao Ma468eedd2011-02-22 22:14:41 +08001467);
1468
1469DEFINE_OCFS2_INT_EVENT(generic_file_aio_read_ret);
1470
1471/* End of trace events for fs/ocfs2/file.c. */
1472
Tao Ma64f3b262011-02-22 22:24:57 +08001473/* Trace events for fs/ocfs2/inode.c. */
1474
1475TRACE_EVENT(ocfs2_iget_begin,
1476 TP_PROTO(unsigned long long ino, unsigned int flags, int sysfile_type),
1477 TP_ARGS(ino, flags, sysfile_type),
1478 TP_STRUCT__entry(
1479 __field(unsigned long long, ino)
1480 __field(unsigned int, flags)
1481 __field(int, sysfile_type)
1482 ),
1483 TP_fast_assign(
1484 __entry->ino = ino;
1485 __entry->flags = flags;
1486 __entry->sysfile_type = sysfile_type;
1487 ),
1488 TP_printk("%llu %u %d", __entry->ino,
1489 __entry->flags, __entry->sysfile_type)
1490);
1491
1492DEFINE_OCFS2_ULL_EVENT(ocfs2_iget5_locked);
1493
1494TRACE_EVENT(ocfs2_iget_end,
1495 TP_PROTO(void *inode, unsigned long long ino),
1496 TP_ARGS(inode, ino),
1497 TP_STRUCT__entry(
1498 __field(void *, inode)
1499 __field(unsigned long long, ino)
1500 ),
1501 TP_fast_assign(
1502 __entry->inode = inode;
1503 __entry->ino = ino;
1504 ),
1505 TP_printk("%p %llu", __entry->inode, __entry->ino)
1506);
1507
1508TRACE_EVENT(ocfs2_find_actor,
1509 TP_PROTO(void *inode, unsigned long long ino,
1510 void *args, unsigned long long fi_blkno),
1511 TP_ARGS(inode, ino, args, fi_blkno),
1512 TP_STRUCT__entry(
1513 __field(void *, inode)
1514 __field(unsigned long long, ino)
1515 __field(void *, args)
1516 __field(unsigned long long, fi_blkno)
1517 ),
1518 TP_fast_assign(
1519 __entry->inode = inode;
1520 __entry->ino = ino;
1521 __entry->args = args;
1522 __entry->fi_blkno = fi_blkno;
1523 ),
1524 TP_printk("%p %llu %p %llu", __entry->inode, __entry->ino,
1525 __entry->args, __entry->fi_blkno)
1526);
1527
1528DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_populate_inode);
1529
1530DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_read_locked_inode);
1531
1532DEFINE_OCFS2_INT_INT_EVENT(ocfs2_check_orphan_recovery_state);
1533
1534DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_inode_block);
Gang Hed56a8f32016-03-22 14:24:30 -07001535DEFINE_OCFS2_ULL_EVENT(ocfs2_filecheck_validate_inode_block);
1536DEFINE_OCFS2_ULL_EVENT(ocfs2_filecheck_repair_inode_block);
Tao Ma64f3b262011-02-22 22:24:57 +08001537
1538TRACE_EVENT(ocfs2_inode_is_valid_to_delete,
1539 TP_PROTO(void *task, void *dc_task, unsigned long long ino,
1540 unsigned int flags),
1541 TP_ARGS(task, dc_task, ino, flags),
1542 TP_STRUCT__entry(
1543 __field(void *, task)
1544 __field(void *, dc_task)
1545 __field(unsigned long long, ino)
1546 __field(unsigned int, flags)
1547 ),
1548 TP_fast_assign(
1549 __entry->task = task;
1550 __entry->dc_task = dc_task;
1551 __entry->ino = ino;
1552 __entry->flags = flags;
1553 ),
1554 TP_printk("%p %p %llu %u", __entry->task, __entry->dc_task,
1555 __entry->ino, __entry->flags)
1556);
1557
1558DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_query_inode_wipe_begin);
1559
1560DEFINE_OCFS2_UINT_EVENT(ocfs2_query_inode_wipe_succ);
1561
1562DEFINE_OCFS2_INT_INT_EVENT(ocfs2_query_inode_wipe_end);
1563
1564DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_cleanup_delete_inode);
1565
1566DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_delete_inode);
1567
1568DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_clear_inode);
1569
1570DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_drop_inode);
1571
1572TRACE_EVENT(ocfs2_inode_revalidate,
1573 TP_PROTO(void *inode, unsigned long long ino,
1574 unsigned int flags),
1575 TP_ARGS(inode, ino, flags),
1576 TP_STRUCT__entry(
1577 __field(void *, inode)
1578 __field(unsigned long long, ino)
1579 __field(unsigned int, flags)
1580 ),
1581 TP_fast_assign(
1582 __entry->inode = inode;
1583 __entry->ino = ino;
1584 __entry->flags = flags;
1585 ),
1586 TP_printk("%p %llu %u", __entry->inode, __entry->ino, __entry->flags)
1587);
1588
1589DEFINE_OCFS2_ULL_EVENT(ocfs2_mark_inode_dirty);
1590
1591/* End of trace events for fs/ocfs2/inode.c. */
Tao Maa7163572011-02-22 22:27:33 +08001592
1593/* Trace events for fs/ocfs2/extent_map.c. */
1594
1595TRACE_EVENT(ocfs2_read_virt_blocks,
1596 TP_PROTO(void *inode, unsigned long long vblock, int nr,
1597 void *bhs, unsigned int flags, void *validate),
1598 TP_ARGS(inode, vblock, nr, bhs, flags, validate),
1599 TP_STRUCT__entry(
1600 __field(void *, inode)
1601 __field(unsigned long long, vblock)
1602 __field(int, nr)
1603 __field(void *, bhs)
1604 __field(unsigned int, flags)
1605 __field(void *, validate)
1606 ),
1607 TP_fast_assign(
1608 __entry->inode = inode;
1609 __entry->vblock = vblock;
1610 __entry->nr = nr;
1611 __entry->bhs = bhs;
1612 __entry->flags = flags;
1613 __entry->validate = validate;
1614 ),
1615 TP_printk("%p %llu %d %p %x %p", __entry->inode, __entry->vblock,
1616 __entry->nr, __entry->bhs, __entry->flags, __entry->validate)
1617);
1618
1619/* End of trace events for fs/ocfs2/extent_map.c. */
1620
Tao Maa8731082011-02-22 22:29:08 +08001621/* Trace events for fs/ocfs2/slot_map.c. */
1622
1623DEFINE_OCFS2_UINT_EVENT(ocfs2_refresh_slot_info);
1624
1625DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_map_slot_buffers);
1626
1627DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_map_slot_buffers_block);
1628
1629DEFINE_OCFS2_INT_EVENT(ocfs2_find_slot);
1630
1631/* End of trace events for fs/ocfs2/slot_map.c. */
Tao Mab5770f92011-02-23 21:17:39 +08001632
1633/* Trace events for fs/ocfs2/heartbeat.c. */
1634
1635DEFINE_OCFS2_INT_EVENT(ocfs2_do_node_down);
1636
1637/* End of trace events for fs/ocfs2/heartbeat.c. */
1638
Tao Ma32a42d32011-02-23 21:29:08 +08001639/* Trace events for fs/ocfs2/super.c. */
1640
1641TRACE_EVENT(ocfs2_remount,
1642 TP_PROTO(unsigned long s_flags, unsigned long osb_flags, int flags),
1643 TP_ARGS(s_flags, osb_flags, flags),
1644 TP_STRUCT__entry(
1645 __field(unsigned long, s_flags)
1646 __field(unsigned long, osb_flags)
1647 __field(int, flags)
1648 ),
1649 TP_fast_assign(
1650 __entry->s_flags = s_flags;
1651 __entry->osb_flags = osb_flags;
1652 __entry->flags = flags;
1653 ),
1654 TP_printk("%lu %lu %d", __entry->s_flags,
1655 __entry->osb_flags, __entry->flags)
1656);
1657
1658TRACE_EVENT(ocfs2_fill_super,
1659 TP_PROTO(void *sb, void *data, int silent),
1660 TP_ARGS(sb, data, silent),
1661 TP_STRUCT__entry(
1662 __field(void *, sb)
1663 __field(void *, data)
1664 __field(int, silent)
1665 ),
1666 TP_fast_assign(
1667 __entry->sb = sb;
1668 __entry->data = data;
1669 __entry->silent = silent;
1670 ),
1671 TP_printk("%p %p %d", __entry->sb,
1672 __entry->data, __entry->silent)
1673);
1674
1675TRACE_EVENT(ocfs2_parse_options,
1676 TP_PROTO(int is_remount, char *options),
1677 TP_ARGS(is_remount, options),
1678 TP_STRUCT__entry(
1679 __field(int, is_remount)
1680 __string(options, options)
1681 ),
1682 TP_fast_assign(
1683 __entry->is_remount = is_remount;
1684 __assign_str(options, options);
1685 ),
1686 TP_printk("%d %s", __entry->is_remount, __get_str(options))
1687);
1688
1689DEFINE_OCFS2_POINTER_EVENT(ocfs2_put_super);
1690
1691TRACE_EVENT(ocfs2_statfs,
1692 TP_PROTO(void *sb, void *buf),
1693 TP_ARGS(sb, buf),
1694 TP_STRUCT__entry(
1695 __field(void *, sb)
1696 __field(void *, buf)
1697 ),
1698 TP_fast_assign(
1699 __entry->sb = sb;
1700 __entry->buf = buf;
1701 ),
1702 TP_printk("%p %p", __entry->sb, __entry->buf)
1703);
1704
1705DEFINE_OCFS2_POINTER_EVENT(ocfs2_dismount_volume);
1706
1707TRACE_EVENT(ocfs2_initialize_super,
1708 TP_PROTO(char *label, char *uuid_str, unsigned long long root_dir,
1709 unsigned long long system_dir, int cluster_bits),
1710 TP_ARGS(label, uuid_str, root_dir, system_dir, cluster_bits),
1711 TP_STRUCT__entry(
1712 __string(label, label)
1713 __string(uuid_str, uuid_str)
1714 __field(unsigned long long, root_dir)
1715 __field(unsigned long long, system_dir)
1716 __field(int, cluster_bits)
1717 ),
1718 TP_fast_assign(
1719 __assign_str(label, label);
1720 __assign_str(uuid_str, uuid_str);
1721 __entry->root_dir = root_dir;
1722 __entry->system_dir = system_dir;
1723 __entry->cluster_bits = cluster_bits;
1724 ),
1725 TP_printk("%s %s %llu %llu %d", __get_str(label), __get_str(uuid_str),
1726 __entry->root_dir, __entry->system_dir, __entry->cluster_bits)
1727);
1728
1729/* End of trace events for fs/ocfs2/super.c. */
Tao Ma402b4182011-02-23 22:01:17 +08001730
1731/* Trace events for fs/ocfs2/xattr.c. */
1732
1733DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_xattr_block);
1734
1735DEFINE_OCFS2_UINT_EVENT(ocfs2_xattr_extend_allocation);
1736
1737TRACE_EVENT(ocfs2_init_xattr_set_ctxt,
1738 TP_PROTO(const char *name, int meta, int clusters, int credits),
1739 TP_ARGS(name, meta, clusters, credits),
1740 TP_STRUCT__entry(
1741 __string(name, name)
1742 __field(int, meta)
1743 __field(int, clusters)
1744 __field(int, credits)
1745 ),
1746 TP_fast_assign(
1747 __assign_str(name, name);
1748 __entry->meta = meta;
1749 __entry->clusters = clusters;
1750 __entry->credits = credits;
1751 ),
1752 TP_printk("%s %d %d %d", __get_str(name), __entry->meta,
1753 __entry->clusters, __entry->credits)
1754);
1755
1756DECLARE_EVENT_CLASS(ocfs2__xattr_find,
1757 TP_PROTO(unsigned long long ino, const char *name, int name_index,
1758 unsigned int hash, unsigned long long location,
1759 int xe_index),
1760 TP_ARGS(ino, name, name_index, hash, location, xe_index),
1761 TP_STRUCT__entry(
1762 __field(unsigned long long, ino)
1763 __string(name, name)
1764 __field(int, name_index)
1765 __field(unsigned int, hash)
1766 __field(unsigned long long, location)
1767 __field(int, xe_index)
1768 ),
1769 TP_fast_assign(
1770 __entry->ino = ino;
1771 __assign_str(name, name);
1772 __entry->name_index = name_index;
1773 __entry->hash = hash;
1774 __entry->location = location;
1775 __entry->xe_index = xe_index;
1776 ),
1777 TP_printk("%llu %s %d %u %llu %d", __entry->ino, __get_str(name),
1778 __entry->name_index, __entry->hash, __entry->location,
1779 __entry->xe_index)
1780);
1781
1782#define DEFINE_OCFS2_XATTR_FIND_EVENT(name) \
1783DEFINE_EVENT(ocfs2__xattr_find, name, \
1784TP_PROTO(unsigned long long ino, const char *name, int name_index, \
1785 unsigned int hash, unsigned long long bucket, \
1786 int xe_index), \
1787 TP_ARGS(ino, name, name_index, hash, bucket, xe_index))
1788
1789DEFINE_OCFS2_XATTR_FIND_EVENT(ocfs2_xattr_bucket_find);
1790
1791DEFINE_OCFS2_XATTR_FIND_EVENT(ocfs2_xattr_index_block_find);
1792
1793DEFINE_OCFS2_XATTR_FIND_EVENT(ocfs2_xattr_index_block_find_rec);
1794
1795DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_iterate_xattr_buckets);
1796
1797DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_iterate_xattr_bucket);
1798
1799DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_cp_xattr_block_to_bucket_begin);
1800
1801DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_cp_xattr_block_to_bucket_end);
1802
1803DEFINE_OCFS2_ULL_EVENT(ocfs2_xattr_create_index_block_begin);
1804
1805DEFINE_OCFS2_ULL_EVENT(ocfs2_xattr_create_index_block);
1806
1807DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_defrag_xattr_bucket);
1808
1809DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_mv_xattr_bucket_cross_cluster);
1810
1811DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_divide_xattr_bucket_begin);
1812
1813DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_divide_xattr_bucket_move);
1814
1815DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_cp_xattr_bucket);
1816
1817DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_mv_xattr_buckets);
1818
1819DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_adjust_xattr_cross_cluster);
1820
1821DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(ocfs2_add_new_xattr_cluster_begin);
1822
1823DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_add_new_xattr_cluster);
1824
1825DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_add_new_xattr_cluster_insert);
1826
1827DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(ocfs2_extend_xattr_bucket);
1828
1829DEFINE_OCFS2_ULL_EVENT(ocfs2_add_new_xattr_bucket);
1830
1831DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_xattr_bucket_value_truncate);
1832
1833DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(ocfs2_rm_xattr_cluster);
1834
1835DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_reflink_xattr_header);
1836
1837DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_create_empty_xattr_block);
1838
1839DEFINE_OCFS2_STRING_EVENT(ocfs2_xattr_set_entry_bucket);
1840
1841DEFINE_OCFS2_STRING_EVENT(ocfs2_xattr_set_entry_index_block);
1842
1843DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_xattr_bucket_value_refcount);
1844
1845DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_reflink_xattr_buckets);
1846
1847DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_reflink_xattr_rec);
1848
1849/* End of trace events for fs/ocfs2/xattr.c. */
Tao Ma26618362011-02-23 22:10:56 +08001850
1851/* Trace events for fs/ocfs2/reservations.c. */
1852
1853DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_resv_insert);
1854
1855DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_resmap_find_free_bits_begin);
1856
1857DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_resmap_find_free_bits_end);
1858
1859TRACE_EVENT(ocfs2_resv_find_window_begin,
1860 TP_PROTO(unsigned int r_start, unsigned int r_end, unsigned int goal,
1861 unsigned int wanted, int empty_root),
1862 TP_ARGS(r_start, r_end, goal, wanted, empty_root),
1863 TP_STRUCT__entry(
1864 __field(unsigned int, r_start)
1865 __field(unsigned int, r_end)
1866 __field(unsigned int, goal)
1867 __field(unsigned int, wanted)
1868 __field(int, empty_root)
1869 ),
1870 TP_fast_assign(
1871 __entry->r_start = r_start;
1872 __entry->r_end = r_end;
1873 __entry->goal = goal;
1874 __entry->wanted = wanted;
1875 __entry->empty_root = empty_root;
1876 ),
1877 TP_printk("%u %u %u %u %d", __entry->r_start, __entry->r_end,
1878 __entry->goal, __entry->wanted, __entry->empty_root)
1879);
1880
1881DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_resv_find_window_prev);
1882
1883DEFINE_OCFS2_INT_INT_EVENT(ocfs2_resv_find_window_next);
1884
1885DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_cannibalize_resv_begin);
1886
1887TRACE_EVENT(ocfs2_cannibalize_resv_end,
1888 TP_PROTO(unsigned int start, unsigned int end, unsigned int len,
1889 unsigned int last_start, unsigned int last_len),
1890 TP_ARGS(start, end, len, last_start, last_len),
1891 TP_STRUCT__entry(
1892 __field(unsigned int, start)
1893 __field(unsigned int, end)
1894 __field(unsigned int, len)
1895 __field(unsigned int, last_start)
1896 __field(unsigned int, last_len)
1897 ),
1898 TP_fast_assign(
1899 __entry->start = start;
1900 __entry->end = end;
1901 __entry->len = len;
1902 __entry->last_start = last_start;
1903 __entry->last_len = last_len;
1904 ),
1905 TP_printk("%u %u %u %u %u", __entry->start, __entry->end,
1906 __entry->len, __entry->last_start, __entry->last_len)
1907);
1908
1909DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_resmap_resv_bits);
1910
1911TRACE_EVENT(ocfs2_resmap_claimed_bits_begin,
1912 TP_PROTO(unsigned int cstart, unsigned int cend, unsigned int clen,
1913 unsigned int r_start, unsigned int r_end, unsigned int r_len,
1914 unsigned int last_start, unsigned int last_len),
1915 TP_ARGS(cstart, cend, clen, r_start, r_end,
1916 r_len, last_start, last_len),
1917 TP_STRUCT__entry(
1918 __field(unsigned int, cstart)
1919 __field(unsigned int, cend)
1920 __field(unsigned int, clen)
1921 __field(unsigned int, r_start)
1922 __field(unsigned int, r_end)
1923 __field(unsigned int, r_len)
1924 __field(unsigned int, last_start)
1925 __field(unsigned int, last_len)
1926 ),
1927 TP_fast_assign(
1928 __entry->cstart = cstart;
1929 __entry->cend = cend;
1930 __entry->clen = clen;
1931 __entry->r_start = r_start;
1932 __entry->r_end = r_end;
1933 __entry->r_len = r_len;
1934 __entry->last_start = last_start;
1935 __entry->last_len = last_len;
1936 ),
1937 TP_printk("%u %u %u %u %u %u %u %u",
1938 __entry->cstart, __entry->cend, __entry->clen,
1939 __entry->r_start, __entry->r_end, __entry->r_len,
1940 __entry->last_start, __entry->last_len)
1941);
1942
1943TRACE_EVENT(ocfs2_resmap_claimed_bits_end,
1944 TP_PROTO(unsigned int start, unsigned int end, unsigned int len,
1945 unsigned int last_start, unsigned int last_len),
1946 TP_ARGS(start, end, len, last_start, last_len),
1947 TP_STRUCT__entry(
1948 __field(unsigned int, start)
1949 __field(unsigned int, end)
1950 __field(unsigned int, len)
1951 __field(unsigned int, last_start)
1952 __field(unsigned int, last_len)
1953 ),
1954 TP_fast_assign(
1955 __entry->start = start;
1956 __entry->end = end;
1957 __entry->len = len;
1958 __entry->last_start = last_start;
1959 __entry->last_len = last_len;
1960 ),
1961 TP_printk("%u %u %u %u %u", __entry->start, __entry->end,
1962 __entry->len, __entry->last_start, __entry->last_len)
1963);
1964
1965/* End of trace events for fs/ocfs2/reservations.c. */
Tao Ma38877a42011-02-23 22:12:48 +08001966
1967/* Trace events for fs/ocfs2/quota_local.c. */
1968
1969DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_recover_local_quota_file);
1970
1971DEFINE_OCFS2_INT_EVENT(ocfs2_finish_quota_recovery);
1972
1973DEFINE_OCFS2_ULL_ULL_UINT_EVENT(olq_set_dquot);
1974
1975/* End of trace events for fs/ocfs2/quota_local.c. */
Tao Ma1db986a2011-02-23 22:19:12 +08001976
1977/* Trace events for fs/ocfs2/quota_global.c. */
1978
1979DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_quota_block);
1980
1981TRACE_EVENT(ocfs2_sync_dquot,
1982 TP_PROTO(unsigned int dq_id, long long dqb_curspace,
1983 long long spacechange, long long curinodes,
1984 long long inodechange),
1985 TP_ARGS(dq_id, dqb_curspace, spacechange, curinodes, inodechange),
1986 TP_STRUCT__entry(
1987 __field(unsigned int, dq_id)
1988 __field(long long, dqb_curspace)
1989 __field(long long, spacechange)
1990 __field(long long, curinodes)
1991 __field(long long, inodechange)
1992 ),
1993 TP_fast_assign(
1994 __entry->dq_id = dq_id;
1995 __entry->dqb_curspace = dqb_curspace;
1996 __entry->spacechange = spacechange;
1997 __entry->curinodes = curinodes;
1998 __entry->inodechange = inodechange;
1999 ),
2000 TP_printk("%u %lld %lld %lld %lld", __entry->dq_id,
2001 __entry->dqb_curspace, __entry->spacechange,
2002 __entry->curinodes, __entry->inodechange)
2003);
2004
2005TRACE_EVENT(ocfs2_sync_dquot_helper,
2006 TP_PROTO(unsigned int dq_id, unsigned int dq_type, unsigned long type,
2007 const char *s_id),
2008 TP_ARGS(dq_id, dq_type, type, s_id),
2009
2010 TP_STRUCT__entry(
2011 __field(unsigned int, dq_id)
2012 __field(unsigned int, dq_type)
2013 __field(unsigned long, type)
2014 __string(s_id, s_id)
2015 ),
2016 TP_fast_assign(
2017 __entry->dq_id = dq_id;
2018 __entry->dq_type = dq_type;
2019 __entry->type = type;
2020 __assign_str(s_id, s_id);
2021 ),
2022 TP_printk("%u %u %lu %s", __entry->dq_id, __entry->dq_type,
2023 __entry->type, __get_str(s_id))
2024);
2025
2026DEFINE_OCFS2_UINT_INT_EVENT(ocfs2_write_dquot);
2027
2028DEFINE_OCFS2_UINT_INT_EVENT(ocfs2_release_dquot);
2029
2030DEFINE_OCFS2_UINT_INT_EVENT(ocfs2_acquire_dquot);
2031
Jan Kara5a9530e2016-02-04 14:50:26 +01002032DEFINE_OCFS2_UINT_INT_EVENT(ocfs2_get_next_id);
2033
Tao Ma1db986a2011-02-23 22:19:12 +08002034DEFINE_OCFS2_UINT_INT_EVENT(ocfs2_mark_dquot_dirty);
2035
2036/* End of trace events for fs/ocfs2/quota_global.c. */
Tao Maf1088d42011-02-23 22:30:23 +08002037
2038/* Trace events for fs/ocfs2/dir.c. */
2039DEFINE_OCFS2_INT_EVENT(ocfs2_search_dirblock);
2040
2041DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_dir_block);
2042
2043DEFINE_OCFS2_POINTER_EVENT(ocfs2_find_entry_el);
2044
2045TRACE_EVENT(ocfs2_dx_dir_search,
2046 TP_PROTO(unsigned long long ino, int namelen, const char *name,
2047 unsigned int major_hash, unsigned int minor_hash,
2048 unsigned long long blkno),
2049 TP_ARGS(ino, namelen, name, major_hash, minor_hash, blkno),
2050 TP_STRUCT__entry(
2051 __field(unsigned long long, ino)
2052 __field(int, namelen)
2053 __string(name, name)
2054 __field(unsigned int, major_hash)
2055 __field(unsigned int,minor_hash)
2056 __field(unsigned long long, blkno)
2057 ),
2058 TP_fast_assign(
2059 __entry->ino = ino;
2060 __entry->namelen = namelen;
2061 __assign_str(name, name);
2062 __entry->major_hash = major_hash;
2063 __entry->minor_hash = minor_hash;
2064 __entry->blkno = blkno;
2065 ),
2066 TP_printk("%llu %.*s %u %u %llu", __entry->ino,
2067 __entry->namelen, __get_str(name),
2068 __entry->major_hash, __entry->minor_hash, __entry->blkno)
2069);
2070
2071DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_dx_dir_search_leaf_info);
2072
2073DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_delete_entry_dx);
2074
2075DEFINE_OCFS2_ULL_EVENT(ocfs2_readdir);
2076
2077TRACE_EVENT(ocfs2_find_files_on_disk,
2078 TP_PROTO(int namelen, const char *name, void *blkno,
2079 unsigned long long dir),
2080 TP_ARGS(namelen, name, blkno, dir),
2081 TP_STRUCT__entry(
2082 __field(int, namelen)
2083 __string(name, name)
2084 __field(void *, blkno)
2085 __field(unsigned long long, dir)
2086 ),
2087 TP_fast_assign(
2088 __entry->namelen = namelen;
2089 __assign_str(name, name);
2090 __entry->blkno = blkno;
2091 __entry->dir = dir;
2092 ),
2093 TP_printk("%.*s %p %llu", __entry->namelen, __get_str(name),
2094 __entry->blkno, __entry->dir)
2095);
2096
2097TRACE_EVENT(ocfs2_check_dir_for_entry,
2098 TP_PROTO(unsigned long long dir, int namelen, const char *name),
2099 TP_ARGS(dir, namelen, name),
2100 TP_STRUCT__entry(
2101 __field(unsigned long long, dir)
2102 __field(int, namelen)
2103 __string(name, name)
2104 ),
2105 TP_fast_assign(
2106 __entry->dir = dir;
2107 __entry->namelen = namelen;
2108 __assign_str(name, name);
2109 ),
2110 TP_printk("%llu %.*s", __entry->dir,
2111 __entry->namelen, __get_str(name))
2112);
2113
2114DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_dx_dir_attach_index);
2115
2116DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_dx_dir_format_cluster);
2117
2118TRACE_EVENT(ocfs2_dx_dir_index_root_block,
2119 TP_PROTO(unsigned long long dir,
2120 unsigned int major_hash, unsigned int minor_hash,
2121 int namelen, const char *name, unsigned int num_used),
2122 TP_ARGS(dir, major_hash, minor_hash, namelen, name, num_used),
2123 TP_STRUCT__entry(
2124 __field(unsigned long long, dir)
2125 __field(unsigned int, major_hash)
2126 __field(unsigned int, minor_hash)
2127 __field(int, namelen)
2128 __string(name, name)
2129 __field(unsigned int, num_used)
2130 ),
2131 TP_fast_assign(
2132 __entry->dir = dir;
2133 __entry->major_hash = major_hash;
2134 __entry->minor_hash = minor_hash;
2135 __entry->namelen = namelen;
2136 __assign_str(name, name);
2137 __entry->num_used = num_used;
2138 ),
2139 TP_printk("%llu %x %x %.*s %u", __entry->dir,
2140 __entry->major_hash, __entry->minor_hash,
2141 __entry->namelen, __get_str(name), __entry->num_used)
2142);
2143
2144DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_extend_dir);
2145
2146DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_dx_dir_rebalance);
2147
2148DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_dx_dir_rebalance_split);
2149
2150DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_prepare_dir_for_insert);
2151
2152/* End of trace events for fs/ocfs2/dir.c. */
Tao Ma8990e442011-02-23 22:45:26 +08002153
2154/* Trace events for fs/ocfs2/namei.c. */
2155
2156DECLARE_EVENT_CLASS(ocfs2__dentry_ops,
2157 TP_PROTO(void *dir, void *dentry, int name_len, const char *name,
2158 unsigned long long dir_blkno, unsigned long long extra),
2159 TP_ARGS(dir, dentry, name_len, name, dir_blkno, extra),
2160 TP_STRUCT__entry(
2161 __field(void *, dir)
2162 __field(void *, dentry)
2163 __field(int, name_len)
2164 __string(name, name)
2165 __field(unsigned long long, dir_blkno)
2166 __field(unsigned long long, extra)
2167 ),
2168 TP_fast_assign(
2169 __entry->dir = dir;
2170 __entry->dentry = dentry;
2171 __entry->name_len = name_len;
2172 __assign_str(name, name);
2173 __entry->dir_blkno = dir_blkno;
2174 __entry->extra = extra;
2175 ),
2176 TP_printk("%p %p %.*s %llu %llu", __entry->dir, __entry->dentry,
2177 __entry->name_len, __get_str(name),
2178 __entry->dir_blkno, __entry->extra)
2179);
2180
2181#define DEFINE_OCFS2_DENTRY_OPS(name) \
2182DEFINE_EVENT(ocfs2__dentry_ops, name, \
2183TP_PROTO(void *dir, void *dentry, int name_len, const char *name, \
2184 unsigned long long dir_blkno, unsigned long long extra), \
2185 TP_ARGS(dir, dentry, name_len, name, dir_blkno, extra))
2186
2187DEFINE_OCFS2_DENTRY_OPS(ocfs2_lookup);
2188
2189DEFINE_OCFS2_DENTRY_OPS(ocfs2_mkdir);
2190
2191DEFINE_OCFS2_DENTRY_OPS(ocfs2_create);
2192
2193DEFINE_OCFS2_DENTRY_OPS(ocfs2_unlink);
2194
2195DEFINE_OCFS2_DENTRY_OPS(ocfs2_symlink_create);
2196
2197DEFINE_OCFS2_DENTRY_OPS(ocfs2_mv_orphaned_inode_to_new);
2198
2199DEFINE_OCFS2_POINTER_EVENT(ocfs2_lookup_ret);
2200
2201TRACE_EVENT(ocfs2_mknod,
2202 TP_PROTO(void *dir, void *dentry, int name_len, const char *name,
2203 unsigned long long dir_blkno, unsigned long dev, int mode),
2204 TP_ARGS(dir, dentry, name_len, name, dir_blkno, dev, mode),
2205 TP_STRUCT__entry(
2206 __field(void *, dir)
2207 __field(void *, dentry)
2208 __field(int, name_len)
2209 __string(name, name)
2210 __field(unsigned long long, dir_blkno)
2211 __field(unsigned long, dev)
2212 __field(int, mode)
2213 ),
2214 TP_fast_assign(
2215 __entry->dir = dir;
2216 __entry->dentry = dentry;
2217 __entry->name_len = name_len;
2218 __assign_str(name, name);
2219 __entry->dir_blkno = dir_blkno;
2220 __entry->dev = dev;
2221 __entry->mode = mode;
2222 ),
2223 TP_printk("%p %p %.*s %llu %lu %d", __entry->dir, __entry->dentry,
2224 __entry->name_len, __get_str(name),
2225 __entry->dir_blkno, __entry->dev, __entry->mode)
2226);
2227
2228TRACE_EVENT(ocfs2_link,
2229 TP_PROTO(unsigned long long ino, int old_len, const char *old_name,
2230 int name_len, const char *name),
2231 TP_ARGS(ino, old_len, old_name, name_len, name),
2232 TP_STRUCT__entry(
2233 __field(unsigned long long, ino)
2234 __field(int, old_len)
2235 __string(old_name, old_name)
2236 __field(int, name_len)
2237 __string(name, name)
2238 ),
2239 TP_fast_assign(
2240 __entry->ino = ino;
2241 __entry->old_len = old_len;
2242 __assign_str(old_name, old_name);
2243 __entry->name_len = name_len;
2244 __assign_str(name, name);
2245 ),
2246 TP_printk("%llu %.*s %.*s", __entry->ino,
2247 __entry->old_len, __get_str(old_name),
2248 __entry->name_len, __get_str(name))
2249);
2250
2251DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_unlink_noent);
2252
2253DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_double_lock);
2254
2255DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_double_lock_end);
2256
2257TRACE_EVENT(ocfs2_rename,
2258 TP_PROTO(void *old_dir, void *old_dentry,
2259 void *new_dir, void *new_dentry,
2260 int old_len, const char *old_name,
2261 int new_len, const char *new_name),
2262 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry,
2263 old_len, old_name, new_len, new_name),
2264 TP_STRUCT__entry(
2265 __field(void *, old_dir)
2266 __field(void *, old_dentry)
2267 __field(void *, new_dir)
2268 __field(void *, new_dentry)
2269 __field(int, old_len)
2270 __string(old_name, old_name)
2271 __field(int, new_len)
2272 __string(new_name, new_name)
2273 ),
2274 TP_fast_assign(
2275 __entry->old_dir = old_dir;
2276 __entry->old_dentry = old_dentry;
2277 __entry->new_dir = new_dir;
2278 __entry->new_dentry = new_dentry;
2279 __entry->old_len = old_len;
2280 __assign_str(old_name, old_name);
2281 __entry->new_len = new_len;
2282 __assign_str(new_name, new_name);
2283 ),
2284 TP_printk("%p %p %p %p %.*s %.*s",
2285 __entry->old_dir, __entry->old_dentry,
2286 __entry->new_dir, __entry->new_dentry,
2287 __entry->old_len, __get_str(old_name),
2288 __entry->new_len, __get_str(new_name))
2289);
2290
Yiwen Jiangf7a14f32014-06-23 13:22:09 -07002291DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_rename_not_permitted);
2292
Tao Ma8990e442011-02-23 22:45:26 +08002293TRACE_EVENT(ocfs2_rename_target_exists,
2294 TP_PROTO(int new_len, const char *new_name),
2295 TP_ARGS(new_len, new_name),
2296 TP_STRUCT__entry(
2297 __field(int, new_len)
2298 __string(new_name, new_name)
2299 ),
2300 TP_fast_assign(
2301 __entry->new_len = new_len;
2302 __assign_str(new_name, new_name);
2303 ),
2304 TP_printk("%.*s", __entry->new_len, __get_str(new_name))
2305);
2306
2307DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_rename_disagree);
2308
2309TRACE_EVENT(ocfs2_rename_over_existing,
2310 TP_PROTO(unsigned long long new_blkno, void *new_bh,
2311 unsigned long long newdi_blkno),
2312 TP_ARGS(new_blkno, new_bh, newdi_blkno),
2313 TP_STRUCT__entry(
2314 __field(unsigned long long, new_blkno)
2315 __field(void *, new_bh)
2316 __field(unsigned long long, newdi_blkno)
2317 ),
2318 TP_fast_assign(
2319 __entry->new_blkno = new_blkno;
2320 __entry->new_bh = new_bh;
2321 __entry->newdi_blkno = newdi_blkno;
2322 ),
2323 TP_printk("%llu %p %llu", __entry->new_blkno, __entry->new_bh,
2324 __entry->newdi_blkno)
2325);
2326
2327DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_create_symlink_data);
2328
2329TRACE_EVENT(ocfs2_symlink_begin,
2330 TP_PROTO(void *dir, void *dentry, const char *symname,
2331 int len, const char *name),
2332 TP_ARGS(dir, dentry, symname, len, name),
2333 TP_STRUCT__entry(
2334 __field(void *, dir)
2335 __field(void *, dentry)
2336 __field(const char *, symname)
2337 __field(int, len)
2338 __string(name, name)
2339 ),
2340 TP_fast_assign(
2341 __entry->dir = dir;
2342 __entry->dentry = dentry;
2343 __entry->symname = symname;
2344 __entry->len = len;
2345 __assign_str(name, name);
2346 ),
2347 TP_printk("%p %p %s %.*s", __entry->dir, __entry->dentry,
2348 __entry->symname, __entry->len, __get_str(name))
2349);
2350
2351TRACE_EVENT(ocfs2_blkno_stringify,
2352 TP_PROTO(unsigned long long blkno, const char *name, int namelen),
2353 TP_ARGS(blkno, name, namelen),
2354 TP_STRUCT__entry(
2355 __field(unsigned long long, blkno)
2356 __string(name, name)
2357 __field(int, namelen)
2358 ),
2359 TP_fast_assign(
2360 __entry->blkno = blkno;
2361 __assign_str(name, name);
2362 __entry->namelen = namelen;
2363 ),
2364 TP_printk("%llu %s %d", __entry->blkno, __get_str(name),
2365 __entry->namelen)
2366);
2367
2368DEFINE_OCFS2_ULL_EVENT(ocfs2_orphan_add_begin);
2369
2370DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_orphan_add_end);
2371
2372TRACE_EVENT(ocfs2_orphan_del,
2373 TP_PROTO(unsigned long long dir, const char *name, int namelen),
2374 TP_ARGS(dir, name, namelen),
2375 TP_STRUCT__entry(
2376 __field(unsigned long long, dir)
2377 __string(name, name)
2378 __field(int, namelen)
2379 ),
2380 TP_fast_assign(
2381 __entry->dir = dir;
2382 __assign_str(name, name);
2383 __entry->namelen = namelen;
2384 ),
2385 TP_printk("%llu %s %d", __entry->dir, __get_str(name),
2386 __entry->namelen)
2387);
2388
2389/* End of trace events for fs/ocfs2/namei.c. */
Tao Maa5b84432011-02-23 22:51:49 +08002390
2391/* Trace events for fs/ocfs2/dcache.c. */
2392
2393TRACE_EVENT(ocfs2_dentry_revalidate,
2394 TP_PROTO(void *dentry, int len, const char *name),
2395 TP_ARGS(dentry, len, name),
2396 TP_STRUCT__entry(
2397 __field(void *, dentry)
2398 __field(int, len)
2399 __string(name, name)
2400 ),
2401 TP_fast_assign(
2402 __entry->dentry = dentry;
2403 __entry->len = len;
2404 __assign_str(name, name);
2405 ),
2406 TP_printk("%p %.*s", __entry->dentry, __entry->len, __get_str(name))
2407);
2408
2409TRACE_EVENT(ocfs2_dentry_revalidate_negative,
2410 TP_PROTO(int len, const char *name, unsigned long pgen,
2411 unsigned long gen),
2412 TP_ARGS(len, name, pgen, gen),
2413 TP_STRUCT__entry(
2414 __field(int, len)
2415 __string(name, name)
2416 __field(unsigned long, pgen)
2417 __field(unsigned long, gen)
2418 ),
2419 TP_fast_assign(
2420 __entry->len = len;
2421 __assign_str(name, name);
2422 __entry->pgen = pgen;
2423 __entry->gen = gen;
2424 ),
2425 TP_printk("%.*s %lu %lu", __entry->len, __get_str(name),
2426 __entry->pgen, __entry->gen)
2427);
2428
2429DEFINE_OCFS2_ULL_EVENT(ocfs2_dentry_revalidate_delete);
2430
2431DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_dentry_revalidate_orphaned);
2432
2433DEFINE_OCFS2_ULL_EVENT(ocfs2_dentry_revalidate_nofsdata);
2434
2435DEFINE_OCFS2_INT_EVENT(ocfs2_dentry_revalidate_ret);
2436
2437TRACE_EVENT(ocfs2_find_local_alias,
2438 TP_PROTO(int len, const char *name),
2439 TP_ARGS(len, name),
2440 TP_STRUCT__entry(
2441 __field(int, len)
2442 __string(name, name)
2443 ),
2444 TP_fast_assign(
2445 __entry->len = len;
2446 __assign_str(name, name);
2447 ),
2448 TP_printk("%.*s", __entry->len, __get_str(name))
2449);
2450
2451TRACE_EVENT(ocfs2_dentry_attach_lock,
2452 TP_PROTO(int len, const char *name,
2453 unsigned long long parent, void *fsdata),
2454 TP_ARGS(len, name, parent, fsdata),
2455 TP_STRUCT__entry(
2456 __field(int, len)
2457 __string(name, name)
2458 __field(unsigned long long, parent)
2459 __field(void *, fsdata)
2460 ),
2461 TP_fast_assign(
2462 __entry->len = len;
2463 __assign_str(name, name);
2464 __entry->parent = parent;
2465 __entry->fsdata = fsdata;
2466 ),
2467 TP_printk("%.*s %llu %p", __entry->len, __get_str(name),
2468 __entry->parent, __entry->fsdata)
2469);
2470
2471TRACE_EVENT(ocfs2_dentry_attach_lock_found,
2472 TP_PROTO(const char *name, unsigned long long parent,
2473 unsigned long long ino),
2474 TP_ARGS(name, parent, ino),
2475 TP_STRUCT__entry(
2476 __string(name, name)
2477 __field(unsigned long long, parent)
2478 __field(unsigned long long, ino)
2479 ),
2480 TP_fast_assign(
2481 __assign_str(name, name);
2482 __entry->parent = parent;
2483 __entry->ino = ino;
2484 ),
2485 TP_printk("%s %llu %llu", __get_str(name), __entry->parent, __entry->ino)
2486);
Tao Maa5b84432011-02-23 22:51:49 +08002487/* End of trace events for fs/ocfs2/dcache.c. */
Tao Ma781f2002011-02-24 13:50:19 +08002488
2489/* Trace events for fs/ocfs2/export.c. */
2490
2491TRACE_EVENT(ocfs2_get_dentry_begin,
2492 TP_PROTO(void *sb, void *handle, unsigned long long blkno),
2493 TP_ARGS(sb, handle, blkno),
2494 TP_STRUCT__entry(
2495 __field(void *, sb)
2496 __field(void *, handle)
2497 __field(unsigned long long, blkno)
2498 ),
2499 TP_fast_assign(
2500 __entry->sb = sb;
2501 __entry->handle = handle;
2502 __entry->blkno = blkno;
2503 ),
2504 TP_printk("%p %p %llu", __entry->sb, __entry->handle, __entry->blkno)
2505);
2506
2507DEFINE_OCFS2_INT_INT_EVENT(ocfs2_get_dentry_test_bit);
2508
2509DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_get_dentry_stale);
2510
2511DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_get_dentry_generation);
2512
2513DEFINE_OCFS2_POINTER_EVENT(ocfs2_get_dentry_end);
2514
2515TRACE_EVENT(ocfs2_get_parent,
2516 TP_PROTO(void *child, int len, const char *name,
2517 unsigned long long ino),
2518 TP_ARGS(child, len, name, ino),
2519 TP_STRUCT__entry(
2520 __field(void *, child)
2521 __field(int, len)
2522 __string(name, name)
2523 __field(unsigned long long, ino)
2524 ),
2525 TP_fast_assign(
2526 __entry->child = child;
2527 __entry->len = len;
2528 __assign_str(name, name);
2529 __entry->ino = ino;
2530 ),
2531 TP_printk("%p %.*s %llu", __entry->child, __entry->len,
2532 __get_str(name), __entry->ino)
2533);
2534
2535DEFINE_OCFS2_POINTER_EVENT(ocfs2_get_parent_end);
2536
2537TRACE_EVENT(ocfs2_encode_fh_begin,
2538 TP_PROTO(void *dentry, int name_len, const char *name,
2539 void *fh, int len, int connectable),
2540 TP_ARGS(dentry, name_len, name, fh, len, connectable),
2541 TP_STRUCT__entry(
2542 __field(void *, dentry)
2543 __field(int, name_len)
2544 __string(name, name)
2545 __field(void *, fh)
2546 __field(int, len)
2547 __field(int, connectable)
2548 ),
2549 TP_fast_assign(
2550 __entry->dentry = dentry;
2551 __entry->name_len = name_len;
2552 __assign_str(name, name);
2553 __entry->fh = fh;
2554 __entry->len = len;
2555 __entry->connectable = connectable;
2556 ),
2557 TP_printk("%p %.*s %p %d %d", __entry->dentry, __entry->name_len,
2558 __get_str(name), __entry->fh, __entry->len,
2559 __entry->connectable)
2560);
2561
2562DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_encode_fh_self);
2563
2564DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_encode_fh_parent);
2565
2566DEFINE_OCFS2_INT_EVENT(ocfs2_encode_fh_type);
2567
2568/* End of trace events for fs/ocfs2/export.c. */
Tao Mab4107952011-02-24 14:15:35 +08002569
2570/* Trace events for fs/ocfs2/journal.c. */
2571
2572DEFINE_OCFS2_UINT_EVENT(ocfs2_commit_cache_begin);
2573
2574DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_commit_cache_end);
2575
2576DEFINE_OCFS2_INT_INT_EVENT(ocfs2_extend_trans);
2577
2578DEFINE_OCFS2_INT_EVENT(ocfs2_extend_trans_restart);
2579
Younger Liu2b1e55c2013-09-11 14:19:44 -07002580DEFINE_OCFS2_INT_INT_EVENT(ocfs2_allocate_extend_trans);
2581
Tao Mab4107952011-02-24 14:15:35 +08002582DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(ocfs2_journal_access);
2583
2584DEFINE_OCFS2_ULL_EVENT(ocfs2_journal_dirty);
2585
2586DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_journal_init);
2587
2588DEFINE_OCFS2_UINT_EVENT(ocfs2_journal_init_maxlen);
2589
2590DEFINE_OCFS2_INT_EVENT(ocfs2_journal_shutdown);
2591
2592DEFINE_OCFS2_POINTER_EVENT(ocfs2_journal_shutdown_wait);
2593
2594DEFINE_OCFS2_ULL_EVENT(ocfs2_complete_recovery);
2595
2596DEFINE_OCFS2_INT_EVENT(ocfs2_complete_recovery_end);
2597
2598TRACE_EVENT(ocfs2_complete_recovery_slot,
2599 TP_PROTO(int slot, unsigned long long la_ino,
2600 unsigned long long tl_ino, void *qrec),
2601 TP_ARGS(slot, la_ino, tl_ino, qrec),
2602 TP_STRUCT__entry(
2603 __field(int, slot)
2604 __field(unsigned long long, la_ino)
2605 __field(unsigned long long, tl_ino)
2606 __field(void *, qrec)
2607 ),
2608 TP_fast_assign(
2609 __entry->slot = slot;
2610 __entry->la_ino = la_ino;
2611 __entry->tl_ino = tl_ino;
2612 __entry->qrec = qrec;
2613 ),
2614 TP_printk("%d %llu %llu %p", __entry->slot, __entry->la_ino,
2615 __entry->tl_ino, __entry->qrec)
2616);
2617
2618DEFINE_OCFS2_INT_INT_EVENT(ocfs2_recovery_thread_node);
2619
2620DEFINE_OCFS2_INT_EVENT(ocfs2_recovery_thread_end);
2621
2622TRACE_EVENT(ocfs2_recovery_thread,
2623 TP_PROTO(int node_num, int osb_node_num, int disable,
2624 void *recovery_thread, int map_set),
2625 TP_ARGS(node_num, osb_node_num, disable, recovery_thread, map_set),
2626 TP_STRUCT__entry(
2627 __field(int, node_num)
2628 __field(int, osb_node_num)
2629 __field(int,disable)
2630 __field(void *, recovery_thread)
2631 __field(int,map_set)
2632 ),
2633 TP_fast_assign(
2634 __entry->node_num = node_num;
2635 __entry->osb_node_num = osb_node_num;
2636 __entry->disable = disable;
2637 __entry->recovery_thread = recovery_thread;
2638 __entry->map_set = map_set;
2639 ),
2640 TP_printk("%d %d %d %p %d", __entry->node_num,
2641 __entry->osb_node_num, __entry->disable,
2642 __entry->recovery_thread, __entry->map_set)
2643);
2644
2645DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_replay_journal_recovered);
2646
2647DEFINE_OCFS2_INT_EVENT(ocfs2_replay_journal_lock_err);
2648
2649DEFINE_OCFS2_INT_EVENT(ocfs2_replay_journal_skip);
2650
2651DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_recover_node);
2652
2653DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_recover_node_skip);
2654
2655DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_mark_dead_nodes);
2656
2657DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_queue_orphan_scan_begin);
2658
2659DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_queue_orphan_scan_end);
2660
2661DEFINE_OCFS2_ULL_EVENT(ocfs2_orphan_filldir);
2662
2663DEFINE_OCFS2_INT_EVENT(ocfs2_recover_orphans);
2664
2665DEFINE_OCFS2_ULL_EVENT(ocfs2_recover_orphans_iput);
2666
2667DEFINE_OCFS2_INT_EVENT(ocfs2_wait_on_mount);
2668
2669/* End of trace events for fs/ocfs2/journal.c. */
Tao Ma15057e92011-02-24 16:09:38 +08002670
2671/* Trace events for fs/ocfs2/buffer_head_io.c. */
2672
2673DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_read_blocks_sync);
2674
2675DEFINE_OCFS2_ULL_EVENT(ocfs2_read_blocks_sync_jbd);
2676
Tao Mad7014852011-02-24 16:22:20 +08002677DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_read_blocks_from_disk);
2678
Tao Ma15057e92011-02-24 16:09:38 +08002679DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_read_blocks_bh);
2680
2681DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_read_blocks_end);
2682
2683TRACE_EVENT(ocfs2_write_block,
2684 TP_PROTO(unsigned long long block, void *ci),
2685 TP_ARGS(block, ci),
2686 TP_STRUCT__entry(
2687 __field(unsigned long long, block)
2688 __field(void *, ci)
2689 ),
2690 TP_fast_assign(
2691 __entry->block = block;
2692 __entry->ci = ci;
2693 ),
2694 TP_printk("%llu %p", __entry->block, __entry->ci)
2695);
2696
2697TRACE_EVENT(ocfs2_read_blocks_begin,
2698 TP_PROTO(void *ci, unsigned long long block,
2699 unsigned int nr, int flags),
2700 TP_ARGS(ci, block, nr, flags),
2701 TP_STRUCT__entry(
2702 __field(void *, ci)
2703 __field(unsigned long long, block)
2704 __field(unsigned int, nr)
2705 __field(int, flags)
2706 ),
2707 TP_fast_assign(
2708 __entry->ci = ci;
2709 __entry->block = block;
2710 __entry->nr = nr;
2711 __entry->flags = flags;
2712 ),
2713 TP_printk("%p %llu %u %d", __entry->ci, __entry->block,
2714 __entry->nr, __entry->flags)
2715);
2716
2717/* End of trace events for fs/ocfs2/buffer_head_io.c. */
Tao Mad7014852011-02-24 16:22:20 +08002718
2719/* Trace events for fs/ocfs2/uptodate.c. */
2720
2721DEFINE_OCFS2_ULL_EVENT(ocfs2_purge_copied_metadata_tree);
2722
2723DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_metadata_cache_purge);
2724
2725DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_buffer_cached_begin);
2726
2727TRACE_EVENT(ocfs2_buffer_cached_end,
2728 TP_PROTO(int index, void *item),
2729 TP_ARGS(index, item),
2730 TP_STRUCT__entry(
2731 __field(int, index)
2732 __field(void *, item)
2733 ),
2734 TP_fast_assign(
2735 __entry->index = index;
2736 __entry->item = item;
2737 ),
2738 TP_printk("%d %p", __entry->index, __entry->item)
2739);
2740
2741DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_append_cache_array);
2742
2743DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_insert_cache_tree);
2744
2745DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_expand_cache);
2746
2747DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_set_buffer_uptodate);
2748
2749DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_set_buffer_uptodate_begin);
2750
2751DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_remove_metadata_array);
2752
2753DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_remove_metadata_tree);
2754
2755DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(ocfs2_remove_block_from_cache);
2756
2757/* End of trace events for fs/ocfs2/uptodate.c. */
Wengang Wang80a9a842011-02-21 11:13:14 +08002758#endif /* _TRACE_OCFS2_H */
2759
2760/* This part must be outside protection */
2761#undef TRACE_INCLUDE_PATH
2762#define TRACE_INCLUDE_PATH .
2763#define TRACE_INCLUDE_FILE ocfs2_trace
2764#include <trace/define_trace.h>