2 * Copyright (c) 2009, Christoph Hellwig
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 #define TRACE_SYSTEM xfs
21 #if !defined(_TRACE_XFS_H) || defined(TRACE_HEADER_MULTI_READ)
24 #include <linux/tracepoint.h>
28 struct xfs_attr_list_context
;
29 struct xfs_buf_log_item
;
31 struct xfs_da_node_entry
;
37 struct xlog_recover_item
;
38 struct xfs_buf_log_format
;
39 struct xfs_inode_log_format
;
42 DECLARE_EVENT_CLASS(xfs_attr_list_class
,
43 TP_PROTO(struct xfs_attr_list_context
*ctx
),
47 __field(xfs_ino_t
, ino
)
51 __field(void *, alist
)
59 __entry
->dev
= VFS_I(ctx
->dp
)->i_sb
->s_dev
;
60 __entry
->ino
= ctx
->dp
->i_ino
;
61 __entry
->hashval
= ctx
->cursor
->hashval
;
62 __entry
->blkno
= ctx
->cursor
->blkno
;
63 __entry
->offset
= ctx
->cursor
->offset
;
64 __entry
->alist
= ctx
->alist
;
65 __entry
->bufsize
= ctx
->bufsize
;
66 __entry
->count
= ctx
->count
;
67 __entry
->firstu
= ctx
->firstu
;
68 __entry
->flags
= ctx
->flags
;
70 TP_printk("dev %d:%d ino 0x%llx cursor h/b/o 0x%x/0x%x/%u dupcnt %u "
71 "alist 0x%p size %u count %u firstu %u flags %d %s",
72 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
83 __print_flags(__entry
->flags
, "|", XFS_ATTR_FLAGS
)
87 #define DEFINE_ATTR_LIST_EVENT(name) \
88 DEFINE_EVENT(xfs_attr_list_class, name, \
89 TP_PROTO(struct xfs_attr_list_context *ctx), \
91 DEFINE_ATTR_LIST_EVENT(xfs_attr_list_sf
);
92 DEFINE_ATTR_LIST_EVENT(xfs_attr_list_sf_all
);
93 DEFINE_ATTR_LIST_EVENT(xfs_attr_list_leaf
);
94 DEFINE_ATTR_LIST_EVENT(xfs_attr_list_leaf_end
);
95 DEFINE_ATTR_LIST_EVENT(xfs_attr_list_full
);
96 DEFINE_ATTR_LIST_EVENT(xfs_attr_list_add
);
97 DEFINE_ATTR_LIST_EVENT(xfs_attr_list_wrong_blk
);
98 DEFINE_ATTR_LIST_EVENT(xfs_attr_list_notfound
);
99 DEFINE_ATTR_LIST_EVENT(xfs_attr_leaf_list
);
100 DEFINE_ATTR_LIST_EVENT(xfs_attr_node_list
);
102 DECLARE_EVENT_CLASS(xfs_perag_class
,
103 TP_PROTO(struct xfs_mount
*mp
, xfs_agnumber_t agno
, int refcount
,
104 unsigned long caller_ip
),
105 TP_ARGS(mp
, agno
, refcount
, caller_ip
),
108 __field(xfs_agnumber_t
, agno
)
109 __field(int, refcount
)
110 __field(unsigned long, caller_ip
)
113 __entry
->dev
= mp
->m_super
->s_dev
;
114 __entry
->agno
= agno
;
115 __entry
->refcount
= refcount
;
116 __entry
->caller_ip
= caller_ip
;
118 TP_printk("dev %d:%d agno %u refcount %d caller %pf",
119 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
122 (char *)__entry
->caller_ip
)
125 #define DEFINE_PERAG_REF_EVENT(name) \
126 DEFINE_EVENT(xfs_perag_class, name, \
127 TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int refcount, \
128 unsigned long caller_ip), \
129 TP_ARGS(mp, agno, refcount, caller_ip))
130 DEFINE_PERAG_REF_EVENT(xfs_perag_get
);
131 DEFINE_PERAG_REF_EVENT(xfs_perag_get_tag
);
132 DEFINE_PERAG_REF_EVENT(xfs_perag_put
);
133 DEFINE_PERAG_REF_EVENT(xfs_perag_set_reclaim
);
134 DEFINE_PERAG_REF_EVENT(xfs_perag_clear_reclaim
);
135 DEFINE_PERAG_REF_EVENT(xfs_perag_set_eofblocks
);
136 DEFINE_PERAG_REF_EVENT(xfs_perag_clear_eofblocks
);
138 TRACE_EVENT(xfs_attr_list_node_descend
,
139 TP_PROTO(struct xfs_attr_list_context
*ctx
,
140 struct xfs_da_node_entry
*btree
),
144 __field(xfs_ino_t
, ino
)
145 __field(u32
, hashval
)
148 __field(void *, alist
)
149 __field(int, bufsize
)
154 __field(u32
, bt_hashval
)
155 __field(u32
, bt_before
)
158 __entry
->dev
= VFS_I(ctx
->dp
)->i_sb
->s_dev
;
159 __entry
->ino
= ctx
->dp
->i_ino
;
160 __entry
->hashval
= ctx
->cursor
->hashval
;
161 __entry
->blkno
= ctx
->cursor
->blkno
;
162 __entry
->offset
= ctx
->cursor
->offset
;
163 __entry
->alist
= ctx
->alist
;
164 __entry
->bufsize
= ctx
->bufsize
;
165 __entry
->count
= ctx
->count
;
166 __entry
->firstu
= ctx
->firstu
;
167 __entry
->flags
= ctx
->flags
;
168 __entry
->bt_hashval
= be32_to_cpu(btree
->hashval
);
169 __entry
->bt_before
= be32_to_cpu(btree
->before
);
171 TP_printk("dev %d:%d ino 0x%llx cursor h/b/o 0x%x/0x%x/%u dupcnt %u "
172 "alist 0x%p size %u count %u firstu %u flags %d %s "
173 "node hashval %u, node before %u",
174 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
185 __print_flags(__entry
->flags
, "|", XFS_ATTR_FLAGS
),
190 TRACE_EVENT(xfs_iext_insert
,
191 TP_PROTO(struct xfs_inode
*ip
, xfs_extnum_t idx
,
192 struct xfs_bmbt_irec
*r
, int state
, unsigned long caller_ip
),
193 TP_ARGS(ip
, idx
, r
, state
, caller_ip
),
196 __field(xfs_ino_t
, ino
)
197 __field(xfs_extnum_t
, idx
)
198 __field(xfs_fileoff_t
, startoff
)
199 __field(xfs_fsblock_t
, startblock
)
200 __field(xfs_filblks_t
, blockcount
)
201 __field(xfs_exntst_t
, state
)
202 __field(int, bmap_state
)
203 __field(unsigned long, caller_ip
)
206 __entry
->dev
= VFS_I(ip
)->i_sb
->s_dev
;
207 __entry
->ino
= ip
->i_ino
;
209 __entry
->startoff
= r
->br_startoff
;
210 __entry
->startblock
= r
->br_startblock
;
211 __entry
->blockcount
= r
->br_blockcount
;
212 __entry
->state
= r
->br_state
;
213 __entry
->bmap_state
= state
;
214 __entry
->caller_ip
= caller_ip
;
216 TP_printk("dev %d:%d ino 0x%llx state %s idx %ld "
217 "offset %lld block %lld count %lld flag %d caller %pf",
218 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
220 __print_flags(__entry
->bmap_state
, "|", XFS_BMAP_EXT_FLAGS
),
223 (__int64_t
)__entry
->startblock
,
226 (char *)__entry
->caller_ip
)
229 DECLARE_EVENT_CLASS(xfs_bmap_class
,
230 TP_PROTO(struct xfs_inode
*ip
, xfs_extnum_t idx
, int state
,
231 unsigned long caller_ip
),
232 TP_ARGS(ip
, idx
, state
, caller_ip
),
235 __field(xfs_ino_t
, ino
)
236 __field(xfs_extnum_t
, idx
)
237 __field(xfs_fileoff_t
, startoff
)
238 __field(xfs_fsblock_t
, startblock
)
239 __field(xfs_filblks_t
, blockcount
)
240 __field(xfs_exntst_t
, state
)
241 __field(int, bmap_state
)
242 __field(unsigned long, caller_ip
)
245 struct xfs_ifork
*ifp
= (state
& BMAP_ATTRFORK
) ?
246 ip
->i_afp
: &ip
->i_df
;
247 struct xfs_bmbt_irec r
;
249 xfs_bmbt_get_all(xfs_iext_get_ext(ifp
, idx
), &r
);
250 __entry
->dev
= VFS_I(ip
)->i_sb
->s_dev
;
251 __entry
->ino
= ip
->i_ino
;
253 __entry
->startoff
= r
.br_startoff
;
254 __entry
->startblock
= r
.br_startblock
;
255 __entry
->blockcount
= r
.br_blockcount
;
256 __entry
->state
= r
.br_state
;
257 __entry
->bmap_state
= state
;
258 __entry
->caller_ip
= caller_ip
;
260 TP_printk("dev %d:%d ino 0x%llx state %s idx %ld "
261 "offset %lld block %lld count %lld flag %d caller %pf",
262 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
264 __print_flags(__entry
->bmap_state
, "|", XFS_BMAP_EXT_FLAGS
),
267 (__int64_t
)__entry
->startblock
,
270 (char *)__entry
->caller_ip
)
273 #define DEFINE_BMAP_EVENT(name) \
274 DEFINE_EVENT(xfs_bmap_class, name, \
275 TP_PROTO(struct xfs_inode *ip, xfs_extnum_t idx, int state, \
276 unsigned long caller_ip), \
277 TP_ARGS(ip, idx, state, caller_ip))
278 DEFINE_BMAP_EVENT(xfs_iext_remove
);
279 DEFINE_BMAP_EVENT(xfs_bmap_pre_update
);
280 DEFINE_BMAP_EVENT(xfs_bmap_post_update
);
281 DEFINE_BMAP_EVENT(xfs_extlist
);
283 DECLARE_EVENT_CLASS(xfs_buf_class
,
284 TP_PROTO(struct xfs_buf
*bp
, unsigned long caller_ip
),
285 TP_ARGS(bp
, caller_ip
),
288 __field(xfs_daddr_t
, bno
)
291 __field(int, pincount
)
292 __field(unsigned, lockval
)
293 __field(unsigned, flags
)
294 __field(unsigned long, caller_ip
)
297 __entry
->dev
= bp
->b_target
->bt_dev
;
298 __entry
->bno
= bp
->b_bn
;
299 __entry
->nblks
= bp
->b_length
;
300 __entry
->hold
= atomic_read(&bp
->b_hold
);
301 __entry
->pincount
= atomic_read(&bp
->b_pin_count
);
302 __entry
->lockval
= bp
->b_sema
.count
;
303 __entry
->flags
= bp
->b_flags
;
304 __entry
->caller_ip
= caller_ip
;
306 TP_printk("dev %d:%d bno 0x%llx nblks 0x%x hold %d pincount %d "
307 "lock %d flags %s caller %pf",
308 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
309 (unsigned long long)__entry
->bno
,
314 __print_flags(__entry
->flags
, "|", XFS_BUF_FLAGS
),
315 (void *)__entry
->caller_ip
)
318 #define DEFINE_BUF_EVENT(name) \
319 DEFINE_EVENT(xfs_buf_class, name, \
320 TP_PROTO(struct xfs_buf *bp, unsigned long caller_ip), \
321 TP_ARGS(bp, caller_ip))
322 DEFINE_BUF_EVENT(xfs_buf_init
);
323 DEFINE_BUF_EVENT(xfs_buf_free
);
324 DEFINE_BUF_EVENT(xfs_buf_hold
);
325 DEFINE_BUF_EVENT(xfs_buf_rele
);
326 DEFINE_BUF_EVENT(xfs_buf_iodone
);
327 DEFINE_BUF_EVENT(xfs_buf_iorequest
);
328 DEFINE_BUF_EVENT(xfs_buf_bawrite
);
329 DEFINE_BUF_EVENT(xfs_buf_lock
);
330 DEFINE_BUF_EVENT(xfs_buf_lock_done
);
331 DEFINE_BUF_EVENT(xfs_buf_trylock
);
332 DEFINE_BUF_EVENT(xfs_buf_unlock
);
333 DEFINE_BUF_EVENT(xfs_buf_iowait
);
334 DEFINE_BUF_EVENT(xfs_buf_iowait_done
);
335 DEFINE_BUF_EVENT(xfs_buf_delwri_queue
);
336 DEFINE_BUF_EVENT(xfs_buf_delwri_queued
);
337 DEFINE_BUF_EVENT(xfs_buf_delwri_split
);
338 DEFINE_BUF_EVENT(xfs_buf_get_uncached
);
339 DEFINE_BUF_EVENT(xfs_bdstrat_shut
);
340 DEFINE_BUF_EVENT(xfs_buf_item_relse
);
341 DEFINE_BUF_EVENT(xfs_buf_item_iodone
);
342 DEFINE_BUF_EVENT(xfs_buf_item_iodone_async
);
343 DEFINE_BUF_EVENT(xfs_buf_error_relse
);
344 DEFINE_BUF_EVENT(xfs_trans_read_buf_io
);
345 DEFINE_BUF_EVENT(xfs_trans_read_buf_shut
);
347 /* not really buffer traces, but the buf provides useful information */
348 DEFINE_BUF_EVENT(xfs_btree_corrupt
);
349 DEFINE_BUF_EVENT(xfs_da_btree_corrupt
);
350 DEFINE_BUF_EVENT(xfs_reset_dqcounts
);
351 DEFINE_BUF_EVENT(xfs_inode_item_push
);
353 /* pass flags explicitly */
354 DECLARE_EVENT_CLASS(xfs_buf_flags_class
,
355 TP_PROTO(struct xfs_buf
*bp
, unsigned flags
, unsigned long caller_ip
),
356 TP_ARGS(bp
, flags
, caller_ip
),
359 __field(xfs_daddr_t
, bno
)
360 __field(size_t, buffer_length
)
362 __field(int, pincount
)
363 __field(unsigned, lockval
)
364 __field(unsigned, flags
)
365 __field(unsigned long, caller_ip
)
368 __entry
->dev
= bp
->b_target
->bt_dev
;
369 __entry
->bno
= bp
->b_bn
;
370 __entry
->buffer_length
= BBTOB(bp
->b_length
);
371 __entry
->flags
= flags
;
372 __entry
->hold
= atomic_read(&bp
->b_hold
);
373 __entry
->pincount
= atomic_read(&bp
->b_pin_count
);
374 __entry
->lockval
= bp
->b_sema
.count
;
375 __entry
->caller_ip
= caller_ip
;
377 TP_printk("dev %d:%d bno 0x%llx len 0x%zx hold %d pincount %d "
378 "lock %d flags %s caller %pf",
379 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
380 (unsigned long long)__entry
->bno
,
381 __entry
->buffer_length
,
385 __print_flags(__entry
->flags
, "|", XFS_BUF_FLAGS
),
386 (void *)__entry
->caller_ip
)
389 #define DEFINE_BUF_FLAGS_EVENT(name) \
390 DEFINE_EVENT(xfs_buf_flags_class, name, \
391 TP_PROTO(struct xfs_buf *bp, unsigned flags, unsigned long caller_ip), \
392 TP_ARGS(bp, flags, caller_ip))
393 DEFINE_BUF_FLAGS_EVENT(xfs_buf_find
);
394 DEFINE_BUF_FLAGS_EVENT(xfs_buf_get
);
395 DEFINE_BUF_FLAGS_EVENT(xfs_buf_read
);
397 TRACE_EVENT(xfs_buf_ioerror
,
398 TP_PROTO(struct xfs_buf
*bp
, int error
, unsigned long caller_ip
),
399 TP_ARGS(bp
, error
, caller_ip
),
402 __field(xfs_daddr_t
, bno
)
403 __field(size_t, buffer_length
)
404 __field(unsigned, flags
)
406 __field(int, pincount
)
407 __field(unsigned, lockval
)
409 __field(unsigned long, caller_ip
)
412 __entry
->dev
= bp
->b_target
->bt_dev
;
413 __entry
->bno
= bp
->b_bn
;
414 __entry
->buffer_length
= BBTOB(bp
->b_length
);
415 __entry
->hold
= atomic_read(&bp
->b_hold
);
416 __entry
->pincount
= atomic_read(&bp
->b_pin_count
);
417 __entry
->lockval
= bp
->b_sema
.count
;
418 __entry
->error
= error
;
419 __entry
->flags
= bp
->b_flags
;
420 __entry
->caller_ip
= caller_ip
;
422 TP_printk("dev %d:%d bno 0x%llx len 0x%zx hold %d pincount %d "
423 "lock %d error %d flags %s caller %pf",
424 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
425 (unsigned long long)__entry
->bno
,
426 __entry
->buffer_length
,
431 __print_flags(__entry
->flags
, "|", XFS_BUF_FLAGS
),
432 (void *)__entry
->caller_ip
)
435 DECLARE_EVENT_CLASS(xfs_buf_item_class
,
436 TP_PROTO(struct xfs_buf_log_item
*bip
),
440 __field(xfs_daddr_t
, buf_bno
)
441 __field(size_t, buf_len
)
442 __field(int, buf_hold
)
443 __field(int, buf_pincount
)
444 __field(int, buf_lockval
)
445 __field(unsigned, buf_flags
)
446 __field(unsigned, bli_recur
)
447 __field(int, bli_refcount
)
448 __field(unsigned, bli_flags
)
449 __field(void *, li_desc
)
450 __field(unsigned, li_flags
)
453 __entry
->dev
= bip
->bli_buf
->b_target
->bt_dev
;
454 __entry
->bli_flags
= bip
->bli_flags
;
455 __entry
->bli_recur
= bip
->bli_recur
;
456 __entry
->bli_refcount
= atomic_read(&bip
->bli_refcount
);
457 __entry
->buf_bno
= bip
->bli_buf
->b_bn
;
458 __entry
->buf_len
= BBTOB(bip
->bli_buf
->b_length
);
459 __entry
->buf_flags
= bip
->bli_buf
->b_flags
;
460 __entry
->buf_hold
= atomic_read(&bip
->bli_buf
->b_hold
);
461 __entry
->buf_pincount
= atomic_read(&bip
->bli_buf
->b_pin_count
);
462 __entry
->buf_lockval
= bip
->bli_buf
->b_sema
.count
;
463 __entry
->li_desc
= bip
->bli_item
.li_desc
;
464 __entry
->li_flags
= bip
->bli_item
.li_flags
;
466 TP_printk("dev %d:%d bno 0x%llx len 0x%zx hold %d pincount %d "
467 "lock %d flags %s recur %d refcount %d bliflags %s "
468 "lidesc 0x%p liflags %s",
469 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
470 (unsigned long long)__entry
->buf_bno
,
473 __entry
->buf_pincount
,
474 __entry
->buf_lockval
,
475 __print_flags(__entry
->buf_flags
, "|", XFS_BUF_FLAGS
),
477 __entry
->bli_refcount
,
478 __print_flags(__entry
->bli_flags
, "|", XFS_BLI_FLAGS
),
480 __print_flags(__entry
->li_flags
, "|", XFS_LI_FLAGS
))
483 #define DEFINE_BUF_ITEM_EVENT(name) \
484 DEFINE_EVENT(xfs_buf_item_class, name, \
485 TP_PROTO(struct xfs_buf_log_item *bip), \
487 DEFINE_BUF_ITEM_EVENT(xfs_buf_item_size
);
488 DEFINE_BUF_ITEM_EVENT(xfs_buf_item_size_stale
);
489 DEFINE_BUF_ITEM_EVENT(xfs_buf_item_format
);
490 DEFINE_BUF_ITEM_EVENT(xfs_buf_item_format_stale
);
491 DEFINE_BUF_ITEM_EVENT(xfs_buf_item_pin
);
492 DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unpin
);
493 DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unpin_stale
);
494 DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unlock
);
495 DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unlock_stale
);
496 DEFINE_BUF_ITEM_EVENT(xfs_buf_item_committed
);
497 DEFINE_BUF_ITEM_EVENT(xfs_buf_item_push
);
498 DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf
);
499 DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf_recur
);
500 DEFINE_BUF_ITEM_EVENT(xfs_trans_getsb
);
501 DEFINE_BUF_ITEM_EVENT(xfs_trans_getsb_recur
);
502 DEFINE_BUF_ITEM_EVENT(xfs_trans_read_buf
);
503 DEFINE_BUF_ITEM_EVENT(xfs_trans_read_buf_recur
);
504 DEFINE_BUF_ITEM_EVENT(xfs_trans_log_buf
);
505 DEFINE_BUF_ITEM_EVENT(xfs_trans_brelse
);
506 DEFINE_BUF_ITEM_EVENT(xfs_trans_bjoin
);
507 DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold
);
508 DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold_release
);
509 DEFINE_BUF_ITEM_EVENT(xfs_trans_binval
);
511 DECLARE_EVENT_CLASS(xfs_lock_class
,
512 TP_PROTO(struct xfs_inode
*ip
, unsigned lock_flags
,
513 unsigned long caller_ip
),
514 TP_ARGS(ip
, lock_flags
, caller_ip
),
517 __field(xfs_ino_t
, ino
)
518 __field(int, lock_flags
)
519 __field(unsigned long, caller_ip
)
522 __entry
->dev
= VFS_I(ip
)->i_sb
->s_dev
;
523 __entry
->ino
= ip
->i_ino
;
524 __entry
->lock_flags
= lock_flags
;
525 __entry
->caller_ip
= caller_ip
;
527 TP_printk("dev %d:%d ino 0x%llx flags %s caller %pf",
528 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
530 __print_flags(__entry
->lock_flags
, "|", XFS_LOCK_FLAGS
),
531 (void *)__entry
->caller_ip
)
534 #define DEFINE_LOCK_EVENT(name) \
535 DEFINE_EVENT(xfs_lock_class, name, \
536 TP_PROTO(struct xfs_inode *ip, unsigned lock_flags, \
537 unsigned long caller_ip), \
538 TP_ARGS(ip, lock_flags, caller_ip))
539 DEFINE_LOCK_EVENT(xfs_ilock
);
540 DEFINE_LOCK_EVENT(xfs_ilock_nowait
);
541 DEFINE_LOCK_EVENT(xfs_ilock_demote
);
542 DEFINE_LOCK_EVENT(xfs_iunlock
);
544 DECLARE_EVENT_CLASS(xfs_inode_class
,
545 TP_PROTO(struct xfs_inode
*ip
),
549 __field(xfs_ino_t
, ino
)
552 __entry
->dev
= VFS_I(ip
)->i_sb
->s_dev
;
553 __entry
->ino
= ip
->i_ino
;
555 TP_printk("dev %d:%d ino 0x%llx",
556 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
560 #define DEFINE_INODE_EVENT(name) \
561 DEFINE_EVENT(xfs_inode_class, name, \
562 TP_PROTO(struct xfs_inode *ip), \
564 DEFINE_INODE_EVENT(xfs_iget_skip
);
565 DEFINE_INODE_EVENT(xfs_iget_reclaim
);
566 DEFINE_INODE_EVENT(xfs_iget_reclaim_fail
);
567 DEFINE_INODE_EVENT(xfs_iget_hit
);
568 DEFINE_INODE_EVENT(xfs_iget_miss
);
570 DEFINE_INODE_EVENT(xfs_getattr
);
571 DEFINE_INODE_EVENT(xfs_setattr
);
572 DEFINE_INODE_EVENT(xfs_readlink
);
573 DEFINE_INODE_EVENT(xfs_alloc_file_space
);
574 DEFINE_INODE_EVENT(xfs_free_file_space
);
575 DEFINE_INODE_EVENT(xfs_readdir
);
576 #ifdef CONFIG_XFS_POSIX_ACL
577 DEFINE_INODE_EVENT(xfs_get_acl
);
579 DEFINE_INODE_EVENT(xfs_vm_bmap
);
580 DEFINE_INODE_EVENT(xfs_file_ioctl
);
581 DEFINE_INODE_EVENT(xfs_file_compat_ioctl
);
582 DEFINE_INODE_EVENT(xfs_ioctl_setattr
);
583 DEFINE_INODE_EVENT(xfs_dir_fsync
);
584 DEFINE_INODE_EVENT(xfs_file_fsync
);
585 DEFINE_INODE_EVENT(xfs_destroy_inode
);
586 DEFINE_INODE_EVENT(xfs_evict_inode
);
587 DEFINE_INODE_EVENT(xfs_update_time
);
589 DEFINE_INODE_EVENT(xfs_dquot_dqalloc
);
590 DEFINE_INODE_EVENT(xfs_dquot_dqdetach
);
592 DEFINE_INODE_EVENT(xfs_inode_set_eofblocks_tag
);
593 DEFINE_INODE_EVENT(xfs_inode_clear_eofblocks_tag
);
594 DEFINE_INODE_EVENT(xfs_inode_free_eofblocks_invalid
);
596 DECLARE_EVENT_CLASS(xfs_iref_class
,
597 TP_PROTO(struct xfs_inode
*ip
, unsigned long caller_ip
),
598 TP_ARGS(ip
, caller_ip
),
601 __field(xfs_ino_t
, ino
)
603 __field(int, pincount
)
604 __field(unsigned long, caller_ip
)
607 __entry
->dev
= VFS_I(ip
)->i_sb
->s_dev
;
608 __entry
->ino
= ip
->i_ino
;
609 __entry
->count
= atomic_read(&VFS_I(ip
)->i_count
);
610 __entry
->pincount
= atomic_read(&ip
->i_pincount
);
611 __entry
->caller_ip
= caller_ip
;
613 TP_printk("dev %d:%d ino 0x%llx count %d pincount %d caller %pf",
614 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
618 (char *)__entry
->caller_ip
)
621 #define DEFINE_IREF_EVENT(name) \
622 DEFINE_EVENT(xfs_iref_class, name, \
623 TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip), \
624 TP_ARGS(ip, caller_ip))
625 DEFINE_IREF_EVENT(xfs_ihold
);
626 DEFINE_IREF_EVENT(xfs_irele
);
627 DEFINE_IREF_EVENT(xfs_inode_pin
);
628 DEFINE_IREF_EVENT(xfs_inode_unpin
);
629 DEFINE_IREF_EVENT(xfs_inode_unpin_nowait
);
631 DECLARE_EVENT_CLASS(xfs_namespace_class
,
632 TP_PROTO(struct xfs_inode
*dp
, struct xfs_name
*name
),
636 __field(xfs_ino_t
, dp_ino
)
637 __field(int, namelen
)
638 __dynamic_array(char, name
, name
->len
)
641 __entry
->dev
= VFS_I(dp
)->i_sb
->s_dev
;
642 __entry
->dp_ino
= dp
->i_ino
;
643 __entry
->namelen
= name
->len
;
644 memcpy(__get_str(name
), name
->name
, name
->len
);
646 TP_printk("dev %d:%d dp ino 0x%llx name %.*s",
647 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
653 #define DEFINE_NAMESPACE_EVENT(name) \
654 DEFINE_EVENT(xfs_namespace_class, name, \
655 TP_PROTO(struct xfs_inode *dp, struct xfs_name *name), \
657 DEFINE_NAMESPACE_EVENT(xfs_remove
);
658 DEFINE_NAMESPACE_EVENT(xfs_link
);
659 DEFINE_NAMESPACE_EVENT(xfs_lookup
);
660 DEFINE_NAMESPACE_EVENT(xfs_create
);
661 DEFINE_NAMESPACE_EVENT(xfs_symlink
);
663 TRACE_EVENT(xfs_rename
,
664 TP_PROTO(struct xfs_inode
*src_dp
, struct xfs_inode
*target_dp
,
665 struct xfs_name
*src_name
, struct xfs_name
*target_name
),
666 TP_ARGS(src_dp
, target_dp
, src_name
, target_name
),
669 __field(xfs_ino_t
, src_dp_ino
)
670 __field(xfs_ino_t
, target_dp_ino
)
671 __field(int, src_namelen
)
672 __field(int, target_namelen
)
673 __dynamic_array(char, src_name
, src_name
->len
)
674 __dynamic_array(char, target_name
, target_name
->len
)
677 __entry
->dev
= VFS_I(src_dp
)->i_sb
->s_dev
;
678 __entry
->src_dp_ino
= src_dp
->i_ino
;
679 __entry
->target_dp_ino
= target_dp
->i_ino
;
680 __entry
->src_namelen
= src_name
->len
;
681 __entry
->target_namelen
= target_name
->len
;
682 memcpy(__get_str(src_name
), src_name
->name
, src_name
->len
);
683 memcpy(__get_str(target_name
), target_name
->name
,
686 TP_printk("dev %d:%d src dp ino 0x%llx target dp ino 0x%llx"
687 " src name %.*s target name %.*s",
688 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
690 __entry
->target_dp_ino
,
691 __entry
->src_namelen
,
693 __entry
->target_namelen
,
694 __get_str(target_name
))
697 DECLARE_EVENT_CLASS(xfs_dquot_class
,
698 TP_PROTO(struct xfs_dquot
*dqp
),
703 __field(unsigned, flags
)
704 __field(unsigned, nrefs
)
705 __field(unsigned long long, res_bcount
)
706 __field(unsigned long long, bcount
)
707 __field(unsigned long long, icount
)
708 __field(unsigned long long, blk_hardlimit
)
709 __field(unsigned long long, blk_softlimit
)
710 __field(unsigned long long, ino_hardlimit
)
711 __field(unsigned long long, ino_softlimit
)
714 __entry
->dev
= dqp
->q_mount
->m_super
->s_dev
;
715 __entry
->id
= be32_to_cpu(dqp
->q_core
.d_id
);
716 __entry
->flags
= dqp
->dq_flags
;
717 __entry
->nrefs
= dqp
->q_nrefs
;
718 __entry
->res_bcount
= dqp
->q_res_bcount
;
719 __entry
->bcount
= be64_to_cpu(dqp
->q_core
.d_bcount
);
720 __entry
->icount
= be64_to_cpu(dqp
->q_core
.d_icount
);
721 __entry
->blk_hardlimit
=
722 be64_to_cpu(dqp
->q_core
.d_blk_hardlimit
);
723 __entry
->blk_softlimit
=
724 be64_to_cpu(dqp
->q_core
.d_blk_softlimit
);
725 __entry
->ino_hardlimit
=
726 be64_to_cpu(dqp
->q_core
.d_ino_hardlimit
);
727 __entry
->ino_softlimit
=
728 be64_to_cpu(dqp
->q_core
.d_ino_softlimit
);
730 TP_printk("dev %d:%d id 0x%x flags %s nrefs %u res_bc 0x%llx "
731 "bcnt 0x%llx bhardlimit 0x%llx bsoftlimit 0x%llx "
732 "icnt 0x%llx ihardlimit 0x%llx isoftlimit 0x%llx]",
733 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
735 __print_flags(__entry
->flags
, "|", XFS_DQ_FLAGS
),
739 __entry
->blk_hardlimit
,
740 __entry
->blk_softlimit
,
742 __entry
->ino_hardlimit
,
743 __entry
->ino_softlimit
)
746 #define DEFINE_DQUOT_EVENT(name) \
747 DEFINE_EVENT(xfs_dquot_class, name, \
748 TP_PROTO(struct xfs_dquot *dqp), \
750 DEFINE_DQUOT_EVENT(xfs_dqadjust
);
751 DEFINE_DQUOT_EVENT(xfs_dqreclaim_want
);
752 DEFINE_DQUOT_EVENT(xfs_dqreclaim_dirty
);
753 DEFINE_DQUOT_EVENT(xfs_dqreclaim_busy
);
754 DEFINE_DQUOT_EVENT(xfs_dqreclaim_done
);
755 DEFINE_DQUOT_EVENT(xfs_dqattach_found
);
756 DEFINE_DQUOT_EVENT(xfs_dqattach_get
);
757 DEFINE_DQUOT_EVENT(xfs_dqalloc
);
758 DEFINE_DQUOT_EVENT(xfs_dqtobp_read
);
759 DEFINE_DQUOT_EVENT(xfs_dqread
);
760 DEFINE_DQUOT_EVENT(xfs_dqread_fail
);
761 DEFINE_DQUOT_EVENT(xfs_dqget_hit
);
762 DEFINE_DQUOT_EVENT(xfs_dqget_miss
);
763 DEFINE_DQUOT_EVENT(xfs_dqget_freeing
);
764 DEFINE_DQUOT_EVENT(xfs_dqget_dup
);
765 DEFINE_DQUOT_EVENT(xfs_dqput
);
766 DEFINE_DQUOT_EVENT(xfs_dqput_wait
);
767 DEFINE_DQUOT_EVENT(xfs_dqput_free
);
768 DEFINE_DQUOT_EVENT(xfs_dqrele
);
769 DEFINE_DQUOT_EVENT(xfs_dqflush
);
770 DEFINE_DQUOT_EVENT(xfs_dqflush_force
);
771 DEFINE_DQUOT_EVENT(xfs_dqflush_done
);
773 DECLARE_EVENT_CLASS(xfs_loggrant_class
,
774 TP_PROTO(struct xlog
*log
, struct xlog_ticket
*tic
),
778 __field(unsigned, trans_type
)
781 __field(int, curr_res
)
782 __field(int, unit_res
)
783 __field(unsigned int, flags
)
784 __field(int, reserveq
)
786 __field(int, grant_reserve_cycle
)
787 __field(int, grant_reserve_bytes
)
788 __field(int, grant_write_cycle
)
789 __field(int, grant_write_bytes
)
790 __field(int, curr_cycle
)
791 __field(int, curr_block
)
792 __field(xfs_lsn_t
, tail_lsn
)
795 __entry
->dev
= log
->l_mp
->m_super
->s_dev
;
796 __entry
->trans_type
= tic
->t_trans_type
;
797 __entry
->ocnt
= tic
->t_ocnt
;
798 __entry
->cnt
= tic
->t_cnt
;
799 __entry
->curr_res
= tic
->t_curr_res
;
800 __entry
->unit_res
= tic
->t_unit_res
;
801 __entry
->flags
= tic
->t_flags
;
802 __entry
->reserveq
= list_empty(&log
->l_reserve_head
.waiters
);
803 __entry
->writeq
= list_empty(&log
->l_write_head
.waiters
);
804 xlog_crack_grant_head(&log
->l_reserve_head
.grant
,
805 &__entry
->grant_reserve_cycle
,
806 &__entry
->grant_reserve_bytes
);
807 xlog_crack_grant_head(&log
->l_write_head
.grant
,
808 &__entry
->grant_write_cycle
,
809 &__entry
->grant_write_bytes
);
810 __entry
->curr_cycle
= log
->l_curr_cycle
;
811 __entry
->curr_block
= log
->l_curr_block
;
812 __entry
->tail_lsn
= atomic64_read(&log
->l_tail_lsn
);
814 TP_printk("dev %d:%d type %s t_ocnt %u t_cnt %u t_curr_res %u "
815 "t_unit_res %u t_flags %s reserveq %s "
816 "writeq %s grant_reserve_cycle %d "
817 "grant_reserve_bytes %d grant_write_cycle %d "
818 "grant_write_bytes %d curr_cycle %d curr_block %d "
819 "tail_cycle %d tail_block %d",
820 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
821 __print_symbolic(__entry
->trans_type
, XFS_TRANS_TYPES
),
826 __print_flags(__entry
->flags
, "|", XLOG_TIC_FLAGS
),
827 __entry
->reserveq
? "empty" : "active",
828 __entry
->writeq
? "empty" : "active",
829 __entry
->grant_reserve_cycle
,
830 __entry
->grant_reserve_bytes
,
831 __entry
->grant_write_cycle
,
832 __entry
->grant_write_bytes
,
835 CYCLE_LSN(__entry
->tail_lsn
),
836 BLOCK_LSN(__entry
->tail_lsn
)
840 #define DEFINE_LOGGRANT_EVENT(name) \
841 DEFINE_EVENT(xfs_loggrant_class, name, \
842 TP_PROTO(struct xlog *log, struct xlog_ticket *tic), \
844 DEFINE_LOGGRANT_EVENT(xfs_log_done_nonperm
);
845 DEFINE_LOGGRANT_EVENT(xfs_log_done_perm
);
846 DEFINE_LOGGRANT_EVENT(xfs_log_umount_write
);
847 DEFINE_LOGGRANT_EVENT(xfs_log_grant_sleep
);
848 DEFINE_LOGGRANT_EVENT(xfs_log_grant_wake
);
849 DEFINE_LOGGRANT_EVENT(xfs_log_grant_wake_up
);
850 DEFINE_LOGGRANT_EVENT(xfs_log_reserve
);
851 DEFINE_LOGGRANT_EVENT(xfs_log_reserve_exit
);
852 DEFINE_LOGGRANT_EVENT(xfs_log_regrant
);
853 DEFINE_LOGGRANT_EVENT(xfs_log_regrant_exit
);
854 DEFINE_LOGGRANT_EVENT(xfs_log_regrant_reserve_enter
);
855 DEFINE_LOGGRANT_EVENT(xfs_log_regrant_reserve_exit
);
856 DEFINE_LOGGRANT_EVENT(xfs_log_regrant_reserve_sub
);
857 DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_enter
);
858 DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_exit
);
859 DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_sub
);
861 DECLARE_EVENT_CLASS(xfs_log_item_class
,
862 TP_PROTO(struct xfs_log_item
*lip
),
869 __field(xfs_lsn_t
, lsn
)
872 __entry
->dev
= lip
->li_mountp
->m_super
->s_dev
;
874 __entry
->type
= lip
->li_type
;
875 __entry
->flags
= lip
->li_flags
;
876 __entry
->lsn
= lip
->li_lsn
;
878 TP_printk("dev %d:%d lip 0x%p lsn %d/%d type %s flags %s",
879 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
881 CYCLE_LSN(__entry
->lsn
), BLOCK_LSN(__entry
->lsn
),
882 __print_symbolic(__entry
->type
, XFS_LI_TYPE_DESC
),
883 __print_flags(__entry
->flags
, "|", XFS_LI_FLAGS
))
886 TRACE_EVENT(xfs_log_force
,
887 TP_PROTO(struct xfs_mount
*mp
, xfs_lsn_t lsn
),
891 __field(xfs_lsn_t
, lsn
)
894 __entry
->dev
= mp
->m_super
->s_dev
;
897 TP_printk("dev %d:%d lsn 0x%llx",
898 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
902 #define DEFINE_LOG_ITEM_EVENT(name) \
903 DEFINE_EVENT(xfs_log_item_class, name, \
904 TP_PROTO(struct xfs_log_item *lip), \
906 DEFINE_LOG_ITEM_EVENT(xfs_ail_push
);
907 DEFINE_LOG_ITEM_EVENT(xfs_ail_pinned
);
908 DEFINE_LOG_ITEM_EVENT(xfs_ail_locked
);
909 DEFINE_LOG_ITEM_EVENT(xfs_ail_flushing
);
912 DECLARE_EVENT_CLASS(xfs_file_class
,
913 TP_PROTO(struct xfs_inode
*ip
, size_t count
, loff_t offset
, int flags
),
914 TP_ARGS(ip
, count
, offset
, flags
),
917 __field(xfs_ino_t
, ino
)
918 __field(xfs_fsize_t
, size
)
919 __field(loff_t
, offset
)
920 __field(size_t, count
)
924 __entry
->dev
= VFS_I(ip
)->i_sb
->s_dev
;
925 __entry
->ino
= ip
->i_ino
;
926 __entry
->size
= ip
->i_d
.di_size
;
927 __entry
->offset
= offset
;
928 __entry
->count
= count
;
929 __entry
->flags
= flags
;
931 TP_printk("dev %d:%d ino 0x%llx size 0x%llx "
932 "offset 0x%llx count 0x%zx ioflags %s",
933 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
938 __print_flags(__entry
->flags
, "|", XFS_IO_FLAGS
))
941 #define DEFINE_RW_EVENT(name) \
942 DEFINE_EVENT(xfs_file_class, name, \
943 TP_PROTO(struct xfs_inode *ip, size_t count, loff_t offset, int flags), \
944 TP_ARGS(ip, count, offset, flags))
945 DEFINE_RW_EVENT(xfs_file_read
);
946 DEFINE_RW_EVENT(xfs_file_buffered_write
);
947 DEFINE_RW_EVENT(xfs_file_direct_write
);
948 DEFINE_RW_EVENT(xfs_file_splice_read
);
949 DEFINE_RW_EVENT(xfs_file_splice_write
);
951 DECLARE_EVENT_CLASS(xfs_page_class
,
952 TP_PROTO(struct inode
*inode
, struct page
*page
, unsigned long off
),
953 TP_ARGS(inode
, page
, off
),
956 __field(xfs_ino_t
, ino
)
957 __field(pgoff_t
, pgoff
)
958 __field(loff_t
, size
)
959 __field(unsigned long, offset
)
960 __field(int, delalloc
)
961 __field(int, unwritten
)
964 int delalloc
= -1, unwritten
= -1;
966 if (page_has_buffers(page
))
967 xfs_count_page_state(page
, &delalloc
, &unwritten
);
968 __entry
->dev
= inode
->i_sb
->s_dev
;
969 __entry
->ino
= XFS_I(inode
)->i_ino
;
970 __entry
->pgoff
= page_offset(page
);
971 __entry
->size
= i_size_read(inode
);
972 __entry
->offset
= off
;
973 __entry
->delalloc
= delalloc
;
974 __entry
->unwritten
= unwritten
;
976 TP_printk("dev %d:%d ino 0x%llx pgoff 0x%lx size 0x%llx offset %lx "
977 "delalloc %d unwritten %d",
978 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
987 #define DEFINE_PAGE_EVENT(name) \
988 DEFINE_EVENT(xfs_page_class, name, \
989 TP_PROTO(struct inode *inode, struct page *page, unsigned long off), \
990 TP_ARGS(inode, page, off))
991 DEFINE_PAGE_EVENT(xfs_writepage
);
992 DEFINE_PAGE_EVENT(xfs_releasepage
);
993 DEFINE_PAGE_EVENT(xfs_invalidatepage
);
995 DECLARE_EVENT_CLASS(xfs_imap_class
,
996 TP_PROTO(struct xfs_inode
*ip
, xfs_off_t offset
, ssize_t count
,
997 int type
, struct xfs_bmbt_irec
*irec
),
998 TP_ARGS(ip
, offset
, count
, type
, irec
),
1001 __field(xfs_ino_t
, ino
)
1002 __field(loff_t
, size
)
1003 __field(loff_t
, offset
)
1004 __field(size_t, count
)
1006 __field(xfs_fileoff_t
, startoff
)
1007 __field(xfs_fsblock_t
, startblock
)
1008 __field(xfs_filblks_t
, blockcount
)
1011 __entry
->dev
= VFS_I(ip
)->i_sb
->s_dev
;
1012 __entry
->ino
= ip
->i_ino
;
1013 __entry
->size
= ip
->i_d
.di_size
;
1014 __entry
->offset
= offset
;
1015 __entry
->count
= count
;
1016 __entry
->type
= type
;
1017 __entry
->startoff
= irec
? irec
->br_startoff
: 0;
1018 __entry
->startblock
= irec
? irec
->br_startblock
: 0;
1019 __entry
->blockcount
= irec
? irec
->br_blockcount
: 0;
1021 TP_printk("dev %d:%d ino 0x%llx size 0x%llx offset 0x%llx count %zd "
1022 "type %s startoff 0x%llx startblock %lld blockcount 0x%llx",
1023 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1028 __print_symbolic(__entry
->type
, XFS_IO_TYPES
),
1030 (__int64_t
)__entry
->startblock
,
1031 __entry
->blockcount
)
1034 #define DEFINE_IOMAP_EVENT(name) \
1035 DEFINE_EVENT(xfs_imap_class, name, \
1036 TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count, \
1037 int type, struct xfs_bmbt_irec *irec), \
1038 TP_ARGS(ip, offset, count, type, irec))
1039 DEFINE_IOMAP_EVENT(xfs_map_blocks_found
);
1040 DEFINE_IOMAP_EVENT(xfs_map_blocks_alloc
);
1041 DEFINE_IOMAP_EVENT(xfs_get_blocks_found
);
1042 DEFINE_IOMAP_EVENT(xfs_get_blocks_alloc
);
1044 DECLARE_EVENT_CLASS(xfs_simple_io_class
,
1045 TP_PROTO(struct xfs_inode
*ip
, xfs_off_t offset
, ssize_t count
),
1046 TP_ARGS(ip
, offset
, count
),
1049 __field(xfs_ino_t
, ino
)
1050 __field(loff_t
, isize
)
1051 __field(loff_t
, disize
)
1052 __field(loff_t
, offset
)
1053 __field(size_t, count
)
1056 __entry
->dev
= VFS_I(ip
)->i_sb
->s_dev
;
1057 __entry
->ino
= ip
->i_ino
;
1058 __entry
->isize
= VFS_I(ip
)->i_size
;
1059 __entry
->disize
= ip
->i_d
.di_size
;
1060 __entry
->offset
= offset
;
1061 __entry
->count
= count
;
1063 TP_printk("dev %d:%d ino 0x%llx isize 0x%llx disize 0x%llx "
1064 "offset 0x%llx count %zd",
1065 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1073 #define DEFINE_SIMPLE_IO_EVENT(name) \
1074 DEFINE_EVENT(xfs_simple_io_class, name, \
1075 TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count), \
1076 TP_ARGS(ip, offset, count))
1077 DEFINE_SIMPLE_IO_EVENT(xfs_delalloc_enospc
);
1078 DEFINE_SIMPLE_IO_EVENT(xfs_unwritten_convert
);
1079 DEFINE_SIMPLE_IO_EVENT(xfs_get_blocks_notfound
);
1080 DEFINE_SIMPLE_IO_EVENT(xfs_setfilesize
);
1082 DECLARE_EVENT_CLASS(xfs_itrunc_class
,
1083 TP_PROTO(struct xfs_inode
*ip
, xfs_fsize_t new_size
),
1084 TP_ARGS(ip
, new_size
),
1087 __field(xfs_ino_t
, ino
)
1088 __field(xfs_fsize_t
, size
)
1089 __field(xfs_fsize_t
, new_size
)
1092 __entry
->dev
= VFS_I(ip
)->i_sb
->s_dev
;
1093 __entry
->ino
= ip
->i_ino
;
1094 __entry
->size
= ip
->i_d
.di_size
;
1095 __entry
->new_size
= new_size
;
1097 TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx",
1098 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1104 #define DEFINE_ITRUNC_EVENT(name) \
1105 DEFINE_EVENT(xfs_itrunc_class, name, \
1106 TP_PROTO(struct xfs_inode *ip, xfs_fsize_t new_size), \
1107 TP_ARGS(ip, new_size))
1108 DEFINE_ITRUNC_EVENT(xfs_itruncate_extents_start
);
1109 DEFINE_ITRUNC_EVENT(xfs_itruncate_extents_end
);
1111 TRACE_EVENT(xfs_pagecache_inval
,
1112 TP_PROTO(struct xfs_inode
*ip
, xfs_off_t start
, xfs_off_t finish
),
1113 TP_ARGS(ip
, start
, finish
),
1116 __field(xfs_ino_t
, ino
)
1117 __field(xfs_fsize_t
, size
)
1118 __field(xfs_off_t
, start
)
1119 __field(xfs_off_t
, finish
)
1122 __entry
->dev
= VFS_I(ip
)->i_sb
->s_dev
;
1123 __entry
->ino
= ip
->i_ino
;
1124 __entry
->size
= ip
->i_d
.di_size
;
1125 __entry
->start
= start
;
1126 __entry
->finish
= finish
;
1128 TP_printk("dev %d:%d ino 0x%llx size 0x%llx start 0x%llx finish 0x%llx",
1129 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1136 TRACE_EVENT(xfs_bunmap
,
1137 TP_PROTO(struct xfs_inode
*ip
, xfs_fileoff_t bno
, xfs_filblks_t len
,
1138 int flags
, unsigned long caller_ip
),
1139 TP_ARGS(ip
, bno
, len
, flags
, caller_ip
),
1142 __field(xfs_ino_t
, ino
)
1143 __field(xfs_fsize_t
, size
)
1144 __field(xfs_fileoff_t
, bno
)
1145 __field(xfs_filblks_t
, len
)
1146 __field(unsigned long, caller_ip
)
1150 __entry
->dev
= VFS_I(ip
)->i_sb
->s_dev
;
1151 __entry
->ino
= ip
->i_ino
;
1152 __entry
->size
= ip
->i_d
.di_size
;
1155 __entry
->caller_ip
= caller_ip
;
1156 __entry
->flags
= flags
;
1158 TP_printk("dev %d:%d ino 0x%llx size 0x%llx bno 0x%llx len 0x%llx"
1159 "flags %s caller %pf",
1160 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1165 __print_flags(__entry
->flags
, "|", XFS_BMAPI_FLAGS
),
1166 (void *)__entry
->caller_ip
)
1170 DECLARE_EVENT_CLASS(xfs_extent_busy_class
,
1171 TP_PROTO(struct xfs_mount
*mp
, xfs_agnumber_t agno
,
1172 xfs_agblock_t agbno
, xfs_extlen_t len
),
1173 TP_ARGS(mp
, agno
, agbno
, len
),
1176 __field(xfs_agnumber_t
, agno
)
1177 __field(xfs_agblock_t
, agbno
)
1178 __field(xfs_extlen_t
, len
)
1181 __entry
->dev
= mp
->m_super
->s_dev
;
1182 __entry
->agno
= agno
;
1183 __entry
->agbno
= agbno
;
1186 TP_printk("dev %d:%d agno %u agbno %u len %u",
1187 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1192 #define DEFINE_BUSY_EVENT(name) \
1193 DEFINE_EVENT(xfs_extent_busy_class, name, \
1194 TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
1195 xfs_agblock_t agbno, xfs_extlen_t len), \
1196 TP_ARGS(mp, agno, agbno, len))
1197 DEFINE_BUSY_EVENT(xfs_extent_busy
);
1198 DEFINE_BUSY_EVENT(xfs_extent_busy_enomem
);
1199 DEFINE_BUSY_EVENT(xfs_extent_busy_force
);
1200 DEFINE_BUSY_EVENT(xfs_extent_busy_reuse
);
1201 DEFINE_BUSY_EVENT(xfs_extent_busy_clear
);
1203 TRACE_EVENT(xfs_extent_busy_trim
,
1204 TP_PROTO(struct xfs_mount
*mp
, xfs_agnumber_t agno
,
1205 xfs_agblock_t agbno
, xfs_extlen_t len
,
1206 xfs_agblock_t tbno
, xfs_extlen_t tlen
),
1207 TP_ARGS(mp
, agno
, agbno
, len
, tbno
, tlen
),
1210 __field(xfs_agnumber_t
, agno
)
1211 __field(xfs_agblock_t
, agbno
)
1212 __field(xfs_extlen_t
, len
)
1213 __field(xfs_agblock_t
, tbno
)
1214 __field(xfs_extlen_t
, tlen
)
1217 __entry
->dev
= mp
->m_super
->s_dev
;
1218 __entry
->agno
= agno
;
1219 __entry
->agbno
= agbno
;
1221 __entry
->tbno
= tbno
;
1222 __entry
->tlen
= tlen
;
1224 TP_printk("dev %d:%d agno %u agbno %u len %u tbno %u tlen %u",
1225 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1233 TRACE_EVENT(xfs_trans_commit_lsn
,
1234 TP_PROTO(struct xfs_trans
*trans
),
1238 __field(struct xfs_trans
*, tp
)
1239 __field(xfs_lsn_t
, lsn
)
1242 __entry
->dev
= trans
->t_mountp
->m_super
->s_dev
;
1243 __entry
->tp
= trans
;
1244 __entry
->lsn
= trans
->t_commit_lsn
;
1246 TP_printk("dev %d:%d trans 0x%p commit_lsn 0x%llx",
1247 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1252 TRACE_EVENT(xfs_agf
,
1253 TP_PROTO(struct xfs_mount
*mp
, struct xfs_agf
*agf
, int flags
,
1254 unsigned long caller_ip
),
1255 TP_ARGS(mp
, agf
, flags
, caller_ip
),
1258 __field(xfs_agnumber_t
, agno
)
1260 __field(__u32
, length
)
1261 __field(__u32
, bno_root
)
1262 __field(__u32
, cnt_root
)
1263 __field(__u32
, bno_level
)
1264 __field(__u32
, cnt_level
)
1265 __field(__u32
, flfirst
)
1266 __field(__u32
, fllast
)
1267 __field(__u32
, flcount
)
1268 __field(__u32
, freeblks
)
1269 __field(__u32
, longest
)
1270 __field(unsigned long, caller_ip
)
1273 __entry
->dev
= mp
->m_super
->s_dev
;
1274 __entry
->agno
= be32_to_cpu(agf
->agf_seqno
),
1275 __entry
->flags
= flags
;
1276 __entry
->length
= be32_to_cpu(agf
->agf_length
),
1277 __entry
->bno_root
= be32_to_cpu(agf
->agf_roots
[XFS_BTNUM_BNO
]),
1278 __entry
->cnt_root
= be32_to_cpu(agf
->agf_roots
[XFS_BTNUM_CNT
]),
1279 __entry
->bno_level
=
1280 be32_to_cpu(agf
->agf_levels
[XFS_BTNUM_BNO
]),
1281 __entry
->cnt_level
=
1282 be32_to_cpu(agf
->agf_levels
[XFS_BTNUM_CNT
]),
1283 __entry
->flfirst
= be32_to_cpu(agf
->agf_flfirst
),
1284 __entry
->fllast
= be32_to_cpu(agf
->agf_fllast
),
1285 __entry
->flcount
= be32_to_cpu(agf
->agf_flcount
),
1286 __entry
->freeblks
= be32_to_cpu(agf
->agf_freeblks
),
1287 __entry
->longest
= be32_to_cpu(agf
->agf_longest
);
1288 __entry
->caller_ip
= caller_ip
;
1290 TP_printk("dev %d:%d agno %u flags %s length %u roots b %u c %u "
1291 "levels b %u c %u flfirst %u fllast %u flcount %u "
1292 "freeblks %u longest %u caller %pf",
1293 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1295 __print_flags(__entry
->flags
, "|", XFS_AGF_FLAGS
),
1306 (void *)__entry
->caller_ip
)
1309 TRACE_EVENT(xfs_free_extent
,
1310 TP_PROTO(struct xfs_mount
*mp
, xfs_agnumber_t agno
, xfs_agblock_t agbno
,
1311 xfs_extlen_t len
, bool isfl
, int haveleft
, int haveright
),
1312 TP_ARGS(mp
, agno
, agbno
, len
, isfl
, haveleft
, haveright
),
1315 __field(xfs_agnumber_t
, agno
)
1316 __field(xfs_agblock_t
, agbno
)
1317 __field(xfs_extlen_t
, len
)
1319 __field(int, haveleft
)
1320 __field(int, haveright
)
1323 __entry
->dev
= mp
->m_super
->s_dev
;
1324 __entry
->agno
= agno
;
1325 __entry
->agbno
= agbno
;
1327 __entry
->isfl
= isfl
;
1328 __entry
->haveleft
= haveleft
;
1329 __entry
->haveright
= haveright
;
1331 TP_printk("dev %d:%d agno %u agbno %u len %u isfl %d %s",
1332 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1338 (__entry
->haveright
? "both" : "left") :
1339 (__entry
->haveright
? "right" : "none"))
1343 DECLARE_EVENT_CLASS(xfs_alloc_class
,
1344 TP_PROTO(struct xfs_alloc_arg
*args
),
1348 __field(xfs_agnumber_t
, agno
)
1349 __field(xfs_agblock_t
, agbno
)
1350 __field(xfs_extlen_t
, minlen
)
1351 __field(xfs_extlen_t
, maxlen
)
1352 __field(xfs_extlen_t
, mod
)
1353 __field(xfs_extlen_t
, prod
)
1354 __field(xfs_extlen_t
, minleft
)
1355 __field(xfs_extlen_t
, total
)
1356 __field(xfs_extlen_t
, alignment
)
1357 __field(xfs_extlen_t
, minalignslop
)
1358 __field(xfs_extlen_t
, len
)
1359 __field(short, type
)
1360 __field(short, otype
)
1361 __field(char, wasdel
)
1362 __field(char, wasfromfl
)
1364 __field(char, userdata
)
1365 __field(xfs_fsblock_t
, firstblock
)
1368 __entry
->dev
= args
->mp
->m_super
->s_dev
;
1369 __entry
->agno
= args
->agno
;
1370 __entry
->agbno
= args
->agbno
;
1371 __entry
->minlen
= args
->minlen
;
1372 __entry
->maxlen
= args
->maxlen
;
1373 __entry
->mod
= args
->mod
;
1374 __entry
->prod
= args
->prod
;
1375 __entry
->minleft
= args
->minleft
;
1376 __entry
->total
= args
->total
;
1377 __entry
->alignment
= args
->alignment
;
1378 __entry
->minalignslop
= args
->minalignslop
;
1379 __entry
->len
= args
->len
;
1380 __entry
->type
= args
->type
;
1381 __entry
->otype
= args
->otype
;
1382 __entry
->wasdel
= args
->wasdel
;
1383 __entry
->wasfromfl
= args
->wasfromfl
;
1384 __entry
->isfl
= args
->isfl
;
1385 __entry
->userdata
= args
->userdata
;
1386 __entry
->firstblock
= args
->firstblock
;
1388 TP_printk("dev %d:%d agno %u agbno %u minlen %u maxlen %u mod %u "
1389 "prod %u minleft %u total %u alignment %u minalignslop %u "
1390 "len %u type %s otype %s wasdel %d wasfromfl %d isfl %d "
1391 "userdata %d firstblock 0x%llx",
1392 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1402 __entry
->minalignslop
,
1404 __print_symbolic(__entry
->type
, XFS_ALLOC_TYPES
),
1405 __print_symbolic(__entry
->otype
, XFS_ALLOC_TYPES
),
1410 (unsigned long long)__entry
->firstblock
)
1413 #define DEFINE_ALLOC_EVENT(name) \
1414 DEFINE_EVENT(xfs_alloc_class, name, \
1415 TP_PROTO(struct xfs_alloc_arg *args), \
1417 DEFINE_ALLOC_EVENT(xfs_alloc_exact_done
);
1418 DEFINE_ALLOC_EVENT(xfs_alloc_exact_notfound
);
1419 DEFINE_ALLOC_EVENT(xfs_alloc_exact_error
);
1420 DEFINE_ALLOC_EVENT(xfs_alloc_near_nominleft
);
1421 DEFINE_ALLOC_EVENT(xfs_alloc_near_first
);
1422 DEFINE_ALLOC_EVENT(xfs_alloc_near_greater
);
1423 DEFINE_ALLOC_EVENT(xfs_alloc_near_lesser
);
1424 DEFINE_ALLOC_EVENT(xfs_alloc_near_error
);
1425 DEFINE_ALLOC_EVENT(xfs_alloc_near_noentry
);
1426 DEFINE_ALLOC_EVENT(xfs_alloc_near_busy
);
1427 DEFINE_ALLOC_EVENT(xfs_alloc_size_neither
);
1428 DEFINE_ALLOC_EVENT(xfs_alloc_size_noentry
);
1429 DEFINE_ALLOC_EVENT(xfs_alloc_size_nominleft
);
1430 DEFINE_ALLOC_EVENT(xfs_alloc_size_done
);
1431 DEFINE_ALLOC_EVENT(xfs_alloc_size_error
);
1432 DEFINE_ALLOC_EVENT(xfs_alloc_size_busy
);
1433 DEFINE_ALLOC_EVENT(xfs_alloc_small_freelist
);
1434 DEFINE_ALLOC_EVENT(xfs_alloc_small_notenough
);
1435 DEFINE_ALLOC_EVENT(xfs_alloc_small_done
);
1436 DEFINE_ALLOC_EVENT(xfs_alloc_small_error
);
1437 DEFINE_ALLOC_EVENT(xfs_alloc_vextent_badargs
);
1438 DEFINE_ALLOC_EVENT(xfs_alloc_vextent_nofix
);
1439 DEFINE_ALLOC_EVENT(xfs_alloc_vextent_noagbp
);
1440 DEFINE_ALLOC_EVENT(xfs_alloc_vextent_loopfailed
);
1441 DEFINE_ALLOC_EVENT(xfs_alloc_vextent_allfailed
);
1443 DECLARE_EVENT_CLASS(xfs_da_class
,
1444 TP_PROTO(struct xfs_da_args
*args
),
1448 __field(xfs_ino_t
, ino
)
1449 __dynamic_array(char, name
, args
->namelen
)
1450 __field(int, namelen
)
1451 __field(xfs_dahash_t
, hashval
)
1452 __field(xfs_ino_t
, inumber
)
1453 __field(int, op_flags
)
1456 __entry
->dev
= VFS_I(args
->dp
)->i_sb
->s_dev
;
1457 __entry
->ino
= args
->dp
->i_ino
;
1459 memcpy(__get_str(name
), args
->name
, args
->namelen
);
1460 __entry
->namelen
= args
->namelen
;
1461 __entry
->hashval
= args
->hashval
;
1462 __entry
->inumber
= args
->inumber
;
1463 __entry
->op_flags
= args
->op_flags
;
1465 TP_printk("dev %d:%d ino 0x%llx name %.*s namelen %d hashval 0x%x "
1466 "inumber 0x%llx op_flags %s",
1467 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1470 __entry
->namelen
? __get_str(name
) : NULL
,
1474 __print_flags(__entry
->op_flags
, "|", XFS_DA_OP_FLAGS
))
1477 #define DEFINE_DIR2_EVENT(name) \
1478 DEFINE_EVENT(xfs_da_class, name, \
1479 TP_PROTO(struct xfs_da_args *args), \
1481 DEFINE_DIR2_EVENT(xfs_dir2_sf_addname
);
1482 DEFINE_DIR2_EVENT(xfs_dir2_sf_create
);
1483 DEFINE_DIR2_EVENT(xfs_dir2_sf_lookup
);
1484 DEFINE_DIR2_EVENT(xfs_dir2_sf_replace
);
1485 DEFINE_DIR2_EVENT(xfs_dir2_sf_removename
);
1486 DEFINE_DIR2_EVENT(xfs_dir2_sf_toino4
);
1487 DEFINE_DIR2_EVENT(xfs_dir2_sf_toino8
);
1488 DEFINE_DIR2_EVENT(xfs_dir2_sf_to_block
);
1489 DEFINE_DIR2_EVENT(xfs_dir2_block_addname
);
1490 DEFINE_DIR2_EVENT(xfs_dir2_block_lookup
);
1491 DEFINE_DIR2_EVENT(xfs_dir2_block_replace
);
1492 DEFINE_DIR2_EVENT(xfs_dir2_block_removename
);
1493 DEFINE_DIR2_EVENT(xfs_dir2_block_to_sf
);
1494 DEFINE_DIR2_EVENT(xfs_dir2_block_to_leaf
);
1495 DEFINE_DIR2_EVENT(xfs_dir2_leaf_addname
);
1496 DEFINE_DIR2_EVENT(xfs_dir2_leaf_lookup
);
1497 DEFINE_DIR2_EVENT(xfs_dir2_leaf_replace
);
1498 DEFINE_DIR2_EVENT(xfs_dir2_leaf_removename
);
1499 DEFINE_DIR2_EVENT(xfs_dir2_leaf_to_block
);
1500 DEFINE_DIR2_EVENT(xfs_dir2_leaf_to_node
);
1501 DEFINE_DIR2_EVENT(xfs_dir2_node_addname
);
1502 DEFINE_DIR2_EVENT(xfs_dir2_node_lookup
);
1503 DEFINE_DIR2_EVENT(xfs_dir2_node_replace
);
1504 DEFINE_DIR2_EVENT(xfs_dir2_node_removename
);
1505 DEFINE_DIR2_EVENT(xfs_dir2_node_to_leaf
);
1507 DECLARE_EVENT_CLASS(xfs_attr_class
,
1508 TP_PROTO(struct xfs_da_args
*args
),
1512 __field(xfs_ino_t
, ino
)
1513 __dynamic_array(char, name
, args
->namelen
)
1514 __field(int, namelen
)
1515 __field(int, valuelen
)
1516 __field(xfs_dahash_t
, hashval
)
1517 __field(int, op_flags
)
1520 __entry
->dev
= VFS_I(args
->dp
)->i_sb
->s_dev
;
1521 __entry
->ino
= args
->dp
->i_ino
;
1523 memcpy(__get_str(name
), args
->name
, args
->namelen
);
1524 __entry
->namelen
= args
->namelen
;
1525 __entry
->valuelen
= args
->valuelen
;
1526 __entry
->hashval
= args
->hashval
;
1527 __entry
->op_flags
= args
->op_flags
;
1529 TP_printk("dev %d:%d ino 0x%llx name %.*s namelen %d valuelen %d "
1530 "hashval 0x%x op_flags %s",
1531 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1534 __entry
->namelen
? __get_str(name
) : NULL
,
1538 __print_flags(__entry
->op_flags
, "|", XFS_DA_OP_FLAGS
))
1541 #define DEFINE_ATTR_EVENT(name) \
1542 DEFINE_EVENT(xfs_attr_class, name, \
1543 TP_PROTO(struct xfs_da_args *args), \
1545 DEFINE_ATTR_EVENT(xfs_attr_sf_add
);
1546 DEFINE_ATTR_EVENT(xfs_attr_sf_addname
);
1547 DEFINE_ATTR_EVENT(xfs_attr_sf_create
);
1548 DEFINE_ATTR_EVENT(xfs_attr_sf_lookup
);
1549 DEFINE_ATTR_EVENT(xfs_attr_sf_remove
);
1550 DEFINE_ATTR_EVENT(xfs_attr_sf_removename
);
1551 DEFINE_ATTR_EVENT(xfs_attr_sf_to_leaf
);
1553 DEFINE_ATTR_EVENT(xfs_attr_leaf_add
);
1554 DEFINE_ATTR_EVENT(xfs_attr_leaf_add_old
);
1555 DEFINE_ATTR_EVENT(xfs_attr_leaf_add_new
);
1556 DEFINE_ATTR_EVENT(xfs_attr_leaf_add_work
);
1557 DEFINE_ATTR_EVENT(xfs_attr_leaf_addname
);
1558 DEFINE_ATTR_EVENT(xfs_attr_leaf_create
);
1559 DEFINE_ATTR_EVENT(xfs_attr_leaf_compact
);
1560 DEFINE_ATTR_EVENT(xfs_attr_leaf_get
);
1561 DEFINE_ATTR_EVENT(xfs_attr_leaf_lookup
);
1562 DEFINE_ATTR_EVENT(xfs_attr_leaf_replace
);
1563 DEFINE_ATTR_EVENT(xfs_attr_leaf_remove
);
1564 DEFINE_ATTR_EVENT(xfs_attr_leaf_removename
);
1565 DEFINE_ATTR_EVENT(xfs_attr_leaf_split
);
1566 DEFINE_ATTR_EVENT(xfs_attr_leaf_split_before
);
1567 DEFINE_ATTR_EVENT(xfs_attr_leaf_split_after
);
1568 DEFINE_ATTR_EVENT(xfs_attr_leaf_clearflag
);
1569 DEFINE_ATTR_EVENT(xfs_attr_leaf_setflag
);
1570 DEFINE_ATTR_EVENT(xfs_attr_leaf_flipflags
);
1571 DEFINE_ATTR_EVENT(xfs_attr_leaf_to_sf
);
1572 DEFINE_ATTR_EVENT(xfs_attr_leaf_to_node
);
1573 DEFINE_ATTR_EVENT(xfs_attr_leaf_rebalance
);
1574 DEFINE_ATTR_EVENT(xfs_attr_leaf_unbalance
);
1575 DEFINE_ATTR_EVENT(xfs_attr_leaf_toosmall
);
1577 DEFINE_ATTR_EVENT(xfs_attr_node_addname
);
1578 DEFINE_ATTR_EVENT(xfs_attr_node_get
);
1579 DEFINE_ATTR_EVENT(xfs_attr_node_lookup
);
1580 DEFINE_ATTR_EVENT(xfs_attr_node_replace
);
1581 DEFINE_ATTR_EVENT(xfs_attr_node_removename
);
1583 DEFINE_ATTR_EVENT(xfs_attr_fillstate
);
1584 DEFINE_ATTR_EVENT(xfs_attr_refillstate
);
1586 DEFINE_ATTR_EVENT(xfs_attr_rmtval_get
);
1587 DEFINE_ATTR_EVENT(xfs_attr_rmtval_set
);
1588 DEFINE_ATTR_EVENT(xfs_attr_rmtval_remove
);
1590 #define DEFINE_DA_EVENT(name) \
1591 DEFINE_EVENT(xfs_da_class, name, \
1592 TP_PROTO(struct xfs_da_args *args), \
1594 DEFINE_DA_EVENT(xfs_da_split
);
1595 DEFINE_DA_EVENT(xfs_da_join
);
1596 DEFINE_DA_EVENT(xfs_da_link_before
);
1597 DEFINE_DA_EVENT(xfs_da_link_after
);
1598 DEFINE_DA_EVENT(xfs_da_unlink_back
);
1599 DEFINE_DA_EVENT(xfs_da_unlink_forward
);
1600 DEFINE_DA_EVENT(xfs_da_root_split
);
1601 DEFINE_DA_EVENT(xfs_da_root_join
);
1602 DEFINE_DA_EVENT(xfs_da_node_add
);
1603 DEFINE_DA_EVENT(xfs_da_node_create
);
1604 DEFINE_DA_EVENT(xfs_da_node_split
);
1605 DEFINE_DA_EVENT(xfs_da_node_remove
);
1606 DEFINE_DA_EVENT(xfs_da_node_rebalance
);
1607 DEFINE_DA_EVENT(xfs_da_node_unbalance
);
1608 DEFINE_DA_EVENT(xfs_da_node_toosmall
);
1609 DEFINE_DA_EVENT(xfs_da_swap_lastblock
);
1610 DEFINE_DA_EVENT(xfs_da_grow_inode
);
1611 DEFINE_DA_EVENT(xfs_da_shrink_inode
);
1612 DEFINE_DA_EVENT(xfs_da_fixhashpath
);
1613 DEFINE_DA_EVENT(xfs_da_path_shift
);
1615 DECLARE_EVENT_CLASS(xfs_dir2_space_class
,
1616 TP_PROTO(struct xfs_da_args
*args
, int idx
),
1620 __field(xfs_ino_t
, ino
)
1621 __field(int, op_flags
)
1625 __entry
->dev
= VFS_I(args
->dp
)->i_sb
->s_dev
;
1626 __entry
->ino
= args
->dp
->i_ino
;
1627 __entry
->op_flags
= args
->op_flags
;
1630 TP_printk("dev %d:%d ino 0x%llx op_flags %s index %d",
1631 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1633 __print_flags(__entry
->op_flags
, "|", XFS_DA_OP_FLAGS
),
1637 #define DEFINE_DIR2_SPACE_EVENT(name) \
1638 DEFINE_EVENT(xfs_dir2_space_class, name, \
1639 TP_PROTO(struct xfs_da_args *args, int idx), \
1641 DEFINE_DIR2_SPACE_EVENT(xfs_dir2_leafn_add
);
1642 DEFINE_DIR2_SPACE_EVENT(xfs_dir2_leafn_remove
);
1643 DEFINE_DIR2_SPACE_EVENT(xfs_dir2_grow_inode
);
1644 DEFINE_DIR2_SPACE_EVENT(xfs_dir2_shrink_inode
);
1646 TRACE_EVENT(xfs_dir2_leafn_moveents
,
1647 TP_PROTO(struct xfs_da_args
*args
, int src_idx
, int dst_idx
, int count
),
1648 TP_ARGS(args
, src_idx
, dst_idx
, count
),
1651 __field(xfs_ino_t
, ino
)
1652 __field(int, op_flags
)
1653 __field(int, src_idx
)
1654 __field(int, dst_idx
)
1658 __entry
->dev
= VFS_I(args
->dp
)->i_sb
->s_dev
;
1659 __entry
->ino
= args
->dp
->i_ino
;
1660 __entry
->op_flags
= args
->op_flags
;
1661 __entry
->src_idx
= src_idx
;
1662 __entry
->dst_idx
= dst_idx
;
1663 __entry
->count
= count
;
1665 TP_printk("dev %d:%d ino 0x%llx op_flags %s "
1666 "src_idx %d dst_idx %d count %d",
1667 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1669 __print_flags(__entry
->op_flags
, "|", XFS_DA_OP_FLAGS
),
1675 #define XFS_SWAPEXT_INODES \
1679 #define XFS_INODE_FORMAT_STR \
1685 DECLARE_EVENT_CLASS(xfs_swap_extent_class
,
1686 TP_PROTO(struct xfs_inode
*ip
, int which
),
1691 __field(xfs_ino_t
, ino
)
1692 __field(int, format
)
1694 __field(int, broot_size
)
1695 __field(int, fork_off
)
1698 __entry
->dev
= VFS_I(ip
)->i_sb
->s_dev
;
1699 __entry
->which
= which
;
1700 __entry
->ino
= ip
->i_ino
;
1701 __entry
->format
= ip
->i_d
.di_format
;
1702 __entry
->nex
= ip
->i_d
.di_nextents
;
1703 __entry
->broot_size
= ip
->i_df
.if_broot_bytes
;
1704 __entry
->fork_off
= XFS_IFORK_BOFF(ip
);
1706 TP_printk("dev %d:%d ino 0x%llx (%s), %s format, num_extents %d, "
1707 "broot size %d, fork offset %d",
1708 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1710 __print_symbolic(__entry
->which
, XFS_SWAPEXT_INODES
),
1711 __print_symbolic(__entry
->format
, XFS_INODE_FORMAT_STR
),
1713 __entry
->broot_size
,
1717 #define DEFINE_SWAPEXT_EVENT(name) \
1718 DEFINE_EVENT(xfs_swap_extent_class, name, \
1719 TP_PROTO(struct xfs_inode *ip, int which), \
1722 DEFINE_SWAPEXT_EVENT(xfs_swap_extent_before
);
1723 DEFINE_SWAPEXT_EVENT(xfs_swap_extent_after
);
1725 DECLARE_EVENT_CLASS(xfs_log_recover_item_class
,
1726 TP_PROTO(struct xlog
*log
, struct xlog_recover
*trans
,
1727 struct xlog_recover_item
*item
, int pass
),
1728 TP_ARGS(log
, trans
, item
, pass
),
1731 __field(unsigned long, item
)
1732 __field(xlog_tid_t
, tid
)
1739 __entry
->dev
= log
->l_mp
->m_super
->s_dev
;
1740 __entry
->item
= (unsigned long)item
;
1741 __entry
->tid
= trans
->r_log_tid
;
1742 __entry
->type
= ITEM_TYPE(item
);
1743 __entry
->pass
= pass
;
1744 __entry
->count
= item
->ri_cnt
;
1745 __entry
->total
= item
->ri_total
;
1747 TP_printk("dev %d:%d trans 0x%x, pass %d, item 0x%p, item type %s "
1748 "item region count/total %d/%d",
1749 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1752 (void *)__entry
->item
,
1753 __print_symbolic(__entry
->type
, XFS_LI_TYPE_DESC
),
1758 #define DEFINE_LOG_RECOVER_ITEM(name) \
1759 DEFINE_EVENT(xfs_log_recover_item_class, name, \
1760 TP_PROTO(struct xlog *log, struct xlog_recover *trans, \
1761 struct xlog_recover_item *item, int pass), \
1762 TP_ARGS(log, trans, item, pass))
1764 DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_add
);
1765 DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_add_cont
);
1766 DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_reorder_head
);
1767 DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_reorder_tail
);
1768 DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_recover
);
1770 DECLARE_EVENT_CLASS(xfs_log_recover_buf_item_class
,
1771 TP_PROTO(struct xlog
*log
, struct xfs_buf_log_format
*buf_f
),
1772 TP_ARGS(log
, buf_f
),
1775 __field(__int64_t
, blkno
)
1776 __field(unsigned short, len
)
1777 __field(unsigned short, flags
)
1778 __field(unsigned short, size
)
1779 __field(unsigned int, map_size
)
1782 __entry
->dev
= log
->l_mp
->m_super
->s_dev
;
1783 __entry
->blkno
= buf_f
->blf_blkno
;
1784 __entry
->len
= buf_f
->blf_len
;
1785 __entry
->flags
= buf_f
->blf_flags
;
1786 __entry
->size
= buf_f
->blf_size
;
1787 __entry
->map_size
= buf_f
->blf_map_size
;
1789 TP_printk("dev %d:%d blkno 0x%llx, len %u, flags 0x%x, size %d, "
1791 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1799 #define DEFINE_LOG_RECOVER_BUF_ITEM(name) \
1800 DEFINE_EVENT(xfs_log_recover_buf_item_class, name, \
1801 TP_PROTO(struct xlog *log, struct xfs_buf_log_format *buf_f), \
1802 TP_ARGS(log, buf_f))
1804 DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_not_cancel
);
1805 DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel
);
1806 DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel_add
);
1807 DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel_ref_inc
);
1808 DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_recover
);
1809 DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_inode_buf
);
1810 DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_reg_buf
);
1811 DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_dquot_buf
);
1813 DECLARE_EVENT_CLASS(xfs_log_recover_ino_item_class
,
1814 TP_PROTO(struct xlog
*log
, struct xfs_inode_log_format
*in_f
),
1818 __field(xfs_ino_t
, ino
)
1819 __field(unsigned short, size
)
1820 __field(int, fields
)
1821 __field(unsigned short, asize
)
1822 __field(unsigned short, dsize
)
1823 __field(__int64_t
, blkno
)
1825 __field(int, boffset
)
1828 __entry
->dev
= log
->l_mp
->m_super
->s_dev
;
1829 __entry
->ino
= in_f
->ilf_ino
;
1830 __entry
->size
= in_f
->ilf_size
;
1831 __entry
->fields
= in_f
->ilf_fields
;
1832 __entry
->asize
= in_f
->ilf_asize
;
1833 __entry
->dsize
= in_f
->ilf_dsize
;
1834 __entry
->blkno
= in_f
->ilf_blkno
;
1835 __entry
->len
= in_f
->ilf_len
;
1836 __entry
->boffset
= in_f
->ilf_boffset
;
1838 TP_printk("dev %d:%d ino 0x%llx, size %u, fields 0x%x, asize %d, "
1839 "dsize %d, blkno 0x%llx, len %d, boffset %d",
1840 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1850 #define DEFINE_LOG_RECOVER_INO_ITEM(name) \
1851 DEFINE_EVENT(xfs_log_recover_ino_item_class, name, \
1852 TP_PROTO(struct xlog *log, struct xfs_inode_log_format *in_f), \
1855 DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_recover
);
1856 DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_cancel
);
1857 DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_skip
);
1859 DECLARE_EVENT_CLASS(xfs_discard_class
,
1860 TP_PROTO(struct xfs_mount
*mp
, xfs_agnumber_t agno
,
1861 xfs_agblock_t agbno
, xfs_extlen_t len
),
1862 TP_ARGS(mp
, agno
, agbno
, len
),
1865 __field(xfs_agnumber_t
, agno
)
1866 __field(xfs_agblock_t
, agbno
)
1867 __field(xfs_extlen_t
, len
)
1870 __entry
->dev
= mp
->m_super
->s_dev
;
1871 __entry
->agno
= agno
;
1872 __entry
->agbno
= agbno
;
1875 TP_printk("dev %d:%d agno %u agbno %u len %u\n",
1876 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1882 #define DEFINE_DISCARD_EVENT(name) \
1883 DEFINE_EVENT(xfs_discard_class, name, \
1884 TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
1885 xfs_agblock_t agbno, xfs_extlen_t len), \
1886 TP_ARGS(mp, agno, agbno, len))
1887 DEFINE_DISCARD_EVENT(xfs_discard_extent
);
1888 DEFINE_DISCARD_EVENT(xfs_discard_toosmall
);
1889 DEFINE_DISCARD_EVENT(xfs_discard_exclude
);
1890 DEFINE_DISCARD_EVENT(xfs_discard_busy
);
1892 #endif /* _TRACE_XFS_H */
1894 #undef TRACE_INCLUDE_PATH
1895 #define TRACE_INCLUDE_PATH .
1896 #define TRACE_INCLUDE_FILE xfs_trace
1897 #include <trace/define_trace.h>