Line data Source code
1 : // SPDX-License-Identifier: GPL-2.0
2 : /*
3 : * Copyright (c) 2009, Christoph Hellwig
4 : * All Rights Reserved.
5 : *
6 : * NOTE: none of these tracepoints shall be considered a stable kernel ABI
7 : * as they can change at any time.
8 : *
9 : * Current conventions for printing numbers measuring specific units:
10 : *
11 : * agno: allocation group number
12 : *
13 : * agino: per-AG inode number
14 : * ino: filesystem inode number
15 : *
16 : * agbno: per-AG block number in fs blocks
17 : * rgbno: per-rtgroup block number in fs blocks
18 : * startblock: physical block number for file mappings. This is either a
19 : * segmented fsblock for data device mappings, or a rfsblock
20 : * for realtime device mappings
21 : * fsbcount: number of blocks in an extent, in fs blocks
22 : *
23 : * rmapbno: physical block number for a reverse mapping. This is an agbno for
24 : * per-AG rmap btrees or a rgbno for realtime rmap btrees.
25 : * refcbno: physical block number for a refcount record. This is an agbno for
26 : * per-AG refcount btrees or a rgbno for realtime refcount btrees.
27 : *
28 : * daddr: physical block number in 512b blocks
29 : * bbcount: number of blocks in a physical extent, in 512b blocks
30 : *
31 : * rtx: physical rt extent number for extent mappings
32 : * rtxcount: number of rt extents in an extent mapping
33 : *
34 : * owner: reverse-mapping owner, usually inodes
35 : *
36 : * fileoff: file offset, in fs blocks
37 : * pos: file offset, in bytes
38 : * bytecount: number of bytes
39 : *
40 : * dablk: directory or xattr block offset, in filesystem blocks
41 : *
42 : * disize: ondisk file size, in bytes
43 : * isize: incore file size, in bytes
44 : *
45 : * forkoff: inode fork offset, in bytes
46 : *
47 : * ireccount: number of inode records
48 : *
49 : * Numbers describing space allocations (blocks, extents, inodes) should be
50 : * formatted in hexadecimal.
51 : */
52 : #undef TRACE_SYSTEM
53 : #define TRACE_SYSTEM xfs
54 :
55 : #if !defined(_TRACE_XFS_H) || defined(TRACE_HEADER_MULTI_READ)
56 : #define _TRACE_XFS_H
57 :
58 : #include <linux/tracepoint.h>
59 :
60 : struct xfs_agf;
61 : struct xfs_alloc_arg;
62 : struct xfs_attr_list_context;
63 : struct xfs_buf_log_item;
64 : struct xfs_da_args;
65 : struct xfs_da_node_entry;
66 : struct xfs_dquot;
67 : struct xfs_log_item;
68 : struct xlog;
69 : struct xlog_ticket;
70 : struct xlog_recover;
71 : struct xlog_recover_item;
72 : struct xlog_rec_header;
73 : struct xlog_in_core;
74 : struct xfs_buf_log_format;
75 : struct xfs_inode_log_format;
76 : struct xfs_bmbt_irec;
77 : struct xfs_btree_cur;
78 : struct xfs_refcount_irec;
79 : struct xfs_fsmap;
80 : struct xfs_rmap_irec;
81 : struct xfs_icreate_log;
82 : struct xfs_owner_info;
83 : struct xfs_trans_res;
84 : struct xfs_inobt_rec_incore;
85 : union xfs_btree_ptr;
86 : struct xfs_dqtrx;
87 : struct xfs_icwalk;
88 : struct xfs_perag;
89 : struct xfs_bmap_intent;
90 : struct xfs_swapext_intent;
91 : struct xfs_swapext_req;
92 : struct xfs_getparents;
93 : struct xfs_parent_name_irec;
94 : struct xfs_attrlist_cursor_kern;
95 : struct xfs_imeta_update;
96 : struct xfs_rtgroup;
97 : struct xfs_extent_free_item;
98 : struct xfs_rmap_intent;
99 : struct xfs_refcount_intent;
100 : struct xfs_fsrefs;
101 :
102 : #define XFS_ATTR_FILTER_FLAGS \
103 : { XFS_ATTR_ROOT, "ROOT" }, \
104 : { XFS_ATTR_SECURE, "SECURE" }, \
105 : { XFS_ATTR_INCOMPLETE, "INCOMPLETE" }, \
106 : { XFS_ATTR_PARENT, "PARENT" }
107 :
108 0 : DECLARE_EVENT_CLASS(xfs_attr_list_class,
109 : TP_PROTO(struct xfs_attr_list_context *ctx),
110 : TP_ARGS(ctx),
111 : TP_STRUCT__entry(
112 : __field(dev_t, dev)
113 : __field(xfs_ino_t, ino)
114 : __field(u32, hashval)
115 : __field(u32, blkno)
116 : __field(u32, offset)
117 : __field(void *, buffer)
118 : __field(int, bufsize)
119 : __field(int, count)
120 : __field(int, firstu)
121 : __field(int, dupcnt)
122 : __field(unsigned int, attr_filter)
123 : ),
124 : TP_fast_assign(
125 : __entry->dev = VFS_I(ctx->dp)->i_sb->s_dev;
126 : __entry->ino = ctx->dp->i_ino;
127 : __entry->hashval = ctx->cursor.hashval;
128 : __entry->blkno = ctx->cursor.blkno;
129 : __entry->offset = ctx->cursor.offset;
130 : __entry->buffer = ctx->buffer;
131 : __entry->bufsize = ctx->bufsize;
132 : __entry->count = ctx->count;
133 : __entry->firstu = ctx->firstu;
134 : __entry->attr_filter = ctx->attr_filter;
135 : ),
136 : TP_printk("dev %d:%d ino 0x%llx cursor h/b/o 0x%x/0x%x/%u dupcnt %u "
137 : "buffer %p size %u count %u firstu %u filter %s",
138 : MAJOR(__entry->dev), MINOR(__entry->dev),
139 : __entry->ino,
140 : __entry->hashval,
141 : __entry->blkno,
142 : __entry->offset,
143 : __entry->dupcnt,
144 : __entry->buffer,
145 : __entry->bufsize,
146 : __entry->count,
147 : __entry->firstu,
148 : __print_flags(__entry->attr_filter, "|",
149 : XFS_ATTR_FILTER_FLAGS)
150 : )
151 : )
152 :
153 : #define DEFINE_ATTR_LIST_EVENT(name) \
154 : DEFINE_EVENT(xfs_attr_list_class, name, \
155 : TP_PROTO(struct xfs_attr_list_context *ctx), \
156 : TP_ARGS(ctx))
157 194006554 : DEFINE_ATTR_LIST_EVENT(xfs_attr_list_sf);
158 187012113 : DEFINE_ATTR_LIST_EVENT(xfs_attr_list_sf_all);
159 398224907 : DEFINE_ATTR_LIST_EVENT(xfs_attr_list_leaf);
160 397628733 : DEFINE_ATTR_LIST_EVENT(xfs_attr_list_leaf_end);
161 365 : DEFINE_ATTR_LIST_EVENT(xfs_attr_list_full);
162 39567912 : DEFINE_ATTR_LIST_EVENT(xfs_attr_list_add);
163 325 : DEFINE_ATTR_LIST_EVENT(xfs_attr_list_wrong_blk);
164 601859 : DEFINE_ATTR_LIST_EVENT(xfs_attr_list_notfound);
165 89059023 : DEFINE_ATTR_LIST_EVENT(xfs_attr_leaf_list);
166 1960561 : DEFINE_ATTR_LIST_EVENT(xfs_attr_node_list);
167 :
168 0 : DECLARE_EVENT_CLASS(xfs_fs_error_class,
169 : TP_PROTO(struct xfs_mount *mp, int error, void *function),
170 : TP_ARGS(mp, error, function),
171 : TP_STRUCT__entry(
172 : __field(dev_t, dev)
173 : __field(int, error)
174 : __field(void *, function)
175 : ),
176 : TP_fast_assign(
177 : __entry->dev = mp->m_super->s_dev;
178 : __entry->error = error;
179 : __entry->function = function;
180 : ),
181 : TP_printk("dev %d:%d error %d function %pS",
182 : MAJOR(__entry->dev), MINOR(__entry->dev),
183 : __entry->error, __entry->function)
184 : );
185 : #define DEFINE_FS_ERROR_EVENT(name) \
186 : DEFINE_EVENT(xfs_fs_error_class, name, \
187 : TP_PROTO(struct xfs_mount *mp, int error, void *function), \
188 : TP_ARGS(mp, error, function))
189 2 : DEFINE_FS_ERROR_EVENT(xlog_intent_recovery_failed);
190 :
191 0 : DECLARE_EVENT_CLASS(xfs_perag_class,
192 : TP_PROTO(struct xfs_perag *pag, unsigned long caller_ip),
193 : TP_ARGS(pag, caller_ip),
194 : TP_STRUCT__entry(
195 : __field(dev_t, dev)
196 : __field(xfs_agnumber_t, agno)
197 : __field(int, refcount)
198 : __field(int, active_refcount)
199 : __field(unsigned long, caller_ip)
200 : ),
201 : TP_fast_assign(
202 : __entry->dev = pag->pag_mount->m_super->s_dev;
203 : __entry->agno = pag->pag_agno;
204 : __entry->refcount = atomic_read(&pag->pag_ref);
205 : __entry->active_refcount = atomic_read(&pag->pag_active_ref);
206 : __entry->caller_ip = caller_ip;
207 : ),
208 : TP_printk("dev %d:%d agno 0x%x passive refs %d active refs %d caller %pS",
209 : MAJOR(__entry->dev), MINOR(__entry->dev),
210 : __entry->agno,
211 : __entry->refcount,
212 : __entry->active_refcount,
213 : (char *)__entry->caller_ip)
214 : );
215 :
216 : #define DEFINE_PERAG_REF_EVENT(name) \
217 : DEFINE_EVENT(xfs_perag_class, name, \
218 : TP_PROTO(struct xfs_perag *pag, unsigned long caller_ip), \
219 : TP_ARGS(pag, caller_ip))
220 >10495*10^7 : DEFINE_PERAG_REF_EVENT(xfs_perag_get);
221 2438506 : DEFINE_PERAG_REF_EVENT(xfs_perag_get_tag);
222 6616644030 : DEFINE_PERAG_REF_EVENT(xfs_perag_hold);
223 >11166*10^7 : DEFINE_PERAG_REF_EVENT(xfs_perag_put);
224 693487007 : DEFINE_PERAG_REF_EVENT(xfs_perag_grab);
225 3231842 : DEFINE_PERAG_REF_EVENT(xfs_perag_grab_tag);
226 696878965 : DEFINE_PERAG_REF_EVENT(xfs_perag_rele);
227 5366657 : DEFINE_PERAG_REF_EVENT(xfs_perag_set_inode_tag);
228 9773392 : DEFINE_PERAG_REF_EVENT(xfs_perag_clear_inode_tag);
229 :
230 : #ifdef CONFIG_XFS_RT
231 0 : DECLARE_EVENT_CLASS(xfs_rtgroup_class,
232 : TP_PROTO(struct xfs_rtgroup *rtg, unsigned long caller_ip),
233 : TP_ARGS(rtg, caller_ip),
234 : TP_STRUCT__entry(
235 : __field(dev_t, dev)
236 : __field(xfs_rgnumber_t, rgno)
237 : __field(int, refcount)
238 : __field(int, active_refcount)
239 : __field(unsigned long, caller_ip)
240 : ),
241 : TP_fast_assign(
242 : __entry->dev = rtg->rtg_mount->m_super->s_dev;
243 : __entry->rgno = rtg->rtg_rgno;
244 : __entry->refcount = atomic_read(&rtg->rtg_ref);
245 : __entry->active_refcount = atomic_read(&rtg->rtg_active_ref);
246 : __entry->caller_ip = caller_ip;
247 : ),
248 : TP_printk("dev %d:%d rgno 0x%x passive refs %d active refs %d caller %pS",
249 : MAJOR(__entry->dev), MINOR(__entry->dev),
250 : __entry->rgno,
251 : __entry->refcount,
252 : __entry->active_refcount,
253 : (char *)__entry->caller_ip)
254 : );
255 :
256 : #define DEFINE_RTGROUP_REF_EVENT(name) \
257 : DEFINE_EVENT(xfs_rtgroup_class, name, \
258 : TP_PROTO(struct xfs_rtgroup *rtg, unsigned long caller_ip), \
259 : TP_ARGS(rtg, caller_ip))
260 192190361 : DEFINE_RTGROUP_REF_EVENT(xfs_rtgroup_get);
261 226154859 : DEFINE_RTGROUP_REF_EVENT(xfs_rtgroup_hold);
262 418333059 : DEFINE_RTGROUP_REF_EVENT(xfs_rtgroup_put);
263 1218509 : DEFINE_RTGROUP_REF_EVENT(xfs_rtgroup_grab);
264 1219739 : DEFINE_RTGROUP_REF_EVENT(xfs_rtgroup_rele);
265 : #endif /* CONFIG_XFS_RT */
266 :
267 4608130 : TRACE_EVENT(xfs_inodegc_worker,
268 : TP_PROTO(struct xfs_mount *mp, unsigned int shrinker_hits),
269 : TP_ARGS(mp, shrinker_hits),
270 : TP_STRUCT__entry(
271 : __field(dev_t, dev)
272 : __field(unsigned int, shrinker_hits)
273 : ),
274 : TP_fast_assign(
275 : __entry->dev = mp->m_super->s_dev;
276 : __entry->shrinker_hits = shrinker_hits;
277 : ),
278 : TP_printk("dev %d:%d shrinker_hits %u",
279 : MAJOR(__entry->dev), MINOR(__entry->dev),
280 : __entry->shrinker_hits)
281 : );
282 :
283 0 : DECLARE_EVENT_CLASS(xfs_fs_class,
284 : TP_PROTO(struct xfs_mount *mp, void *caller_ip),
285 : TP_ARGS(mp, caller_ip),
286 : TP_STRUCT__entry(
287 : __field(dev_t, dev)
288 : __field(unsigned long long, mflags)
289 : __field(unsigned long, opstate)
290 : __field(unsigned long, sbflags)
291 : __field(void *, caller_ip)
292 : ),
293 : TP_fast_assign(
294 : if (mp) {
295 : __entry->dev = mp->m_super->s_dev;
296 : __entry->mflags = mp->m_features;
297 : __entry->opstate = mp->m_opstate;
298 : __entry->sbflags = mp->m_super->s_flags;
299 : }
300 : __entry->caller_ip = caller_ip;
301 : ),
302 : TP_printk("dev %d:%d m_features 0x%llx opstate (%s) s_flags 0x%lx caller %pS",
303 : MAJOR(__entry->dev), MINOR(__entry->dev),
304 : __entry->mflags,
305 : __print_flags(__entry->opstate, "|", XFS_OPSTATE_STRINGS),
306 : __entry->sbflags,
307 : __entry->caller_ip)
308 : );
309 :
310 : #define DEFINE_FS_EVENT(name) \
311 : DEFINE_EVENT(xfs_fs_class, name, \
312 : TP_PROTO(struct xfs_mount *mp, void *caller_ip), \
313 : TP_ARGS(mp, caller_ip))
314 5055041 : DEFINE_FS_EVENT(xfs_inodegc_flush);
315 14168935 : DEFINE_FS_EVENT(xfs_inodegc_push);
316 73009 : DEFINE_FS_EVENT(xfs_inodegc_start);
317 73015 : DEFINE_FS_EVENT(xfs_inodegc_stop);
318 38274852 : DEFINE_FS_EVENT(xfs_inodegc_queue);
319 967834 : DEFINE_FS_EVENT(xfs_inodegc_throttle);
320 5476379 : DEFINE_FS_EVENT(xfs_fs_sync_fs);
321 73009 : DEFINE_FS_EVENT(xfs_blockgc_start);
322 72981 : DEFINE_FS_EVENT(xfs_blockgc_stop);
323 486519 : DEFINE_FS_EVENT(xfs_blockgc_worker);
324 4302409 : DEFINE_FS_EVENT(xfs_blockgc_flush_all);
325 :
326 119 : TRACE_EVENT(xfs_inodegc_shrinker_scan,
327 : TP_PROTO(struct xfs_mount *mp, struct shrink_control *sc,
328 : void *caller_ip),
329 : TP_ARGS(mp, sc, caller_ip),
330 : TP_STRUCT__entry(
331 : __field(dev_t, dev)
332 : __field(unsigned long, nr_to_scan)
333 : __field(void *, caller_ip)
334 : ),
335 : TP_fast_assign(
336 : __entry->dev = mp->m_super->s_dev;
337 : __entry->nr_to_scan = sc->nr_to_scan;
338 : __entry->caller_ip = caller_ip;
339 : ),
340 : TP_printk("dev %d:%d nr_to_scan %lu caller %pS",
341 : MAJOR(__entry->dev), MINOR(__entry->dev),
342 : __entry->nr_to_scan,
343 : __entry->caller_ip)
344 : );
345 :
346 0 : DECLARE_EVENT_CLASS(xfs_ag_class,
347 : TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno),
348 : TP_ARGS(mp, agno),
349 : TP_STRUCT__entry(
350 : __field(dev_t, dev)
351 : __field(xfs_agnumber_t, agno)
352 : ),
353 : TP_fast_assign(
354 : __entry->dev = mp->m_super->s_dev;
355 : __entry->agno = agno;
356 : ),
357 : TP_printk("dev %d:%d agno 0x%x",
358 : MAJOR(__entry->dev), MINOR(__entry->dev),
359 : __entry->agno)
360 : );
361 : #define DEFINE_AG_EVENT(name) \
362 : DEFINE_EVENT(xfs_ag_class, name, \
363 : TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno), \
364 : TP_ARGS(mp, agno))
365 :
366 1879781723 : DEFINE_AG_EVENT(xfs_read_agf);
367 1879787239 : DEFINE_AG_EVENT(xfs_alloc_read_agf);
368 1946496108 : DEFINE_AG_EVENT(xfs_read_agi);
369 1863064601 : DEFINE_AG_EVENT(xfs_ialloc_read_agi);
370 :
371 2042541 : TRACE_EVENT(xfs_attr_list_node_descend,
372 : TP_PROTO(struct xfs_attr_list_context *ctx,
373 : struct xfs_da_node_entry *btree),
374 : TP_ARGS(ctx, btree),
375 : TP_STRUCT__entry(
376 : __field(dev_t, dev)
377 : __field(xfs_ino_t, ino)
378 : __field(u32, hashval)
379 : __field(u32, blkno)
380 : __field(u32, offset)
381 : __field(void *, buffer)
382 : __field(int, bufsize)
383 : __field(int, count)
384 : __field(int, firstu)
385 : __field(int, dupcnt)
386 : __field(unsigned int, attr_filter)
387 : __field(u32, bt_hashval)
388 : __field(u32, bt_before)
389 : ),
390 : TP_fast_assign(
391 : __entry->dev = VFS_I(ctx->dp)->i_sb->s_dev;
392 : __entry->ino = ctx->dp->i_ino;
393 : __entry->hashval = ctx->cursor.hashval;
394 : __entry->blkno = ctx->cursor.blkno;
395 : __entry->offset = ctx->cursor.offset;
396 : __entry->buffer = ctx->buffer;
397 : __entry->bufsize = ctx->bufsize;
398 : __entry->count = ctx->count;
399 : __entry->firstu = ctx->firstu;
400 : __entry->attr_filter = ctx->attr_filter;
401 : __entry->bt_hashval = be32_to_cpu(btree->hashval);
402 : __entry->bt_before = be32_to_cpu(btree->before);
403 : ),
404 : TP_printk("dev %d:%d ino 0x%llx cursor h/b/o 0x%x/0x%x/%u dupcnt %u "
405 : "buffer %p size %u count %u firstu %u filter %s "
406 : "node hashval %u, node before %u",
407 : MAJOR(__entry->dev), MINOR(__entry->dev),
408 : __entry->ino,
409 : __entry->hashval,
410 : __entry->blkno,
411 : __entry->offset,
412 : __entry->dupcnt,
413 : __entry->buffer,
414 : __entry->bufsize,
415 : __entry->count,
416 : __entry->firstu,
417 : __print_flags(__entry->attr_filter, "|",
418 : XFS_ATTR_FILTER_FLAGS),
419 : __entry->bt_hashval,
420 : __entry->bt_before)
421 : );
422 :
423 0 : DECLARE_EVENT_CLASS(xfs_bmap_class,
424 : TP_PROTO(struct xfs_inode *ip, struct xfs_iext_cursor *cur, int state,
425 : unsigned long caller_ip),
426 : TP_ARGS(ip, cur, state, caller_ip),
427 : TP_STRUCT__entry(
428 : __field(dev_t, dev)
429 : __field(xfs_ino_t, ino)
430 : __field(void *, leaf)
431 : __field(int, pos)
432 : __field(xfs_fileoff_t, startoff)
433 : __field(xfs_fsblock_t, startblock)
434 : __field(xfs_filblks_t, blockcount)
435 : __field(xfs_exntst_t, state)
436 : __field(int, bmap_state)
437 : __field(unsigned long, caller_ip)
438 : ),
439 : TP_fast_assign(
440 : struct xfs_ifork *ifp;
441 : struct xfs_bmbt_irec r;
442 :
443 : ifp = xfs_iext_state_to_fork(ip, state);
444 : xfs_iext_get_extent(ifp, cur, &r);
445 : __entry->dev = VFS_I(ip)->i_sb->s_dev;
446 : __entry->ino = ip->i_ino;
447 : __entry->leaf = cur->leaf;
448 : __entry->pos = cur->pos;
449 : __entry->startoff = r.br_startoff;
450 : __entry->startblock = r.br_startblock;
451 : __entry->blockcount = r.br_blockcount;
452 : __entry->state = r.br_state;
453 : __entry->bmap_state = state;
454 : __entry->caller_ip = caller_ip;
455 : ),
456 : TP_printk("dev %d:%d ino 0x%llx state %s cur %p/%d "
457 : "fileoff 0x%llx startblock 0x%llx fsbcount 0x%llx flag %d caller %pS",
458 : MAJOR(__entry->dev), MINOR(__entry->dev),
459 : __entry->ino,
460 : __print_flags(__entry->bmap_state, "|", XFS_BMAP_EXT_FLAGS),
461 : __entry->leaf,
462 : __entry->pos,
463 : __entry->startoff,
464 : (int64_t)__entry->startblock,
465 : __entry->blockcount,
466 : __entry->state,
467 : (char *)__entry->caller_ip)
468 : )
469 :
470 : #define DEFINE_BMAP_EVENT(name) \
471 : DEFINE_EVENT(xfs_bmap_class, name, \
472 : TP_PROTO(struct xfs_inode *ip, struct xfs_iext_cursor *cur, int state, \
473 : unsigned long caller_ip), \
474 : TP_ARGS(ip, cur, state, caller_ip))
475 1590502813 : DEFINE_BMAP_EVENT(xfs_iext_insert);
476 103858236 : DEFINE_BMAP_EVENT(xfs_iext_remove);
477 105462847 : DEFINE_BMAP_EVENT(xfs_bmap_pre_update);
478 105462843 : DEFINE_BMAP_EVENT(xfs_bmap_post_update);
479 1428612992 : DEFINE_BMAP_EVENT(xfs_read_extent);
480 1313135788 : DEFINE_BMAP_EVENT(xfs_write_extent);
481 :
482 0 : DECLARE_EVENT_CLASS(xfs_buf_class,
483 : TP_PROTO(struct xfs_buf *bp, unsigned long caller_ip),
484 : TP_ARGS(bp, caller_ip),
485 : TP_STRUCT__entry(
486 : __field(dev_t, dev)
487 : __field(xfs_daddr_t, bno)
488 : __field(int, nblks)
489 : __field(int, hold)
490 : __field(int, pincount)
491 : __field(unsigned, lockval)
492 : __field(unsigned, flags)
493 : __field(unsigned long, caller_ip)
494 : __field(const void *, buf_ops)
495 : ),
496 : TP_fast_assign(
497 : __entry->dev = bp->b_target->bt_dev;
498 : __entry->bno = xfs_buf_daddr(bp);
499 : __entry->nblks = bp->b_length;
500 : __entry->hold = atomic_read(&bp->b_hold);
501 : __entry->pincount = atomic_read(&bp->b_pin_count);
502 : __entry->lockval = bp->b_sema.count;
503 : __entry->flags = bp->b_flags;
504 : __entry->caller_ip = caller_ip;
505 : __entry->buf_ops = bp->b_ops;
506 : ),
507 : TP_printk("dev %d:%d daddr 0x%llx bbcount 0x%x hold %d pincount %d "
508 : "lock %d flags %s bufops %pS caller %pS",
509 : MAJOR(__entry->dev), MINOR(__entry->dev),
510 : (unsigned long long)__entry->bno,
511 : __entry->nblks,
512 : __entry->hold,
513 : __entry->pincount,
514 : __entry->lockval,
515 : __print_flags(__entry->flags, "|", XFS_BUF_FLAGS),
516 : __entry->buf_ops,
517 : (void *)__entry->caller_ip)
518 : )
519 :
520 : #define DEFINE_BUF_EVENT(name) \
521 : DEFINE_EVENT(xfs_buf_class, name, \
522 : TP_PROTO(struct xfs_buf *bp, unsigned long caller_ip), \
523 : TP_ARGS(bp, caller_ip))
524 82311220 : DEFINE_BUF_EVENT(xfs_buf_init);
525 82315258 : DEFINE_BUF_EVENT(xfs_buf_free);
526 9497640906 : DEFINE_BUF_EVENT(xfs_buf_hold);
527 38223528625 : DEFINE_BUF_EVENT(xfs_buf_rele);
528 221937466 : DEFINE_BUF_EVENT(xfs_buf_iodone);
529 220968963 : DEFINE_BUF_EVENT(xfs_buf_submit);
530 22863984720 : DEFINE_BUF_EVENT(xfs_buf_lock);
531 22864979706 : DEFINE_BUF_EVENT(xfs_buf_lock_done);
532 105357857 : DEFINE_BUF_EVENT(xfs_buf_trylock_fail);
533 5823310211 : DEFINE_BUF_EVENT(xfs_buf_trylock);
534 28756016625 : DEFINE_BUF_EVENT(xfs_buf_unlock);
535 43402270 : DEFINE_BUF_EVENT(xfs_buf_iowait);
536 43401585 : DEFINE_BUF_EVENT(xfs_buf_iowait_done);
537 180531941 : DEFINE_BUF_EVENT(xfs_buf_delwri_queue);
538 13299601 : DEFINE_BUF_EVENT(xfs_buf_delwri_queued);
539 180441117 : DEFINE_BUF_EVENT(xfs_buf_delwri_split);
540 0 : DEFINE_BUF_EVENT(xfs_buf_delwri_pushbuf);
541 156295 : DEFINE_BUF_EVENT(xfs_buf_get_uncached);
542 8495413562 : DEFINE_BUF_EVENT(xfs_buf_item_relse);
543 1668 : DEFINE_BUF_EVENT(xfs_buf_iodone_async);
544 2612098 : DEFINE_BUF_EVENT(xfs_buf_error_relse);
545 0 : DEFINE_BUF_EVENT(xfs_buf_drain_buftarg);
546 1450913 : DEFINE_BUF_EVENT(xfs_trans_read_buf_shut);
547 :
548 : /* not really buffer traces, but the buf provides useful information */
549 272 : DEFINE_BUF_EVENT(xfs_btree_corrupt);
550 806 : DEFINE_BUF_EVENT(xfs_reset_dqcounts);
551 :
552 : /* pass flags explicitly */
553 0 : DECLARE_EVENT_CLASS(xfs_buf_flags_class,
554 : TP_PROTO(struct xfs_buf *bp, unsigned flags, unsigned long caller_ip),
555 : TP_ARGS(bp, flags, caller_ip),
556 : TP_STRUCT__entry(
557 : __field(dev_t, dev)
558 : __field(xfs_daddr_t, bno)
559 : __field(unsigned int, length)
560 : __field(int, hold)
561 : __field(int, pincount)
562 : __field(unsigned, lockval)
563 : __field(unsigned, flags)
564 : __field(unsigned long, caller_ip)
565 : ),
566 : TP_fast_assign(
567 : __entry->dev = bp->b_target->bt_dev;
568 : __entry->bno = xfs_buf_daddr(bp);
569 : __entry->length = bp->b_length;
570 : __entry->flags = flags;
571 : __entry->hold = atomic_read(&bp->b_hold);
572 : __entry->pincount = atomic_read(&bp->b_pin_count);
573 : __entry->lockval = bp->b_sema.count;
574 : __entry->caller_ip = caller_ip;
575 : ),
576 : TP_printk("dev %d:%d daddr 0x%llx bbcount 0x%x hold %d pincount %d "
577 : "lock %d flags %s caller %pS",
578 : MAJOR(__entry->dev), MINOR(__entry->dev),
579 : (unsigned long long)__entry->bno,
580 : __entry->length,
581 : __entry->hold,
582 : __entry->pincount,
583 : __entry->lockval,
584 : __print_flags(__entry->flags, "|", XFS_BUF_FLAGS),
585 : (void *)__entry->caller_ip)
586 : )
587 :
588 : #define DEFINE_BUF_FLAGS_EVENT(name) \
589 : DEFINE_EVENT(xfs_buf_flags_class, name, \
590 : TP_PROTO(struct xfs_buf *bp, unsigned flags, unsigned long caller_ip), \
591 : TP_ARGS(bp, flags, caller_ip))
592 28359812111 : DEFINE_BUF_FLAGS_EVENT(xfs_buf_find);
593 28433166448 : DEFINE_BUF_FLAGS_EVENT(xfs_buf_get);
594 28371875465 : DEFINE_BUF_FLAGS_EVENT(xfs_buf_read);
595 :
596 71187284 : TRACE_EVENT(xfs_buf_ioerror,
597 : TP_PROTO(struct xfs_buf *bp, int error, xfs_failaddr_t caller_ip),
598 : TP_ARGS(bp, error, caller_ip),
599 : TP_STRUCT__entry(
600 : __field(dev_t, dev)
601 : __field(xfs_daddr_t, bno)
602 : __field(unsigned int, length)
603 : __field(unsigned, flags)
604 : __field(int, hold)
605 : __field(int, pincount)
606 : __field(unsigned, lockval)
607 : __field(int, error)
608 : __field(xfs_failaddr_t, caller_ip)
609 : ),
610 : TP_fast_assign(
611 : __entry->dev = bp->b_target->bt_dev;
612 : __entry->bno = xfs_buf_daddr(bp);
613 : __entry->length = bp->b_length;
614 : __entry->hold = atomic_read(&bp->b_hold);
615 : __entry->pincount = atomic_read(&bp->b_pin_count);
616 : __entry->lockval = bp->b_sema.count;
617 : __entry->error = error;
618 : __entry->flags = bp->b_flags;
619 : __entry->caller_ip = caller_ip;
620 : ),
621 : TP_printk("dev %d:%d daddr 0x%llx bbcount 0x%x hold %d pincount %d "
622 : "lock %d error %d flags %s caller %pS",
623 : MAJOR(__entry->dev), MINOR(__entry->dev),
624 : (unsigned long long)__entry->bno,
625 : __entry->length,
626 : __entry->hold,
627 : __entry->pincount,
628 : __entry->lockval,
629 : __entry->error,
630 : __print_flags(__entry->flags, "|", XFS_BUF_FLAGS),
631 : (void *)__entry->caller_ip)
632 : );
633 :
634 0 : DECLARE_EVENT_CLASS(xfs_buf_item_class,
635 : TP_PROTO(struct xfs_buf_log_item *bip),
636 : TP_ARGS(bip),
637 : TP_STRUCT__entry(
638 : __field(dev_t, dev)
639 : __field(xfs_daddr_t, buf_bno)
640 : __field(unsigned int, buf_len)
641 : __field(int, buf_hold)
642 : __field(int, buf_pincount)
643 : __field(int, buf_lockval)
644 : __field(unsigned, buf_flags)
645 : __field(unsigned, bli_recur)
646 : __field(int, bli_refcount)
647 : __field(unsigned, bli_flags)
648 : __field(unsigned long, li_flags)
649 : ),
650 : TP_fast_assign(
651 : __entry->dev = bip->bli_buf->b_target->bt_dev;
652 : __entry->bli_flags = bip->bli_flags;
653 : __entry->bli_recur = bip->bli_recur;
654 : __entry->bli_refcount = atomic_read(&bip->bli_refcount);
655 : __entry->buf_bno = xfs_buf_daddr(bip->bli_buf);
656 : __entry->buf_len = bip->bli_buf->b_length;
657 : __entry->buf_flags = bip->bli_buf->b_flags;
658 : __entry->buf_hold = atomic_read(&bip->bli_buf->b_hold);
659 : __entry->buf_pincount = atomic_read(&bip->bli_buf->b_pin_count);
660 : __entry->buf_lockval = bip->bli_buf->b_sema.count;
661 : __entry->li_flags = bip->bli_item.li_flags;
662 : ),
663 : TP_printk("dev %d:%d daddr 0x%llx bbcount 0x%x hold %d pincount %d "
664 : "lock %d flags %s recur %d refcount %d bliflags %s "
665 : "liflags %s",
666 : MAJOR(__entry->dev), MINOR(__entry->dev),
667 : (unsigned long long)__entry->buf_bno,
668 : __entry->buf_len,
669 : __entry->buf_hold,
670 : __entry->buf_pincount,
671 : __entry->buf_lockval,
672 : __print_flags(__entry->buf_flags, "|", XFS_BUF_FLAGS),
673 : __entry->bli_recur,
674 : __entry->bli_refcount,
675 : __print_flags(__entry->bli_flags, "|", XFS_BLI_FLAGS),
676 : __print_flags(__entry->li_flags, "|", XFS_LI_FLAGS))
677 : )
678 :
679 : #define DEFINE_BUF_ITEM_EVENT(name) \
680 : DEFINE_EVENT(xfs_buf_item_class, name, \
681 : TP_PROTO(struct xfs_buf_log_item *bip), \
682 : TP_ARGS(bip))
683 2151315307 : DEFINE_BUF_ITEM_EVENT(xfs_buf_item_size);
684 1144042 : DEFINE_BUF_ITEM_EVENT(xfs_buf_item_size_ordered);
685 32672445 : DEFINE_BUF_ITEM_EVENT(xfs_buf_item_size_stale);
686 2183976735 : DEFINE_BUF_ITEM_EVENT(xfs_buf_item_format);
687 32672382 : DEFINE_BUF_ITEM_EVENT(xfs_buf_item_format_stale);
688 1144050 : DEFINE_BUF_ITEM_EVENT(xfs_buf_item_ordered);
689 452970103 : DEFINE_BUF_ITEM_EVENT(xfs_buf_item_pin);
690 452975472 : DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unpin);
691 32672766 : DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unpin_stale);
692 2536956062 : DEFINE_BUF_ITEM_EVENT(xfs_buf_item_release);
693 452975472 : DEFINE_BUF_ITEM_EVENT(xfs_buf_item_committed);
694 94373559 : DEFINE_BUF_ITEM_EVENT(xfs_buf_item_push);
695 63905534 : DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf);
696 227060 : DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf_recur);
697 369324 : DEFINE_BUF_ITEM_EVENT(xfs_trans_getsb);
698 505 : DEFINE_BUF_ITEM_EVENT(xfs_trans_getsb_recur);
699 21553018998 : DEFINE_BUF_ITEM_EVENT(xfs_trans_read_buf);
700 758202159 : DEFINE_BUF_ITEM_EVENT(xfs_trans_read_buf_recur);
701 5858813267 : DEFINE_BUF_ITEM_EVENT(xfs_trans_log_buf);
702 20916402937 : DEFINE_BUF_ITEM_EVENT(xfs_trans_brelse);
703 758903836 : DEFINE_BUF_ITEM_EVENT(xfs_trans_bdetach);
704 9615172 : DEFINE_BUF_ITEM_EVENT(xfs_trans_bjoin);
705 10936667 : DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold);
706 774799 : DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold_release);
707 32670609 : DEFINE_BUF_ITEM_EVENT(xfs_trans_binval);
708 :
709 0 : DECLARE_EVENT_CLASS(xfs_filestream_class,
710 : TP_PROTO(struct xfs_perag *pag, xfs_ino_t ino),
711 : TP_ARGS(pag, ino),
712 : TP_STRUCT__entry(
713 : __field(dev_t, dev)
714 : __field(xfs_ino_t, ino)
715 : __field(xfs_agnumber_t, agno)
716 : __field(int, streams)
717 : ),
718 : TP_fast_assign(
719 : __entry->dev = pag->pag_mount->m_super->s_dev;
720 : __entry->ino = ino;
721 : __entry->agno = pag->pag_agno;
722 : __entry->streams = atomic_read(&pag->pagf_fstrms);
723 : ),
724 : TP_printk("dev %d:%d ino 0x%llx agno 0x%x streams %d",
725 : MAJOR(__entry->dev), MINOR(__entry->dev),
726 : __entry->ino,
727 : __entry->agno,
728 : __entry->streams)
729 : )
730 : #define DEFINE_FILESTREAM_EVENT(name) \
731 : DEFINE_EVENT(xfs_filestream_class, name, \
732 : TP_PROTO(struct xfs_perag *pag, xfs_ino_t ino), \
733 : TP_ARGS(pag, ino))
734 1670 : DEFINE_FILESTREAM_EVENT(xfs_filestream_free);
735 10422 : DEFINE_FILESTREAM_EVENT(xfs_filestream_lookup);
736 76236 : DEFINE_FILESTREAM_EVENT(xfs_filestream_scan);
737 :
738 1670 : TRACE_EVENT(xfs_filestream_pick,
739 : TP_PROTO(struct xfs_perag *pag, xfs_ino_t ino, xfs_extlen_t free),
740 : TP_ARGS(pag, ino, free),
741 : TP_STRUCT__entry(
742 : __field(dev_t, dev)
743 : __field(xfs_ino_t, ino)
744 : __field(xfs_agnumber_t, agno)
745 : __field(int, streams)
746 : __field(xfs_extlen_t, free)
747 : ),
748 : TP_fast_assign(
749 : __entry->dev = pag->pag_mount->m_super->s_dev;
750 : __entry->ino = ino;
751 : if (pag) {
752 : __entry->agno = pag->pag_agno;
753 : __entry->streams = atomic_read(&pag->pagf_fstrms);
754 : } else {
755 : __entry->agno = NULLAGNUMBER;
756 : __entry->streams = 0;
757 : }
758 : __entry->free = free;
759 : ),
760 : TP_printk("dev %d:%d ino 0x%llx agno 0x%x streams %d free %d",
761 : MAJOR(__entry->dev), MINOR(__entry->dev),
762 : __entry->ino,
763 : __entry->agno,
764 : __entry->streams,
765 : __entry->free)
766 : );
767 :
768 0 : DECLARE_EVENT_CLASS(xfs_lock_class,
769 : TP_PROTO(struct xfs_inode *ip, unsigned lock_flags,
770 : unsigned long caller_ip),
771 : TP_ARGS(ip, lock_flags, caller_ip),
772 : TP_STRUCT__entry(
773 : __field(dev_t, dev)
774 : __field(xfs_ino_t, ino)
775 : __field(int, lock_flags)
776 : __field(unsigned long, caller_ip)
777 : ),
778 : TP_fast_assign(
779 : __entry->dev = VFS_I(ip)->i_sb->s_dev;
780 : __entry->ino = ip->i_ino;
781 : __entry->lock_flags = lock_flags;
782 : __entry->caller_ip = caller_ip;
783 : ),
784 : TP_printk("dev %d:%d ino 0x%llx flags %s caller %pS",
785 : MAJOR(__entry->dev), MINOR(__entry->dev),
786 : __entry->ino,
787 : __print_flags(__entry->lock_flags, "|", XFS_LOCK_FLAGS),
788 : (void *)__entry->caller_ip)
789 : )
790 :
791 : #define DEFINE_LOCK_EVENT(name) \
792 : DEFINE_EVENT(xfs_lock_class, name, \
793 : TP_PROTO(struct xfs_inode *ip, unsigned lock_flags, \
794 : unsigned long caller_ip), \
795 : TP_ARGS(ip, lock_flags, caller_ip))
796 80277084277 : DEFINE_LOCK_EVENT(xfs_ilock);
797 2915672101 : DEFINE_LOCK_EVENT(xfs_ilock_nowait);
798 140954 : DEFINE_LOCK_EVENT(xfs_ilock_demote);
799 82568652820 : DEFINE_LOCK_EVENT(xfs_iunlock);
800 :
801 0 : DECLARE_EVENT_CLASS(xfs_inode_class,
802 : TP_PROTO(struct xfs_inode *ip),
803 : TP_ARGS(ip),
804 : TP_STRUCT__entry(
805 : __field(dev_t, dev)
806 : __field(xfs_ino_t, ino)
807 : __field(unsigned long, iflags)
808 : ),
809 : TP_fast_assign(
810 : __entry->dev = VFS_I(ip)->i_sb->s_dev;
811 : __entry->ino = ip->i_ino;
812 : __entry->iflags = ip->i_flags;
813 : ),
814 : TP_printk("dev %d:%d ino 0x%llx iflags 0x%lx",
815 : MAJOR(__entry->dev), MINOR(__entry->dev),
816 : __entry->ino,
817 : __entry->iflags)
818 : )
819 :
820 : #define DEFINE_INODE_EVENT(name) \
821 : DEFINE_EVENT(xfs_inode_class, name, \
822 : TP_PROTO(struct xfs_inode *ip), \
823 : TP_ARGS(ip))
824 414541 : DEFINE_INODE_EVENT(xfs_iget_skip);
825 566590224 : DEFINE_INODE_EVENT(xfs_iget_recycle);
826 0 : DEFINE_INODE_EVENT(xfs_iget_recycle_fail);
827 74879874986 : DEFINE_INODE_EVENT(xfs_iget_hit);
828 509761159 : DEFINE_INODE_EVENT(xfs_iget_miss);
829 :
830 2031241307 : DEFINE_INODE_EVENT(xfs_getattr);
831 15103686 : DEFINE_INODE_EVENT(xfs_setattr);
832 256240278 : DEFINE_INODE_EVENT(xfs_readlink);
833 25830319 : DEFINE_INODE_EVENT(xfs_inactive_symlink);
834 49459859 : DEFINE_INODE_EVENT(xfs_readdir);
835 : #ifdef CONFIG_XFS_POSIX_ACL
836 13836346 : DEFINE_INODE_EVENT(xfs_get_acl);
837 : #endif
838 3844 : DEFINE_INODE_EVENT(xfs_vm_bmap);
839 773797865 : DEFINE_INODE_EVENT(xfs_file_ioctl);
840 0 : DEFINE_INODE_EVENT(xfs_file_compat_ioctl);
841 687104 : DEFINE_INODE_EVENT(xfs_ioctl_setattr);
842 615426 : DEFINE_INODE_EVENT(xfs_dir_fsync);
843 32139007 : DEFINE_INODE_EVENT(xfs_file_fsync);
844 1075677347 : DEFINE_INODE_EVENT(xfs_destroy_inode);
845 80807235 : DEFINE_INODE_EVENT(xfs_update_time);
846 :
847 71780674 : DEFINE_INODE_EVENT(xfs_dquot_dqalloc);
848 92961345 : DEFINE_INODE_EVENT(xfs_dquot_dqdetach);
849 :
850 3409794 : DEFINE_INODE_EVENT(xfs_inode_set_eofblocks_tag);
851 9610439 : DEFINE_INODE_EVENT(xfs_inode_clear_eofblocks_tag);
852 370432 : DEFINE_INODE_EVENT(xfs_inode_free_eofblocks_invalid);
853 787606 : DEFINE_INODE_EVENT(xfs_inode_set_cowblocks_tag);
854 5870710 : DEFINE_INODE_EVENT(xfs_inode_clear_cowblocks_tag);
855 20028 : DEFINE_INODE_EVENT(xfs_inode_free_cowblocks_invalid);
856 1075680473 : DEFINE_INODE_EVENT(xfs_inode_set_reclaimable);
857 509091354 : DEFINE_INODE_EVENT(xfs_inode_reclaiming);
858 38274073 : DEFINE_INODE_EVENT(xfs_inode_set_need_inactive);
859 38269564 : DEFINE_INODE_EVENT(xfs_inode_inactivating);
860 :
861 : /*
862 : * ftrace's __print_symbolic requires that all enum values be wrapped in the
863 : * TRACE_DEFINE_ENUM macro so that the enum value can be encoded in the ftrace
864 : * ring buffer. Somehow this was only worth mentioning in the ftrace sample
865 : * code.
866 : */
867 : TRACE_DEFINE_ENUM(PE_SIZE_PTE);
868 : TRACE_DEFINE_ENUM(PE_SIZE_PMD);
869 : TRACE_DEFINE_ENUM(PE_SIZE_PUD);
870 :
871 : TRACE_DEFINE_ENUM(XFS_REFC_DOMAIN_SHARED);
872 : TRACE_DEFINE_ENUM(XFS_REFC_DOMAIN_COW);
873 :
874 16328471 : TRACE_EVENT(xfs_filemap_fault,
875 : TP_PROTO(struct xfs_inode *ip, enum page_entry_size pe_size,
876 : bool write_fault),
877 : TP_ARGS(ip, pe_size, write_fault),
878 : TP_STRUCT__entry(
879 : __field(dev_t, dev)
880 : __field(xfs_ino_t, ino)
881 : __field(enum page_entry_size, pe_size)
882 : __field(bool, write_fault)
883 : ),
884 : TP_fast_assign(
885 : __entry->dev = VFS_I(ip)->i_sb->s_dev;
886 : __entry->ino = ip->i_ino;
887 : __entry->pe_size = pe_size;
888 : __entry->write_fault = write_fault;
889 : ),
890 : TP_printk("dev %d:%d ino 0x%llx %s write_fault %d",
891 : MAJOR(__entry->dev), MINOR(__entry->dev),
892 : __entry->ino,
893 : __print_symbolic(__entry->pe_size,
894 : { PE_SIZE_PTE, "PTE" },
895 : { PE_SIZE_PMD, "PMD" },
896 : { PE_SIZE_PUD, "PUD" }),
897 : __entry->write_fault)
898 : )
899 :
900 0 : DECLARE_EVENT_CLASS(xfs_iref_class,
901 : TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip),
902 : TP_ARGS(ip, caller_ip),
903 : TP_STRUCT__entry(
904 : __field(dev_t, dev)
905 : __field(xfs_ino_t, ino)
906 : __field(int, count)
907 : __field(int, pincount)
908 : __field(unsigned long, caller_ip)
909 : ),
910 : TP_fast_assign(
911 : __entry->dev = VFS_I(ip)->i_sb->s_dev;
912 : __entry->ino = ip->i_ino;
913 : __entry->count = atomic_read(&VFS_I(ip)->i_count);
914 : __entry->pincount = atomic_read(&ip->i_pincount);
915 : __entry->caller_ip = caller_ip;
916 : ),
917 : TP_printk("dev %d:%d ino 0x%llx count %d pincount %d caller %pS",
918 : MAJOR(__entry->dev), MINOR(__entry->dev),
919 : __entry->ino,
920 : __entry->count,
921 : __entry->pincount,
922 : (char *)__entry->caller_ip)
923 : )
924 :
925 233880 : TRACE_EVENT(xfs_iomap_prealloc_size,
926 : TP_PROTO(struct xfs_inode *ip, xfs_fsblock_t blocks, int shift,
927 : unsigned int writeio_blocks),
928 : TP_ARGS(ip, blocks, shift, writeio_blocks),
929 : TP_STRUCT__entry(
930 : __field(dev_t, dev)
931 : __field(xfs_ino_t, ino)
932 : __field(xfs_fsblock_t, blocks)
933 : __field(int, shift)
934 : __field(unsigned int, writeio_blocks)
935 : ),
936 : TP_fast_assign(
937 : __entry->dev = VFS_I(ip)->i_sb->s_dev;
938 : __entry->ino = ip->i_ino;
939 : __entry->blocks = blocks;
940 : __entry->shift = shift;
941 : __entry->writeio_blocks = writeio_blocks;
942 : ),
943 : TP_printk("dev %d:%d ino 0x%llx prealloc blocks %llu shift %d "
944 : "m_allocsize_blocks %u",
945 : MAJOR(__entry->dev), MINOR(__entry->dev), __entry->ino,
946 : __entry->blocks, __entry->shift, __entry->writeio_blocks)
947 : )
948 :
949 27421 : TRACE_EVENT(xfs_irec_merge_pre,
950 : TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, xfs_agino_t agino,
951 : uint16_t holemask, xfs_agino_t nagino, uint16_t nholemask),
952 : TP_ARGS(mp, agno, agino, holemask, nagino, nholemask),
953 : TP_STRUCT__entry(
954 : __field(dev_t, dev)
955 : __field(xfs_agnumber_t, agno)
956 : __field(xfs_agino_t, agino)
957 : __field(uint16_t, holemask)
958 : __field(xfs_agino_t, nagino)
959 : __field(uint16_t, nholemask)
960 : ),
961 : TP_fast_assign(
962 : __entry->dev = mp->m_super->s_dev;
963 : __entry->agno = agno;
964 : __entry->agino = agino;
965 : __entry->holemask = holemask;
966 : __entry->nagino = nagino;
967 : __entry->nholemask = holemask;
968 : ),
969 : TP_printk("dev %d:%d agno 0x%x agino 0x%x holemask 0x%x new_agino 0x%x new_holemask 0x%x",
970 : MAJOR(__entry->dev), MINOR(__entry->dev),
971 : __entry->agno,
972 : __entry->agino,
973 : __entry->holemask,
974 : __entry->nagino,
975 : __entry->nholemask)
976 : )
977 :
978 27421 : TRACE_EVENT(xfs_irec_merge_post,
979 : TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, xfs_agino_t agino,
980 : uint16_t holemask),
981 : TP_ARGS(mp, agno, agino, holemask),
982 : TP_STRUCT__entry(
983 : __field(dev_t, dev)
984 : __field(xfs_agnumber_t, agno)
985 : __field(xfs_agino_t, agino)
986 : __field(uint16_t, holemask)
987 : ),
988 : TP_fast_assign(
989 : __entry->dev = mp->m_super->s_dev;
990 : __entry->agno = agno;
991 : __entry->agino = agino;
992 : __entry->holemask = holemask;
993 : ),
994 : TP_printk("dev %d:%d agno 0x%x agino 0x%x holemask 0x%x",
995 : MAJOR(__entry->dev),
996 : MINOR(__entry->dev),
997 : __entry->agno,
998 : __entry->agino,
999 : __entry->holemask)
1000 : )
1001 :
1002 : #define DEFINE_IREF_EVENT(name) \
1003 : DEFINE_EVENT(xfs_iref_class, name, \
1004 : TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip), \
1005 : TP_ARGS(ip, caller_ip))
1006 75878675699 : DEFINE_IREF_EVENT(xfs_irele);
1007 525060962 : DEFINE_IREF_EVENT(xfs_inode_pin);
1008 525071333 : DEFINE_IREF_EVENT(xfs_inode_unpin);
1009 17 : DEFINE_IREF_EVENT(xfs_inode_unpin_nowait);
1010 :
1011 0 : DECLARE_EVENT_CLASS(xfs_namespace_class,
1012 : TP_PROTO(struct xfs_inode *dp, const struct xfs_name *name),
1013 : TP_ARGS(dp, name),
1014 : TP_STRUCT__entry(
1015 : __field(dev_t, dev)
1016 : __field(xfs_ino_t, dp_ino)
1017 : __field(int, namelen)
1018 : __dynamic_array(char, name, name->len)
1019 : ),
1020 : TP_fast_assign(
1021 : __entry->dev = VFS_I(dp)->i_sb->s_dev;
1022 : __entry->dp_ino = dp->i_ino;
1023 : __entry->namelen = name->len;
1024 : memcpy(__get_str(name), name->name, name->len);
1025 : ),
1026 : TP_printk("dev %d:%d dp ino 0x%llx name %.*s",
1027 : MAJOR(__entry->dev), MINOR(__entry->dev),
1028 : __entry->dp_ino,
1029 : __entry->namelen,
1030 : __get_str(name))
1031 : )
1032 :
1033 : #define DEFINE_NAMESPACE_EVENT(name) \
1034 : DEFINE_EVENT(xfs_namespace_class, name, \
1035 : TP_PROTO(struct xfs_inode *dp, const struct xfs_name *name), \
1036 : TP_ARGS(dp, name))
1037 40996742 : DEFINE_NAMESPACE_EVENT(xfs_remove);
1038 6208219 : DEFINE_NAMESPACE_EVENT(xfs_link);
1039 229993211 : DEFINE_NAMESPACE_EVENT(xfs_lookup);
1040 33729008 : DEFINE_NAMESPACE_EVENT(xfs_create);
1041 432355226 : DEFINE_NAMESPACE_EVENT(xfs_symlink);
1042 :
1043 31607275 : TRACE_EVENT(xfs_rename,
1044 : TP_PROTO(struct xfs_inode *src_dp, struct xfs_inode *target_dp,
1045 : struct xfs_name *src_name, struct xfs_name *target_name),
1046 : TP_ARGS(src_dp, target_dp, src_name, target_name),
1047 : TP_STRUCT__entry(
1048 : __field(dev_t, dev)
1049 : __field(xfs_ino_t, src_dp_ino)
1050 : __field(xfs_ino_t, target_dp_ino)
1051 : __field(int, src_namelen)
1052 : __field(int, target_namelen)
1053 : __dynamic_array(char, src_name, src_name->len)
1054 : __dynamic_array(char, target_name, target_name->len)
1055 : ),
1056 : TP_fast_assign(
1057 : __entry->dev = VFS_I(src_dp)->i_sb->s_dev;
1058 : __entry->src_dp_ino = src_dp->i_ino;
1059 : __entry->target_dp_ino = target_dp->i_ino;
1060 : __entry->src_namelen = src_name->len;
1061 : __entry->target_namelen = target_name->len;
1062 : memcpy(__get_str(src_name), src_name->name, src_name->len);
1063 : memcpy(__get_str(target_name), target_name->name,
1064 : target_name->len);
1065 : ),
1066 : TP_printk("dev %d:%d src dp ino 0x%llx target dp ino 0x%llx"
1067 : " src name %.*s target name %.*s",
1068 : MAJOR(__entry->dev), MINOR(__entry->dev),
1069 : __entry->src_dp_ino,
1070 : __entry->target_dp_ino,
1071 : __entry->src_namelen,
1072 : __get_str(src_name),
1073 : __entry->target_namelen,
1074 : __get_str(target_name))
1075 : )
1076 :
1077 0 : DECLARE_EVENT_CLASS(xfs_dquot_class,
1078 : TP_PROTO(struct xfs_dquot *dqp),
1079 : TP_ARGS(dqp),
1080 : TP_STRUCT__entry(
1081 : __field(dev_t, dev)
1082 : __field(u32, id)
1083 : __field(xfs_dqtype_t, type)
1084 : __field(unsigned, flags)
1085 : __field(unsigned, nrefs)
1086 : __field(unsigned long long, res_bcount)
1087 : __field(unsigned long long, res_rtbcount)
1088 : __field(unsigned long long, res_icount)
1089 :
1090 : __field(unsigned long long, bcount)
1091 : __field(unsigned long long, rtbcount)
1092 : __field(unsigned long long, icount)
1093 :
1094 : __field(unsigned long long, blk_hardlimit)
1095 : __field(unsigned long long, blk_softlimit)
1096 : __field(unsigned long long, rtb_hardlimit)
1097 : __field(unsigned long long, rtb_softlimit)
1098 : __field(unsigned long long, ino_hardlimit)
1099 : __field(unsigned long long, ino_softlimit)
1100 : ),
1101 : TP_fast_assign(
1102 : __entry->dev = dqp->q_mount->m_super->s_dev;
1103 : __entry->id = dqp->q_id;
1104 : __entry->type = dqp->q_type;
1105 : __entry->flags = dqp->q_flags;
1106 : __entry->nrefs = dqp->q_nrefs;
1107 :
1108 : __entry->res_bcount = dqp->q_blk.reserved;
1109 : __entry->res_rtbcount = dqp->q_rtb.reserved;
1110 : __entry->res_icount = dqp->q_ino.reserved;
1111 :
1112 : __entry->bcount = dqp->q_blk.count;
1113 : __entry->rtbcount = dqp->q_rtb.count;
1114 : __entry->icount = dqp->q_ino.count;
1115 :
1116 : __entry->blk_hardlimit = dqp->q_blk.hardlimit;
1117 : __entry->blk_softlimit = dqp->q_blk.softlimit;
1118 : __entry->rtb_hardlimit = dqp->q_rtb.hardlimit;
1119 : __entry->rtb_softlimit = dqp->q_rtb.softlimit;
1120 : __entry->ino_hardlimit = dqp->q_ino.hardlimit;
1121 : __entry->ino_softlimit = dqp->q_ino.softlimit;
1122 : ),
1123 : TP_printk("dev %d:%d id 0x%x type %s flags %s nrefs %u "
1124 : "res_bc 0x%llx res_rtbc 0x%llx res_ic 0x%llx "
1125 : "bcnt 0x%llx bhardlimit 0x%llx bsoftlimit 0x%llx "
1126 : "rtbcnt 0x%llx rtbhardlimit 0x%llx rtbsoftlimit 0x%llx "
1127 : "icnt 0x%llx ihardlimit 0x%llx isoftlimit 0x%llx]",
1128 : MAJOR(__entry->dev), MINOR(__entry->dev),
1129 : __entry->id,
1130 : __print_flags(__entry->type, "|", XFS_DQTYPE_STRINGS),
1131 : __print_flags(__entry->flags, "|", XFS_DQFLAG_STRINGS),
1132 : __entry->nrefs,
1133 : __entry->res_bcount,
1134 : __entry->res_rtbcount,
1135 : __entry->res_icount,
1136 : __entry->bcount,
1137 : __entry->blk_hardlimit,
1138 : __entry->blk_softlimit,
1139 : __entry->rtbcount,
1140 : __entry->rtb_hardlimit,
1141 : __entry->rtb_softlimit,
1142 : __entry->icount,
1143 : __entry->ino_hardlimit,
1144 : __entry->ino_softlimit)
1145 : )
1146 :
1147 : #define DEFINE_DQUOT_EVENT(name) \
1148 : DEFINE_EVENT(xfs_dquot_class, name, \
1149 : TP_PROTO(struct xfs_dquot *dqp), \
1150 : TP_ARGS(dqp))
1151 181290 : DEFINE_DQUOT_EVENT(xfs_dqadjust);
1152 2179444 : DEFINE_DQUOT_EVENT(xfs_dqreclaim_want);
1153 92794 : DEFINE_DQUOT_EVENT(xfs_dqreclaim_dirty);
1154 2942995 : DEFINE_DQUOT_EVENT(xfs_dqreclaim_busy);
1155 7335243 : DEFINE_DQUOT_EVENT(xfs_dqreclaim_done);
1156 0 : DEFINE_DQUOT_EVENT(xfs_dqattach_found);
1157 86227771 : DEFINE_DQUOT_EVENT(xfs_dqattach_get);
1158 3759827 : DEFINE_DQUOT_EVENT(xfs_dqalloc);
1159 13240485 : DEFINE_DQUOT_EVENT(xfs_dqtobp_read);
1160 17057309 : DEFINE_DQUOT_EVENT(xfs_dqread);
1161 92054 : DEFINE_DQUOT_EVENT(xfs_dqread_fail);
1162 113025443 : DEFINE_DQUOT_EVENT(xfs_dqget_hit);
1163 16850021 : DEFINE_DQUOT_EVENT(xfs_dqget_miss);
1164 956 : DEFINE_DQUOT_EVENT(xfs_dqget_freeing);
1165 179 : DEFINE_DQUOT_EVENT(xfs_dqget_dup);
1166 523940503 : DEFINE_DQUOT_EVENT(xfs_dqput);
1167 27988586 : DEFINE_DQUOT_EVENT(xfs_dqput_free);
1168 498531532 : DEFINE_DQUOT_EVENT(xfs_dqrele);
1169 26497352 : DEFINE_DQUOT_EVENT(xfs_dqflush);
1170 11000 : DEFINE_DQUOT_EVENT(xfs_dqflush_force);
1171 25042808 : DEFINE_DQUOT_EVENT(xfs_dqflush_done);
1172 936269746 : DEFINE_DQUOT_EVENT(xfs_trans_apply_dquot_deltas_before);
1173 936267111 : DEFINE_DQUOT_EVENT(xfs_trans_apply_dquot_deltas_after);
1174 :
1175 4614969679 : TRACE_EVENT(xfs_trans_mod_dquot,
1176 : TP_PROTO(struct xfs_trans *tp, struct xfs_dquot *dqp,
1177 : unsigned int field, int64_t delta),
1178 : TP_ARGS(tp, dqp, field, delta),
1179 : TP_STRUCT__entry(
1180 : __field(dev_t, dev)
1181 : __field(xfs_dqtype_t, type)
1182 : __field(unsigned int, flags)
1183 : __field(unsigned int, dqid)
1184 : __field(unsigned int, field)
1185 : __field(int64_t, delta)
1186 : ),
1187 : TP_fast_assign(
1188 : __entry->dev = tp->t_mountp->m_super->s_dev;
1189 : __entry->type = dqp->q_type;
1190 : __entry->flags = dqp->q_flags;
1191 : __entry->dqid = dqp->q_id;
1192 : __entry->field = field;
1193 : __entry->delta = delta;
1194 : ),
1195 : TP_printk("dev %d:%d dquot id 0x%x type %s flags %s field %s delta %lld",
1196 : MAJOR(__entry->dev), MINOR(__entry->dev),
1197 : __entry->dqid,
1198 : __print_flags(__entry->type, "|", XFS_DQTYPE_STRINGS),
1199 : __print_flags(__entry->flags, "|", XFS_DQFLAG_STRINGS),
1200 : __print_flags(__entry->field, "|", XFS_QMOPT_FLAGS),
1201 : __entry->delta)
1202 : );
1203 :
1204 0 : DECLARE_EVENT_CLASS(xfs_dqtrx_class,
1205 : TP_PROTO(struct xfs_dqtrx *qtrx),
1206 : TP_ARGS(qtrx),
1207 : TP_STRUCT__entry(
1208 : __field(dev_t, dev)
1209 : __field(xfs_dqtype_t, type)
1210 : __field(unsigned int, flags)
1211 : __field(u32, dqid)
1212 :
1213 : __field(uint64_t, blk_res)
1214 : __field(int64_t, bcount_delta)
1215 : __field(int64_t, delbcnt_delta)
1216 :
1217 : __field(uint64_t, rtblk_res)
1218 : __field(uint64_t, rtblk_res_used)
1219 : __field(int64_t, rtbcount_delta)
1220 : __field(int64_t, delrtb_delta)
1221 :
1222 : __field(uint64_t, ino_res)
1223 : __field(uint64_t, ino_res_used)
1224 : __field(int64_t, icount_delta)
1225 : ),
1226 : TP_fast_assign(
1227 : __entry->dev = qtrx->qt_dquot->q_mount->m_super->s_dev;
1228 : __entry->type = qtrx->qt_dquot->q_type;
1229 : __entry->flags = qtrx->qt_dquot->q_flags;
1230 : __entry->dqid = qtrx->qt_dquot->q_id;
1231 :
1232 : __entry->blk_res = qtrx->qt_blk_res;
1233 : __entry->bcount_delta = qtrx->qt_bcount_delta;
1234 : __entry->delbcnt_delta = qtrx->qt_delbcnt_delta;
1235 :
1236 : __entry->rtblk_res = qtrx->qt_rtblk_res;
1237 : __entry->rtblk_res_used = qtrx->qt_rtblk_res_used;
1238 : __entry->rtbcount_delta = qtrx->qt_rtbcount_delta;
1239 : __entry->delrtb_delta = qtrx->qt_delrtb_delta;
1240 :
1241 : __entry->ino_res = qtrx->qt_ino_res;
1242 : __entry->ino_res_used = qtrx->qt_ino_res_used;
1243 : __entry->icount_delta = qtrx->qt_icount_delta;
1244 : ),
1245 : TP_printk("dev %d:%d dquot id 0x%x type %s flags %s "
1246 : "blk_res %llu bcount_delta %lld delbcnt_delta %lld "
1247 : "rtblk_res %llu rtblk_res_used %llu rtbcount_delta %lld delrtb_delta %lld "
1248 : "ino_res %llu ino_res_used %llu icount_delta %lld",
1249 : MAJOR(__entry->dev), MINOR(__entry->dev),
1250 : __entry->dqid,
1251 : __print_flags(__entry->type, "|", XFS_DQTYPE_STRINGS),
1252 : __print_flags(__entry->flags, "|", XFS_DQFLAG_STRINGS),
1253 :
1254 : __entry->blk_res,
1255 : __entry->bcount_delta,
1256 : __entry->delbcnt_delta,
1257 :
1258 : __entry->rtblk_res,
1259 : __entry->rtblk_res_used,
1260 : __entry->rtbcount_delta,
1261 : __entry->delrtb_delta,
1262 :
1263 : __entry->ino_res,
1264 : __entry->ino_res_used,
1265 : __entry->icount_delta)
1266 : )
1267 :
1268 : #define DEFINE_DQTRX_EVENT(name) \
1269 : DEFINE_EVENT(xfs_dqtrx_class, name, \
1270 : TP_PROTO(struct xfs_dqtrx *qtrx), \
1271 : TP_ARGS(qtrx))
1272 936269662 : DEFINE_DQTRX_EVENT(xfs_trans_apply_dquot_deltas);
1273 4614982013 : DEFINE_DQTRX_EVENT(xfs_trans_mod_dquot_before);
1274 4614990718 : DEFINE_DQTRX_EVENT(xfs_trans_mod_dquot_after);
1275 :
1276 0 : DECLARE_EVENT_CLASS(xfs_loggrant_class,
1277 : TP_PROTO(struct xlog *log, struct xlog_ticket *tic),
1278 : TP_ARGS(log, tic),
1279 : TP_STRUCT__entry(
1280 : __field(dev_t, dev)
1281 : __field(char, ocnt)
1282 : __field(char, cnt)
1283 : __field(int, curr_res)
1284 : __field(int, unit_res)
1285 : __field(unsigned int, flags)
1286 : __field(int, reserveq)
1287 : __field(int, writeq)
1288 : __field(int, grant_reserve_cycle)
1289 : __field(int, grant_reserve_bytes)
1290 : __field(int, grant_write_cycle)
1291 : __field(int, grant_write_bytes)
1292 : __field(int, curr_cycle)
1293 : __field(int, curr_block)
1294 : __field(xfs_lsn_t, tail_lsn)
1295 : ),
1296 : TP_fast_assign(
1297 : __entry->dev = log->l_mp->m_super->s_dev;
1298 : __entry->ocnt = tic->t_ocnt;
1299 : __entry->cnt = tic->t_cnt;
1300 : __entry->curr_res = tic->t_curr_res;
1301 : __entry->unit_res = tic->t_unit_res;
1302 : __entry->flags = tic->t_flags;
1303 : __entry->reserveq = list_empty(&log->l_reserve_head.waiters);
1304 : __entry->writeq = list_empty(&log->l_write_head.waiters);
1305 : xlog_crack_grant_head(&log->l_reserve_head.grant,
1306 : &__entry->grant_reserve_cycle,
1307 : &__entry->grant_reserve_bytes);
1308 : xlog_crack_grant_head(&log->l_write_head.grant,
1309 : &__entry->grant_write_cycle,
1310 : &__entry->grant_write_bytes);
1311 : __entry->curr_cycle = log->l_curr_cycle;
1312 : __entry->curr_block = log->l_curr_block;
1313 : __entry->tail_lsn = atomic64_read(&log->l_tail_lsn);
1314 : ),
1315 : TP_printk("dev %d:%d t_ocnt %u t_cnt %u t_curr_res %u "
1316 : "t_unit_res %u t_flags %s reserveq %s "
1317 : "writeq %s grant_reserve_cycle %d "
1318 : "grant_reserve_bytes %d grant_write_cycle %d "
1319 : "grant_write_bytes %d curr_cycle %d curr_block %d "
1320 : "tail_cycle %d tail_block %d",
1321 : MAJOR(__entry->dev), MINOR(__entry->dev),
1322 : __entry->ocnt,
1323 : __entry->cnt,
1324 : __entry->curr_res,
1325 : __entry->unit_res,
1326 : __print_flags(__entry->flags, "|", XLOG_TIC_FLAGS),
1327 : __entry->reserveq ? "empty" : "active",
1328 : __entry->writeq ? "empty" : "active",
1329 : __entry->grant_reserve_cycle,
1330 : __entry->grant_reserve_bytes,
1331 : __entry->grant_write_cycle,
1332 : __entry->grant_write_bytes,
1333 : __entry->curr_cycle,
1334 : __entry->curr_block,
1335 : CYCLE_LSN(__entry->tail_lsn),
1336 : BLOCK_LSN(__entry->tail_lsn)
1337 : )
1338 : )
1339 :
1340 : #define DEFINE_LOGGRANT_EVENT(name) \
1341 : DEFINE_EVENT(xfs_loggrant_class, name, \
1342 : TP_PROTO(struct xlog *log, struct xlog_ticket *tic), \
1343 : TP_ARGS(log, tic))
1344 14877 : DEFINE_LOGGRANT_EVENT(xfs_log_umount_write);
1345 2213257 : DEFINE_LOGGRANT_EVENT(xfs_log_grant_sleep);
1346 2212744 : DEFINE_LOGGRANT_EVENT(xfs_log_grant_wake);
1347 76300925 : DEFINE_LOGGRANT_EVENT(xfs_log_grant_wake_up);
1348 1201977232 : DEFINE_LOGGRANT_EVENT(xfs_log_reserve);
1349 1202218311 : DEFINE_LOGGRANT_EVENT(xfs_log_reserve_exit);
1350 222230979 : DEFINE_LOGGRANT_EVENT(xfs_log_regrant);
1351 222231958 : DEFINE_LOGGRANT_EVENT(xfs_log_regrant_exit);
1352 962450833 : DEFINE_LOGGRANT_EVENT(xfs_log_ticket_regrant);
1353 222232094 : DEFINE_LOGGRANT_EVENT(xfs_log_ticket_regrant_exit);
1354 962457607 : DEFINE_LOGGRANT_EVENT(xfs_log_ticket_regrant_sub);
1355 1205900657 : DEFINE_LOGGRANT_EVENT(xfs_log_ticket_ungrant);
1356 1205934546 : DEFINE_LOGGRANT_EVENT(xfs_log_ticket_ungrant_sub);
1357 1206001755 : DEFINE_LOGGRANT_EVENT(xfs_log_ticket_ungrant_exit);
1358 0 : DEFINE_LOGGRANT_EVENT(xfs_log_cil_wait);
1359 :
1360 0 : DECLARE_EVENT_CLASS(xfs_log_item_class,
1361 : TP_PROTO(struct xfs_log_item *lip),
1362 : TP_ARGS(lip),
1363 : TP_STRUCT__entry(
1364 : __field(dev_t, dev)
1365 : __field(void *, lip)
1366 : __field(uint, type)
1367 : __field(unsigned long, flags)
1368 : __field(xfs_lsn_t, lsn)
1369 : ),
1370 : TP_fast_assign(
1371 : __entry->dev = lip->li_log->l_mp->m_super->s_dev;
1372 : __entry->lip = lip;
1373 : __entry->type = lip->li_type;
1374 : __entry->flags = lip->li_flags;
1375 : __entry->lsn = lip->li_lsn;
1376 : ),
1377 : TP_printk("dev %d:%d lip %p lsn %d/%d type %s flags %s",
1378 : MAJOR(__entry->dev), MINOR(__entry->dev),
1379 : __entry->lip,
1380 : CYCLE_LSN(__entry->lsn), BLOCK_LSN(__entry->lsn),
1381 : __print_symbolic(__entry->type, XFS_LI_TYPE_DESC),
1382 : __print_flags(__entry->flags, "|", XFS_LI_FLAGS))
1383 : )
1384 :
1385 11852871 : TRACE_EVENT(xfs_log_force,
1386 : TP_PROTO(struct xfs_mount *mp, xfs_lsn_t lsn, unsigned long caller_ip),
1387 : TP_ARGS(mp, lsn, caller_ip),
1388 : TP_STRUCT__entry(
1389 : __field(dev_t, dev)
1390 : __field(xfs_lsn_t, lsn)
1391 : __field(unsigned long, caller_ip)
1392 : ),
1393 : TP_fast_assign(
1394 : __entry->dev = mp->m_super->s_dev;
1395 : __entry->lsn = lsn;
1396 : __entry->caller_ip = caller_ip;
1397 : ),
1398 : TP_printk("dev %d:%d lsn 0x%llx caller %pS",
1399 : MAJOR(__entry->dev), MINOR(__entry->dev),
1400 : __entry->lsn, (void *)__entry->caller_ip)
1401 : )
1402 :
1403 : #define DEFINE_LOG_ITEM_EVENT(name) \
1404 : DEFINE_EVENT(xfs_log_item_class, name, \
1405 : TP_PROTO(struct xfs_log_item *lip), \
1406 : TP_ARGS(lip))
1407 158060127 : DEFINE_LOG_ITEM_EVENT(xfs_ail_push);
1408 5783743 : DEFINE_LOG_ITEM_EVENT(xfs_ail_pinned);
1409 710773 : DEFINE_LOG_ITEM_EVENT(xfs_ail_locked);
1410 103522887 : DEFINE_LOG_ITEM_EVENT(xfs_ail_flushing);
1411 814774804 : DEFINE_LOG_ITEM_EVENT(xfs_cil_whiteout_mark);
1412 814774748 : DEFINE_LOG_ITEM_EVENT(xfs_cil_whiteout_skip);
1413 814766717 : DEFINE_LOG_ITEM_EVENT(xfs_cil_whiteout_unpin);
1414 :
1415 0 : DECLARE_EVENT_CLASS(xfs_ail_class,
1416 : TP_PROTO(struct xfs_log_item *lip, xfs_lsn_t old_lsn, xfs_lsn_t new_lsn),
1417 : TP_ARGS(lip, old_lsn, new_lsn),
1418 : TP_STRUCT__entry(
1419 : __field(dev_t, dev)
1420 : __field(void *, lip)
1421 : __field(uint, type)
1422 : __field(unsigned long, flags)
1423 : __field(xfs_lsn_t, old_lsn)
1424 : __field(xfs_lsn_t, new_lsn)
1425 : ),
1426 : TP_fast_assign(
1427 : __entry->dev = lip->li_log->l_mp->m_super->s_dev;
1428 : __entry->lip = lip;
1429 : __entry->type = lip->li_type;
1430 : __entry->flags = lip->li_flags;
1431 : __entry->old_lsn = old_lsn;
1432 : __entry->new_lsn = new_lsn;
1433 : ),
1434 : TP_printk("dev %d:%d lip %p old lsn %d/%d new lsn %d/%d type %s flags %s",
1435 : MAJOR(__entry->dev), MINOR(__entry->dev),
1436 : __entry->lip,
1437 : CYCLE_LSN(__entry->old_lsn), BLOCK_LSN(__entry->old_lsn),
1438 : CYCLE_LSN(__entry->new_lsn), BLOCK_LSN(__entry->new_lsn),
1439 : __print_symbolic(__entry->type, XFS_LI_TYPE_DESC),
1440 : __print_flags(__entry->flags, "|", XFS_LI_FLAGS))
1441 : )
1442 :
1443 : #define DEFINE_AIL_EVENT(name) \
1444 : DEFINE_EVENT(xfs_ail_class, name, \
1445 : TP_PROTO(struct xfs_log_item *lip, xfs_lsn_t old_lsn, xfs_lsn_t new_lsn), \
1446 : TP_ARGS(lip, old_lsn, new_lsn))
1447 439708942 : DEFINE_AIL_EVENT(xfs_ail_insert);
1448 592007101 : DEFINE_AIL_EVENT(xfs_ail_move);
1449 439709035 : DEFINE_AIL_EVENT(xfs_ail_delete);
1450 :
1451 33103599 : TRACE_EVENT(xfs_log_assign_tail_lsn,
1452 : TP_PROTO(struct xlog *log, xfs_lsn_t new_lsn),
1453 : TP_ARGS(log, new_lsn),
1454 : TP_STRUCT__entry(
1455 : __field(dev_t, dev)
1456 : __field(xfs_lsn_t, new_lsn)
1457 : __field(xfs_lsn_t, old_lsn)
1458 : __field(xfs_lsn_t, last_sync_lsn)
1459 : ),
1460 : TP_fast_assign(
1461 : __entry->dev = log->l_mp->m_super->s_dev;
1462 : __entry->new_lsn = new_lsn;
1463 : __entry->old_lsn = atomic64_read(&log->l_tail_lsn);
1464 : __entry->last_sync_lsn = atomic64_read(&log->l_last_sync_lsn);
1465 : ),
1466 : TP_printk("dev %d:%d new tail lsn %d/%d, old lsn %d/%d, last sync %d/%d",
1467 : MAJOR(__entry->dev), MINOR(__entry->dev),
1468 : CYCLE_LSN(__entry->new_lsn), BLOCK_LSN(__entry->new_lsn),
1469 : CYCLE_LSN(__entry->old_lsn), BLOCK_LSN(__entry->old_lsn),
1470 : CYCLE_LSN(__entry->last_sync_lsn), BLOCK_LSN(__entry->last_sync_lsn))
1471 : )
1472 :
1473 0 : DECLARE_EVENT_CLASS(xfs_file_class,
1474 : TP_PROTO(struct kiocb *iocb, struct iov_iter *iter),
1475 : TP_ARGS(iocb, iter),
1476 : TP_STRUCT__entry(
1477 : __field(dev_t, dev)
1478 : __field(xfs_ino_t, ino)
1479 : __field(xfs_fsize_t, size)
1480 : __field(loff_t, offset)
1481 : __field(size_t, count)
1482 : ),
1483 : TP_fast_assign(
1484 : __entry->dev = file_inode(iocb->ki_filp)->i_sb->s_dev;
1485 : __entry->ino = XFS_I(file_inode(iocb->ki_filp))->i_ino;
1486 : __entry->size = XFS_I(file_inode(iocb->ki_filp))->i_disk_size;
1487 : __entry->offset = iocb->ki_pos;
1488 : __entry->count = iov_iter_count(iter);
1489 : ),
1490 : TP_printk("dev %d:%d ino 0x%llx disize 0x%llx pos 0x%llx bytecount 0x%zx",
1491 : MAJOR(__entry->dev), MINOR(__entry->dev),
1492 : __entry->ino,
1493 : __entry->size,
1494 : __entry->offset,
1495 : __entry->count)
1496 : )
1497 :
1498 : #define DEFINE_RW_EVENT(name) \
1499 : DEFINE_EVENT(xfs_file_class, name, \
1500 : TP_PROTO(struct kiocb *iocb, struct iov_iter *iter), \
1501 : TP_ARGS(iocb, iter))
1502 65531961 : DEFINE_RW_EVENT(xfs_file_buffered_read);
1503 82967722 : DEFINE_RW_EVENT(xfs_file_direct_read);
1504 0 : DEFINE_RW_EVENT(xfs_file_dax_read);
1505 59284484 : DEFINE_RW_EVENT(xfs_file_buffered_write);
1506 6769088 : DEFINE_RW_EVENT(xfs_file_direct_write);
1507 0 : DEFINE_RW_EVENT(xfs_file_dax_write);
1508 4515919 : DEFINE_RW_EVENT(xfs_reflink_bounce_dio_write);
1509 :
1510 0 : DECLARE_EVENT_CLASS(xfs_imap_class,
1511 : TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count,
1512 : int whichfork, struct xfs_bmbt_irec *irec),
1513 : TP_ARGS(ip, offset, count, whichfork, irec),
1514 : TP_STRUCT__entry(
1515 : __field(dev_t, dev)
1516 : __field(xfs_ino_t, ino)
1517 : __field(loff_t, size)
1518 : __field(loff_t, offset)
1519 : __field(size_t, count)
1520 : __field(int, whichfork)
1521 : __field(xfs_fileoff_t, startoff)
1522 : __field(xfs_fsblock_t, startblock)
1523 : __field(xfs_filblks_t, blockcount)
1524 : ),
1525 : TP_fast_assign(
1526 : __entry->dev = VFS_I(ip)->i_sb->s_dev;
1527 : __entry->ino = ip->i_ino;
1528 : __entry->size = ip->i_disk_size;
1529 : __entry->offset = offset;
1530 : __entry->count = count;
1531 : __entry->whichfork = whichfork;
1532 : __entry->startoff = irec ? irec->br_startoff : 0;
1533 : __entry->startblock = irec ? irec->br_startblock : 0;
1534 : __entry->blockcount = irec ? irec->br_blockcount : 0;
1535 : ),
1536 : TP_printk("dev %d:%d ino 0x%llx disize 0x%llx pos 0x%llx bytecount 0x%zx "
1537 : "fork %s startoff 0x%llx startblock 0x%llx fsbcount 0x%llx",
1538 : MAJOR(__entry->dev), MINOR(__entry->dev),
1539 : __entry->ino,
1540 : __entry->size,
1541 : __entry->offset,
1542 : __entry->count,
1543 : __print_symbolic(__entry->whichfork, XFS_WHICHFORK_STRINGS),
1544 : __entry->startoff,
1545 : (int64_t)__entry->startblock,
1546 : __entry->blockcount)
1547 : )
1548 :
1549 : #define DEFINE_IMAP_EVENT(name) \
1550 : DEFINE_EVENT(xfs_imap_class, name, \
1551 : TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count, \
1552 : int whichfork, struct xfs_bmbt_irec *irec), \
1553 : TP_ARGS(ip, offset, count, whichfork, irec))
1554 50086348 : DEFINE_IMAP_EVENT(xfs_map_blocks_found);
1555 17090566 : DEFINE_IMAP_EVENT(xfs_map_blocks_alloc);
1556 41155445 : DEFINE_IMAP_EVENT(xfs_iomap_alloc);
1557 448098783 : DEFINE_IMAP_EVENT(xfs_iomap_found);
1558 :
1559 0 : DECLARE_EVENT_CLASS(xfs_writeback_class,
1560 : TP_PROTO(struct xfs_inode *ip, const struct writeback_control *wbc),
1561 : TP_ARGS(ip, wbc),
1562 : TP_STRUCT__entry(
1563 : __field(dev_t, dev)
1564 : __field(xfs_ino_t, ino)
1565 : __field(loff_t, range_start)
1566 : __field(loff_t, range_end)
1567 : __field(long, nr_to_write)
1568 : __field(enum writeback_sync_modes, sync_mode)
1569 : ),
1570 : TP_fast_assign(
1571 : __entry->dev = VFS_I(ip)->i_sb->s_dev;
1572 : __entry->ino = ip->i_ino;
1573 : __entry->range_start = wbc->range_start;
1574 : __entry->range_end = wbc->range_end;
1575 : __entry->nr_to_write = wbc->nr_to_write;
1576 : __entry->sync_mode = wbc->sync_mode;
1577 : ),
1578 : TP_printk("dev %d:%d ino 0x%llx range_start 0x%llx range_end 0x%llx nr_to_write %ld sync_mode %u",
1579 : MAJOR(__entry->dev), MINOR(__entry->dev),
1580 : __entry->ino,
1581 : __entry->range_start,
1582 : __entry->range_end,
1583 : __entry->nr_to_write,
1584 : __entry->sync_mode)
1585 : );
1586 : #define DEFINE_WRITEBACK_EVENT(name) \
1587 : DEFINE_EVENT(xfs_writeback_class, name, \
1588 : TP_PROTO(struct xfs_inode *ip, const struct writeback_control *wbc), \
1589 : TP_ARGS(ip, wbc))
1590 44377362 : DEFINE_WRITEBACK_EVENT(xfs_vm_writepages);
1591 0 : DEFINE_WRITEBACK_EVENT(xfs_vm_writepages_extend);
1592 0 : DEFINE_WRITEBACK_EVENT(xfs_dax_writepages);
1593 :
1594 0 : DECLARE_EVENT_CLASS(xfs_simple_io_class,
1595 : TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, u64 count),
1596 : TP_ARGS(ip, offset, count),
1597 : TP_STRUCT__entry(
1598 : __field(dev_t, dev)
1599 : __field(xfs_ino_t, ino)
1600 : __field(loff_t, isize)
1601 : __field(loff_t, disize)
1602 : __field(loff_t, offset)
1603 : __field(u64, count)
1604 : ),
1605 : TP_fast_assign(
1606 : __entry->dev = VFS_I(ip)->i_sb->s_dev;
1607 : __entry->ino = ip->i_ino;
1608 : __entry->isize = VFS_I(ip)->i_size;
1609 : __entry->disize = ip->i_disk_size;
1610 : __entry->offset = offset;
1611 : __entry->count = count;
1612 : ),
1613 : TP_printk("dev %d:%d ino 0x%llx isize 0x%llx disize 0x%llx "
1614 : "pos 0x%llx bytecount 0x%llx",
1615 : MAJOR(__entry->dev), MINOR(__entry->dev),
1616 : __entry->ino,
1617 : __entry->isize,
1618 : __entry->disize,
1619 : __entry->offset,
1620 : __entry->count)
1621 : );
1622 :
1623 : #define DEFINE_SIMPLE_IO_EVENT(name) \
1624 : DEFINE_EVENT(xfs_simple_io_class, name, \
1625 : TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, u64 count), \
1626 : TP_ARGS(ip, offset, count))
1627 1026812 : DEFINE_SIMPLE_IO_EVENT(xfs_delalloc_enospc);
1628 35666494 : DEFINE_SIMPLE_IO_EVENT(xfs_unwritten_convert);
1629 5791704 : DEFINE_SIMPLE_IO_EVENT(xfs_setfilesize);
1630 25139784 : DEFINE_SIMPLE_IO_EVENT(xfs_zero_eof);
1631 6769001 : DEFINE_SIMPLE_IO_EVENT(xfs_end_io_direct_write);
1632 0 : DEFINE_SIMPLE_IO_EVENT(xfs_end_io_direct_write_unwritten);
1633 0 : DEFINE_SIMPLE_IO_EVENT(xfs_end_io_direct_write_append);
1634 6345652 : DEFINE_SIMPLE_IO_EVENT(xfs_file_splice_read);
1635 5981181 : DEFINE_SIMPLE_IO_EVENT(xfs_alloc_file_space);
1636 10770038 : DEFINE_SIMPLE_IO_EVENT(xfs_free_file_space);
1637 1973777 : DEFINE_SIMPLE_IO_EVENT(xfs_zero_file_space);
1638 474536 : DEFINE_SIMPLE_IO_EVENT(xfs_collapse_file_space);
1639 404342 : DEFINE_SIMPLE_IO_EVENT(xfs_insert_file_space);
1640 : #ifdef CONFIG_XFS_RT
1641 0 : DEFINE_SIMPLE_IO_EVENT(xfs_map_free_rt_space);
1642 : #endif /* CONFIG_XFS_RT */
1643 204 : DEFINE_SIMPLE_IO_EVENT(xfs_map_free_space);
1644 :
1645 0 : DECLARE_EVENT_CLASS(xfs_itrunc_class,
1646 : TP_PROTO(struct xfs_inode *ip, xfs_fsize_t new_size),
1647 : TP_ARGS(ip, new_size),
1648 : TP_STRUCT__entry(
1649 : __field(dev_t, dev)
1650 : __field(xfs_ino_t, ino)
1651 : __field(xfs_fsize_t, size)
1652 : __field(xfs_fsize_t, new_size)
1653 : ),
1654 : TP_fast_assign(
1655 : __entry->dev = VFS_I(ip)->i_sb->s_dev;
1656 : __entry->ino = ip->i_ino;
1657 : __entry->size = ip->i_disk_size;
1658 : __entry->new_size = new_size;
1659 : ),
1660 : TP_printk("dev %d:%d ino 0x%llx disize 0x%llx new_size 0x%llx",
1661 : MAJOR(__entry->dev), MINOR(__entry->dev),
1662 : __entry->ino,
1663 : __entry->size,
1664 : __entry->new_size)
1665 : )
1666 :
1667 : #define DEFINE_ITRUNC_EVENT(name) \
1668 : DEFINE_EVENT(xfs_itrunc_class, name, \
1669 : TP_PROTO(struct xfs_inode *ip, xfs_fsize_t new_size), \
1670 : TP_ARGS(ip, new_size))
1671 13999375 : DEFINE_ITRUNC_EVENT(xfs_itruncate_extents_start);
1672 13997695 : DEFINE_ITRUNC_EVENT(xfs_itruncate_extents_end);
1673 :
1674 0 : TRACE_EVENT(xfs_pagecache_inval,
1675 : TP_PROTO(struct xfs_inode *ip, xfs_off_t start, xfs_off_t finish),
1676 : TP_ARGS(ip, start, finish),
1677 : TP_STRUCT__entry(
1678 : __field(dev_t, dev)
1679 : __field(xfs_ino_t, ino)
1680 : __field(xfs_fsize_t, size)
1681 : __field(xfs_off_t, start)
1682 : __field(xfs_off_t, finish)
1683 : ),
1684 : TP_fast_assign(
1685 : __entry->dev = VFS_I(ip)->i_sb->s_dev;
1686 : __entry->ino = ip->i_ino;
1687 : __entry->size = ip->i_disk_size;
1688 : __entry->start = start;
1689 : __entry->finish = finish;
1690 : ),
1691 : TP_printk("dev %d:%d ino 0x%llx disize 0x%llx start 0x%llx finish 0x%llx",
1692 : MAJOR(__entry->dev), MINOR(__entry->dev),
1693 : __entry->ino,
1694 : __entry->size,
1695 : __entry->start,
1696 : __entry->finish)
1697 : );
1698 :
1699 99307330 : TRACE_EVENT(xfs_bunmap,
1700 : TP_PROTO(struct xfs_inode *ip, xfs_fileoff_t fileoff, xfs_filblks_t len,
1701 : int flags, unsigned long caller_ip),
1702 : TP_ARGS(ip, fileoff, len, flags, caller_ip),
1703 : TP_STRUCT__entry(
1704 : __field(dev_t, dev)
1705 : __field(xfs_ino_t, ino)
1706 : __field(xfs_fsize_t, size)
1707 : __field(xfs_fileoff_t, fileoff)
1708 : __field(xfs_filblks_t, len)
1709 : __field(unsigned long, caller_ip)
1710 : __field(int, flags)
1711 : ),
1712 : TP_fast_assign(
1713 : __entry->dev = VFS_I(ip)->i_sb->s_dev;
1714 : __entry->ino = ip->i_ino;
1715 : __entry->size = ip->i_disk_size;
1716 : __entry->fileoff = fileoff;
1717 : __entry->len = len;
1718 : __entry->caller_ip = caller_ip;
1719 : __entry->flags = flags;
1720 : ),
1721 : TP_printk("dev %d:%d ino 0x%llx disize 0x%llx fileoff 0x%llx fsbcount 0x%llx "
1722 : "flags %s caller %pS",
1723 : MAJOR(__entry->dev), MINOR(__entry->dev),
1724 : __entry->ino,
1725 : __entry->size,
1726 : __entry->fileoff,
1727 : __entry->len,
1728 : __print_flags(__entry->flags, "|", XFS_BMAPI_FLAGS),
1729 : (void *)__entry->caller_ip)
1730 :
1731 : );
1732 :
1733 210 : TRACE_EVENT(xfs_bmapi_freesp,
1734 : TP_PROTO(struct xfs_inode *ip, xfs_fileoff_t bno, xfs_extlen_t len),
1735 : TP_ARGS(ip, bno, len),
1736 : TP_STRUCT__entry(
1737 : __field(dev_t, dev)
1738 : __field(xfs_ino_t, ino)
1739 : __field(xfs_fsize_t, size)
1740 : __field(xfs_fileoff_t, bno)
1741 : __field(xfs_extlen_t, len)
1742 : ),
1743 : TP_fast_assign(
1744 : __entry->dev = VFS_I(ip)->i_sb->s_dev;
1745 : __entry->ino = ip->i_ino;
1746 : __entry->size = ip->i_disk_size;
1747 : __entry->bno = bno;
1748 : __entry->len = len;
1749 : ),
1750 : TP_printk("dev %d:%d ino 0x%llx disize 0x%llx fileoff 0x%llx fsbcount 0x%x",
1751 : MAJOR(__entry->dev), MINOR(__entry->dev),
1752 : __entry->ino,
1753 : __entry->size,
1754 : __entry->bno,
1755 : __entry->len)
1756 : );
1757 :
1758 0 : DECLARE_EVENT_CLASS(xfs_extent_busy_class,
1759 : TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
1760 : xfs_agblock_t agbno, xfs_extlen_t len),
1761 : TP_ARGS(mp, agno, agbno, len),
1762 : TP_STRUCT__entry(
1763 : __field(dev_t, dev)
1764 : __field(xfs_agnumber_t, agno)
1765 : __field(xfs_agblock_t, agbno)
1766 : __field(xfs_extlen_t, len)
1767 : ),
1768 : TP_fast_assign(
1769 : __entry->dev = mp->m_super->s_dev;
1770 : __entry->agno = agno;
1771 : __entry->agbno = agbno;
1772 : __entry->len = len;
1773 : ),
1774 : TP_printk("dev %d:%d agno 0x%x agbno 0x%x fsbcount 0x%x",
1775 : MAJOR(__entry->dev), MINOR(__entry->dev),
1776 : __entry->agno,
1777 : __entry->agbno,
1778 : __entry->len)
1779 : );
1780 : #define DEFINE_BUSY_EVENT(name) \
1781 : DEFINE_EVENT(xfs_extent_busy_class, name, \
1782 : TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
1783 : xfs_agblock_t agbno, xfs_extlen_t len), \
1784 : TP_ARGS(mp, agno, agbno, len))
1785 53005351 : DEFINE_BUSY_EVENT(xfs_extent_busy);
1786 0 : DEFINE_BUSY_EVENT(xfs_extent_busy_enomem);
1787 0 : DEFINE_BUSY_EVENT(xfs_extent_busy_force);
1788 0 : DEFINE_BUSY_EVENT(xfs_extent_busy_reuse);
1789 53002612 : DEFINE_BUSY_EVENT(xfs_extent_busy_clear);
1790 226 : DEFINE_BUSY_EVENT(xfs_alloc_find_freesp);
1791 44 : DEFINE_BUSY_EVENT(xfs_alloc_find_freesp_done);
1792 :
1793 1756426298 : TRACE_EVENT(xfs_extent_busy_trim,
1794 : TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
1795 : xfs_agblock_t agbno, xfs_extlen_t len,
1796 : xfs_agblock_t tbno, xfs_extlen_t tlen),
1797 : TP_ARGS(mp, agno, agbno, len, tbno, tlen),
1798 : TP_STRUCT__entry(
1799 : __field(dev_t, dev)
1800 : __field(xfs_agnumber_t, agno)
1801 : __field(xfs_agblock_t, agbno)
1802 : __field(xfs_extlen_t, len)
1803 : __field(xfs_agblock_t, tbno)
1804 : __field(xfs_extlen_t, tlen)
1805 : ),
1806 : TP_fast_assign(
1807 : __entry->dev = mp->m_super->s_dev;
1808 : __entry->agno = agno;
1809 : __entry->agbno = agbno;
1810 : __entry->len = len;
1811 : __entry->tbno = tbno;
1812 : __entry->tlen = tlen;
1813 : ),
1814 : TP_printk("dev %d:%d agno 0x%x agbno 0x%x fsbcount 0x%x found_agbno 0x%x found_fsbcount 0x%x",
1815 : MAJOR(__entry->dev), MINOR(__entry->dev),
1816 : __entry->agno,
1817 : __entry->agbno,
1818 : __entry->len,
1819 : __entry->tbno,
1820 : __entry->tlen)
1821 : );
1822 :
1823 : #ifdef CONFIG_XFS_RT
1824 0 : DECLARE_EVENT_CLASS(xfs_rtextent_class,
1825 : TP_PROTO(struct xfs_mount *mp, xfs_rtxnum_t off_rtx,
1826 : xfs_rtxnum_t len_rtx),
1827 : TP_ARGS(mp, off_rtx, len_rtx),
1828 : TP_STRUCT__entry(
1829 : __field(dev_t, dev)
1830 : __field(xfs_rtxnum_t, off_rtx)
1831 : __field(xfs_rtxnum_t, len_rtx)
1832 : ),
1833 : TP_fast_assign(
1834 : __entry->dev = mp->m_super->s_dev;
1835 : __entry->off_rtx = off_rtx;
1836 : __entry->len_rtx = len_rtx;
1837 : ),
1838 : TP_printk("dev %d:%d rtx 0x%llx rtxcount 0x%llx",
1839 : MAJOR(__entry->dev), MINOR(__entry->dev),
1840 : __entry->off_rtx,
1841 : __entry->len_rtx)
1842 : );
1843 : #define DEFINE_RTEXTENT_EVENT(name) \
1844 : DEFINE_EVENT(xfs_rtextent_class, name, \
1845 : TP_PROTO(struct xfs_mount *mp, xfs_rtxnum_t off_rtx, \
1846 : xfs_rtxnum_t len_rtx), \
1847 : TP_ARGS(mp, off_rtx, len_rtx))
1848 0 : DEFINE_RTEXTENT_EVENT(xfs_rtalloc_find_freesp);
1849 0 : DEFINE_RTEXTENT_EVENT(xfs_rtalloc_find_freesp_done);
1850 : #endif /* CONFIG_XFS_RT */
1851 :
1852 0 : DECLARE_EVENT_CLASS(xfs_agf_class,
1853 : TP_PROTO(struct xfs_mount *mp, struct xfs_agf *agf, int flags,
1854 : unsigned long caller_ip),
1855 : TP_ARGS(mp, agf, flags, caller_ip),
1856 : TP_STRUCT__entry(
1857 : __field(dev_t, dev)
1858 : __field(xfs_agnumber_t, agno)
1859 : __field(int, flags)
1860 : __field(__u32, length)
1861 : __field(__u32, bno_root)
1862 : __field(__u32, cnt_root)
1863 : __field(__u32, bno_level)
1864 : __field(__u32, cnt_level)
1865 : __field(__u32, flfirst)
1866 : __field(__u32, fllast)
1867 : __field(__u32, flcount)
1868 : __field(__u32, freeblks)
1869 : __field(__u32, longest)
1870 : __field(unsigned long, caller_ip)
1871 : ),
1872 : TP_fast_assign(
1873 : __entry->dev = mp->m_super->s_dev;
1874 : __entry->agno = be32_to_cpu(agf->agf_seqno),
1875 : __entry->flags = flags;
1876 : __entry->length = be32_to_cpu(agf->agf_length),
1877 : __entry->bno_root = be32_to_cpu(agf->agf_roots[XFS_BTNUM_BNO]),
1878 : __entry->cnt_root = be32_to_cpu(agf->agf_roots[XFS_BTNUM_CNT]),
1879 : __entry->bno_level =
1880 : be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNO]),
1881 : __entry->cnt_level =
1882 : be32_to_cpu(agf->agf_levels[XFS_BTNUM_CNT]),
1883 : __entry->flfirst = be32_to_cpu(agf->agf_flfirst),
1884 : __entry->fllast = be32_to_cpu(agf->agf_fllast),
1885 : __entry->flcount = be32_to_cpu(agf->agf_flcount),
1886 : __entry->freeblks = be32_to_cpu(agf->agf_freeblks),
1887 : __entry->longest = be32_to_cpu(agf->agf_longest);
1888 : __entry->caller_ip = caller_ip;
1889 : ),
1890 : TP_printk("dev %d:%d agno 0x%x flags %s length %u roots b %u c %u "
1891 : "levels b %u c %u flfirst %u fllast %u flcount %u "
1892 : "freeblks %u longest %u caller %pS",
1893 : MAJOR(__entry->dev), MINOR(__entry->dev),
1894 : __entry->agno,
1895 : __print_flags(__entry->flags, "|", XFS_AGF_FLAGS),
1896 : __entry->length,
1897 : __entry->bno_root,
1898 : __entry->cnt_root,
1899 : __entry->bno_level,
1900 : __entry->cnt_level,
1901 : __entry->flfirst,
1902 : __entry->fllast,
1903 : __entry->flcount,
1904 : __entry->freeblks,
1905 : __entry->longest,
1906 : (void *)__entry->caller_ip)
1907 : );
1908 : #define DEFINE_AGF_EVENT(name) \
1909 : DEFINE_EVENT(xfs_agf_class, name, \
1910 : TP_PROTO(struct xfs_mount *mp, struct xfs_agf *agf, int flags, \
1911 : unsigned long caller_ip), \
1912 : TP_ARGS(mp, agf, flags, caller_ip))
1913 148785040 : DEFINE_AGF_EVENT(xfs_agf);
1914 4 : DEFINE_AGF_EVENT(xfs_agfl_reset);
1915 :
1916 53018121 : TRACE_EVENT(xfs_free_extent,
1917 : TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, xfs_agblock_t agbno,
1918 : xfs_extlen_t len, enum xfs_ag_resv_type resv, int haveleft,
1919 : int haveright),
1920 : TP_ARGS(mp, agno, agbno, len, resv, haveleft, haveright),
1921 : TP_STRUCT__entry(
1922 : __field(dev_t, dev)
1923 : __field(xfs_agnumber_t, agno)
1924 : __field(xfs_agblock_t, agbno)
1925 : __field(xfs_extlen_t, len)
1926 : __field(int, resv)
1927 : __field(int, haveleft)
1928 : __field(int, haveright)
1929 : ),
1930 : TP_fast_assign(
1931 : __entry->dev = mp->m_super->s_dev;
1932 : __entry->agno = agno;
1933 : __entry->agbno = agbno;
1934 : __entry->len = len;
1935 : __entry->resv = resv;
1936 : __entry->haveleft = haveleft;
1937 : __entry->haveright = haveright;
1938 : ),
1939 : TP_printk("dev %d:%d agno 0x%x agbno 0x%x fsbcount 0x%x resv %d %s",
1940 : MAJOR(__entry->dev), MINOR(__entry->dev),
1941 : __entry->agno,
1942 : __entry->agbno,
1943 : __entry->len,
1944 : __entry->resv,
1945 : __entry->haveleft ?
1946 : (__entry->haveright ? "both" : "left") :
1947 : (__entry->haveright ? "right" : "none"))
1948 :
1949 : );
1950 :
1951 0 : DECLARE_EVENT_CLASS(xfs_alloc_class,
1952 : TP_PROTO(struct xfs_alloc_arg *args),
1953 : TP_ARGS(args),
1954 : TP_STRUCT__entry(
1955 : __field(dev_t, dev)
1956 : __field(xfs_agnumber_t, agno)
1957 : __field(xfs_agblock_t, agbno)
1958 : __field(xfs_extlen_t, minlen)
1959 : __field(xfs_extlen_t, maxlen)
1960 : __field(xfs_extlen_t, mod)
1961 : __field(xfs_extlen_t, prod)
1962 : __field(xfs_extlen_t, minleft)
1963 : __field(xfs_extlen_t, total)
1964 : __field(xfs_extlen_t, alignment)
1965 : __field(xfs_extlen_t, minalignslop)
1966 : __field(xfs_extlen_t, len)
1967 : __field(char, wasdel)
1968 : __field(char, wasfromfl)
1969 : __field(int, resv)
1970 : __field(int, datatype)
1971 : __field(xfs_agnumber_t, highest_agno)
1972 : ),
1973 : TP_fast_assign(
1974 : __entry->dev = args->mp->m_super->s_dev;
1975 : __entry->agno = args->agno;
1976 : __entry->agbno = args->agbno;
1977 : __entry->minlen = args->minlen;
1978 : __entry->maxlen = args->maxlen;
1979 : __entry->mod = args->mod;
1980 : __entry->prod = args->prod;
1981 : __entry->minleft = args->minleft;
1982 : __entry->total = args->total;
1983 : __entry->alignment = args->alignment;
1984 : __entry->minalignslop = args->minalignslop;
1985 : __entry->len = args->len;
1986 : __entry->wasdel = args->wasdel;
1987 : __entry->wasfromfl = args->wasfromfl;
1988 : __entry->resv = args->resv;
1989 : __entry->datatype = args->datatype;
1990 : __entry->highest_agno = args->tp->t_highest_agno;
1991 : ),
1992 : TP_printk("dev %d:%d agno 0x%x agbno 0x%x minlen %u maxlen %u mod %u "
1993 : "prod %u minleft %u total %u alignment %u minalignslop %u "
1994 : "len %u wasdel %d wasfromfl %d resv %d "
1995 : "datatype 0x%x highest_agno 0x%x",
1996 : MAJOR(__entry->dev), MINOR(__entry->dev),
1997 : __entry->agno,
1998 : __entry->agbno,
1999 : __entry->minlen,
2000 : __entry->maxlen,
2001 : __entry->mod,
2002 : __entry->prod,
2003 : __entry->minleft,
2004 : __entry->total,
2005 : __entry->alignment,
2006 : __entry->minalignslop,
2007 : __entry->len,
2008 : __entry->wasdel,
2009 : __entry->wasfromfl,
2010 : __entry->resv,
2011 : __entry->datatype,
2012 : __entry->highest_agno)
2013 : )
2014 :
2015 : #define DEFINE_ALLOC_EVENT(name) \
2016 : DEFINE_EVENT(xfs_alloc_class, name, \
2017 : TP_PROTO(struct xfs_alloc_arg *args), \
2018 : TP_ARGS(args))
2019 72183 : DEFINE_ALLOC_EVENT(xfs_alloc_exact_done);
2020 242984 : DEFINE_ALLOC_EVENT(xfs_alloc_exact_notfound);
2021 1 : DEFINE_ALLOC_EVENT(xfs_alloc_exact_error);
2022 0 : DEFINE_ALLOC_EVENT(xfs_alloc_near_nominleft);
2023 25695115 : DEFINE_ALLOC_EVENT(xfs_alloc_near_first);
2024 60890619 : DEFINE_ALLOC_EVENT(xfs_alloc_cur);
2025 8682670 : DEFINE_ALLOC_EVENT(xfs_alloc_cur_right);
2026 14153449 : DEFINE_ALLOC_EVENT(xfs_alloc_cur_left);
2027 159973846 : DEFINE_ALLOC_EVENT(xfs_alloc_cur_lookup);
2028 12395272 : DEFINE_ALLOC_EVENT(xfs_alloc_cur_lookup_done);
2029 0 : DEFINE_ALLOC_EVENT(xfs_alloc_near_error);
2030 0 : DEFINE_ALLOC_EVENT(xfs_alloc_near_noentry);
2031 34685 : DEFINE_ALLOC_EVENT(xfs_alloc_near_busy);
2032 689 : DEFINE_ALLOC_EVENT(xfs_alloc_size_neither);
2033 0 : DEFINE_ALLOC_EVENT(xfs_alloc_size_noentry);
2034 16935 : DEFINE_ALLOC_EVENT(xfs_alloc_size_nominleft);
2035 3202796 : DEFINE_ALLOC_EVENT(xfs_alloc_size_done);
2036 129 : DEFINE_ALLOC_EVENT(xfs_alloc_size_error);
2037 10392 : DEFINE_ALLOC_EVENT(xfs_alloc_size_busy);
2038 0 : DEFINE_ALLOC_EVENT(xfs_alloc_small_freelist);
2039 0 : DEFINE_ALLOC_EVENT(xfs_alloc_small_notenough);
2040 94772 : DEFINE_ALLOC_EVENT(xfs_alloc_small_done);
2041 0 : DEFINE_ALLOC_EVENT(xfs_alloc_small_error);
2042 0 : DEFINE_ALLOC_EVENT(xfs_alloc_vextent_badargs);
2043 0 : DEFINE_ALLOC_EVENT(xfs_alloc_vextent_skip_deadlock);
2044 795 : DEFINE_ALLOC_EVENT(xfs_alloc_vextent_nofix);
2045 37317735 : DEFINE_ALLOC_EVENT(xfs_alloc_vextent_noagbp);
2046 36760739 : DEFINE_ALLOC_EVENT(xfs_alloc_vextent_loopfailed);
2047 15074 : DEFINE_ALLOC_EVENT(xfs_alloc_vextent_allfailed);
2048 :
2049 0 : DEFINE_ALLOC_EVENT(xfs_alloc_vextent_this_ag);
2050 62497561 : DEFINE_ALLOC_EVENT(xfs_alloc_vextent_start_ag);
2051 364252 : DEFINE_ALLOC_EVENT(xfs_alloc_vextent_first_ag);
2052 444736 : DEFINE_ALLOC_EVENT(xfs_alloc_vextent_exact_bno);
2053 1277435 : DEFINE_ALLOC_EVENT(xfs_alloc_vextent_near_bno);
2054 63749685 : DEFINE_ALLOC_EVENT(xfs_alloc_vextent_finish);
2055 :
2056 3853234775 : TRACE_EVENT(xfs_alloc_cur_check,
2057 : TP_PROTO(struct xfs_mount *mp, xfs_btnum_t btnum, xfs_agblock_t bno,
2058 : xfs_extlen_t len, xfs_extlen_t diff, bool new),
2059 : TP_ARGS(mp, btnum, bno, len, diff, new),
2060 : TP_STRUCT__entry(
2061 : __field(dev_t, dev)
2062 : __field(xfs_btnum_t, btnum)
2063 : __field(xfs_agblock_t, bno)
2064 : __field(xfs_extlen_t, len)
2065 : __field(xfs_extlen_t, diff)
2066 : __field(bool, new)
2067 : ),
2068 : TP_fast_assign(
2069 : __entry->dev = mp->m_super->s_dev;
2070 : __entry->btnum = btnum;
2071 : __entry->bno = bno;
2072 : __entry->len = len;
2073 : __entry->diff = diff;
2074 : __entry->new = new;
2075 : ),
2076 : TP_printk("dev %d:%d btree %s agbno 0x%x fsbcount 0x%x diff 0x%x new %d",
2077 : MAJOR(__entry->dev), MINOR(__entry->dev),
2078 : __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
2079 : __entry->bno, __entry->len, __entry->diff, __entry->new)
2080 : )
2081 :
2082 0 : DECLARE_EVENT_CLASS(xfs_da_class,
2083 : TP_PROTO(struct xfs_da_args *args),
2084 : TP_ARGS(args),
2085 : TP_STRUCT__entry(
2086 : __field(dev_t, dev)
2087 : __field(xfs_ino_t, ino)
2088 : __dynamic_array(char, name, args->namelen)
2089 : __field(int, namelen)
2090 : __field(xfs_dahash_t, hashval)
2091 : __field(xfs_ino_t, inumber)
2092 : __field(uint32_t, op_flags)
2093 : __field(xfs_ino_t, owner)
2094 : ),
2095 : TP_fast_assign(
2096 : __entry->dev = VFS_I(args->dp)->i_sb->s_dev;
2097 : __entry->ino = args->dp->i_ino;
2098 : if (args->namelen)
2099 : memcpy(__get_str(name), args->name, args->namelen);
2100 : __entry->namelen = args->namelen;
2101 : __entry->hashval = args->hashval;
2102 : __entry->inumber = args->inumber;
2103 : __entry->op_flags = args->op_flags;
2104 : __entry->owner = args->owner;
2105 : ),
2106 : TP_printk("dev %d:%d ino 0x%llx name %.*s namelen %d hashval 0x%x "
2107 : "inumber 0x%llx op_flags %s owner 0x%llx",
2108 : MAJOR(__entry->dev), MINOR(__entry->dev),
2109 : __entry->ino,
2110 : __entry->namelen,
2111 : __entry->namelen ? __get_str(name) : NULL,
2112 : __entry->namelen,
2113 : __entry->hashval,
2114 : __entry->inumber,
2115 : __print_flags(__entry->op_flags, "|", XFS_DA_OP_FLAGS),
2116 : __entry->owner)
2117 : )
2118 :
2119 : #define DEFINE_DIR2_EVENT(name) \
2120 : DEFINE_EVENT(xfs_da_class, name, \
2121 : TP_PROTO(struct xfs_da_args *args), \
2122 : TP_ARGS(args))
2123 50877612 : DEFINE_DIR2_EVENT(xfs_dir2_sf_addname);
2124 6880413 : DEFINE_DIR2_EVENT(xfs_dir2_sf_create);
2125 344757064 : DEFINE_DIR2_EVENT(xfs_dir2_sf_lookup);
2126 31182781 : DEFINE_DIR2_EVENT(xfs_dir2_sf_replace);
2127 24921944 : DEFINE_DIR2_EVENT(xfs_dir2_sf_removename);
2128 0 : DEFINE_DIR2_EVENT(xfs_dir2_sf_toino4);
2129 0 : DEFINE_DIR2_EVENT(xfs_dir2_sf_toino8);
2130 395638 : DEFINE_DIR2_EVENT(xfs_dir2_sf_to_block);
2131 2813366 : DEFINE_DIR2_EVENT(xfs_dir2_block_addname);
2132 33335981 : DEFINE_DIR2_EVENT(xfs_dir2_block_lookup);
2133 1150069 : DEFINE_DIR2_EVENT(xfs_dir2_block_replace);
2134 1837593 : DEFINE_DIR2_EVENT(xfs_dir2_block_removename);
2135 272764 : DEFINE_DIR2_EVENT(xfs_dir2_block_to_sf);
2136 5409 : DEFINE_DIR2_EVENT(xfs_dir2_block_to_leaf);
2137 3921924 : DEFINE_DIR2_EVENT(xfs_dir2_leaf_addname);
2138 10181483 : DEFINE_DIR2_EVENT(xfs_dir2_leaf_lookup);
2139 200877 : DEFINE_DIR2_EVENT(xfs_dir2_leaf_replace);
2140 3804005 : DEFINE_DIR2_EVENT(xfs_dir2_leaf_removename);
2141 3805228 : DEFINE_DIR2_EVENT(xfs_dir2_leaf_to_block);
2142 1722 : DEFINE_DIR2_EVENT(xfs_dir2_leaf_to_node);
2143 32074087 : DEFINE_DIR2_EVENT(xfs_dir2_node_addname);
2144 73349692 : DEFINE_DIR2_EVENT(xfs_dir2_node_lookup);
2145 506922 : DEFINE_DIR2_EVENT(xfs_dir2_node_replace);
2146 28710912 : DEFINE_DIR2_EVENT(xfs_dir2_node_removename);
2147 22457 : DEFINE_DIR2_EVENT(xfs_dir2_node_to_leaf);
2148 :
2149 0 : DECLARE_EVENT_CLASS(xfs_attr_class,
2150 : TP_PROTO(struct xfs_da_args *args),
2151 : TP_ARGS(args),
2152 : TP_STRUCT__entry(
2153 : __field(dev_t, dev)
2154 : __field(xfs_ino_t, ino)
2155 : __dynamic_array(char, name, args->namelen)
2156 : __field(int, namelen)
2157 : __field(int, valuelen)
2158 : __field(xfs_dahash_t, hashval)
2159 : __field(unsigned int, attr_filter)
2160 : __field(unsigned int, attr_flags)
2161 : __field(uint32_t, op_flags)
2162 : ),
2163 : TP_fast_assign(
2164 : __entry->dev = VFS_I(args->dp)->i_sb->s_dev;
2165 : __entry->ino = args->dp->i_ino;
2166 : if (args->namelen)
2167 : memcpy(__get_str(name), args->name, args->namelen);
2168 : __entry->namelen = args->namelen;
2169 : __entry->valuelen = args->valuelen;
2170 : __entry->hashval = args->hashval;
2171 : __entry->attr_filter = args->attr_filter;
2172 : __entry->attr_flags = args->attr_flags;
2173 : __entry->op_flags = args->op_flags;
2174 : ),
2175 : TP_printk("dev %d:%d ino 0x%llx name %.*s namelen %d valuelen %d "
2176 : "hashval 0x%x filter %s flags %s op_flags %s",
2177 : MAJOR(__entry->dev), MINOR(__entry->dev),
2178 : __entry->ino,
2179 : __entry->namelen,
2180 : __entry->namelen ? __get_str(name) : NULL,
2181 : __entry->namelen,
2182 : __entry->valuelen,
2183 : __entry->hashval,
2184 : __print_flags(__entry->attr_filter, "|",
2185 : XFS_ATTR_FILTER_FLAGS),
2186 : __print_flags(__entry->attr_flags, "|",
2187 : { XATTR_CREATE, "CREATE" },
2188 : { XATTR_REPLACE, "REPLACE" }),
2189 : __print_flags(__entry->op_flags, "|", XFS_DA_OP_FLAGS))
2190 : )
2191 :
2192 : #define DEFINE_ATTR_EVENT(name) \
2193 : DEFINE_EVENT(xfs_attr_class, name, \
2194 : TP_PROTO(struct xfs_da_args *args), \
2195 : TP_ARGS(args))
2196 180182664 : DEFINE_ATTR_EVENT(xfs_attr_sf_add);
2197 164737226 : DEFINE_ATTR_EVENT(xfs_attr_sf_addname);
2198 67465730 : DEFINE_ATTR_EVENT(xfs_attr_sf_create);
2199 164736535 : DEFINE_ATTR_EVENT(xfs_attr_sf_lookup);
2200 102499347 : DEFINE_ATTR_EVENT(xfs_attr_sf_remove);
2201 8588036 : DEFINE_ATTR_EVENT(xfs_attr_sf_to_leaf);
2202 :
2203 199075431 : DEFINE_ATTR_EVENT(xfs_attr_leaf_add);
2204 24188 : DEFINE_ATTR_EVENT(xfs_attr_leaf_add_old);
2205 84434 : DEFINE_ATTR_EVENT(xfs_attr_leaf_add_new);
2206 198885893 : DEFINE_ATTR_EVENT(xfs_attr_leaf_add_work);
2207 8696179 : DEFINE_ATTR_EVENT(xfs_attr_leaf_create);
2208 630073 : DEFINE_ATTR_EVENT(xfs_attr_leaf_compact);
2209 32550530 : DEFINE_ATTR_EVENT(xfs_attr_leaf_get);
2210 847194702 : DEFINE_ATTR_EVENT(xfs_attr_leaf_lookup);
2211 36226791 : DEFINE_ATTR_EVENT(xfs_attr_leaf_replace);
2212 97079859 : DEFINE_ATTR_EVENT(xfs_attr_leaf_remove);
2213 58824369 : DEFINE_ATTR_EVENT(xfs_attr_leaf_removename);
2214 108622 : DEFINE_ATTR_EVENT(xfs_attr_leaf_split);
2215 0 : DEFINE_ATTR_EVENT(xfs_attr_leaf_split_before);
2216 0 : DEFINE_ATTR_EVENT(xfs_attr_leaf_split_after);
2217 583 : DEFINE_ATTR_EVENT(xfs_attr_leaf_clearflag);
2218 1283332 : DEFINE_ATTR_EVENT(xfs_attr_leaf_setflag);
2219 36990774 : DEFINE_ATTR_EVENT(xfs_attr_leaf_flipflags);
2220 4500949 : DEFINE_ATTR_EVENT(xfs_attr_leaf_to_sf);
2221 80091 : DEFINE_ATTR_EVENT(xfs_attr_leaf_to_node);
2222 108622 : DEFINE_ATTR_EVENT(xfs_attr_leaf_rebalance);
2223 1473 : DEFINE_ATTR_EVENT(xfs_attr_leaf_unbalance);
2224 2065392 : DEFINE_ATTR_EVENT(xfs_attr_leaf_toosmall);
2225 :
2226 3219839 : DEFINE_ATTR_EVENT(xfs_attr_node_addname);
2227 786808 : DEFINE_ATTR_EVENT(xfs_attr_node_get);
2228 782495 : DEFINE_ATTR_EVENT(xfs_attr_node_replace);
2229 0 : DEFINE_ATTR_EVENT(xfs_attr_node_removename);
2230 :
2231 0 : DEFINE_ATTR_EVENT(xfs_attr_fillstate);
2232 0 : DEFINE_ATTR_EVENT(xfs_attr_refillstate);
2233 :
2234 772 : DEFINE_ATTR_EVENT(xfs_attr_rmtval_get);
2235 0 : DEFINE_ATTR_EVENT(xfs_attr_rmtval_set);
2236 :
2237 : #define DEFINE_DA_EVENT(name) \
2238 : DEFINE_EVENT(xfs_da_class, name, \
2239 : TP_PROTO(struct xfs_da_args *args), \
2240 : TP_ARGS(args))
2241 142099 : DEFINE_DA_EVENT(xfs_da_split);
2242 3624570 : DEFINE_DA_EVENT(xfs_da_join);
2243 0 : DEFINE_DA_EVENT(xfs_da_link_before);
2244 142157 : DEFINE_DA_EVENT(xfs_da_link_after);
2245 3549 : DEFINE_DA_EVENT(xfs_da_unlink_back);
2246 20152 : DEFINE_DA_EVENT(xfs_da_unlink_forward);
2247 1604 : DEFINE_DA_EVENT(xfs_da_root_split);
2248 22616 : DEFINE_DA_EVENT(xfs_da_root_join);
2249 140553 : DEFINE_DA_EVENT(xfs_da_node_add);
2250 81752 : DEFINE_DA_EVENT(xfs_da_node_create);
2251 140553 : DEFINE_DA_EVENT(xfs_da_node_split);
2252 23701 : DEFINE_DA_EVENT(xfs_da_node_remove);
2253 59 : DEFINE_DA_EVENT(xfs_da_node_rebalance);
2254 4 : DEFINE_DA_EVENT(xfs_da_node_unbalance);
2255 1085 : DEFINE_DA_EVENT(xfs_da_node_toosmall);
2256 0 : DEFINE_DA_EVENT(xfs_da_swap_lastblock);
2257 8817297 : DEFINE_DA_EVENT(xfs_da_grow_inode);
2258 4530390 : DEFINE_DA_EVENT(xfs_da_shrink_inode);
2259 66250700 : DEFINE_DA_EVENT(xfs_da_fixhashpath);
2260 303874288 : DEFINE_DA_EVENT(xfs_da_path_shift);
2261 :
2262 0 : DECLARE_EVENT_CLASS(xfs_dir2_space_class,
2263 : TP_PROTO(struct xfs_da_args *args, int idx),
2264 : TP_ARGS(args, idx),
2265 : TP_STRUCT__entry(
2266 : __field(dev_t, dev)
2267 : __field(xfs_ino_t, ino)
2268 : __field(uint32_t, op_flags)
2269 : __field(int, idx)
2270 : ),
2271 : TP_fast_assign(
2272 : __entry->dev = VFS_I(args->dp)->i_sb->s_dev;
2273 : __entry->ino = args->dp->i_ino;
2274 : __entry->op_flags = args->op_flags;
2275 : __entry->idx = idx;
2276 : ),
2277 : TP_printk("dev %d:%d ino 0x%llx op_flags %s index %d",
2278 : MAJOR(__entry->dev), MINOR(__entry->dev),
2279 : __entry->ino,
2280 : __print_flags(__entry->op_flags, "|", XFS_DA_OP_FLAGS),
2281 : __entry->idx)
2282 : )
2283 :
2284 : #define DEFINE_DIR2_SPACE_EVENT(name) \
2285 : DEFINE_EVENT(xfs_dir2_space_class, name, \
2286 : TP_PROTO(struct xfs_da_args *args, int idx), \
2287 : TP_ARGS(args, idx))
2288 32106153 : DEFINE_DIR2_SPACE_EVENT(xfs_dir2_leafn_add);
2289 28709940 : DEFINE_DIR2_SPACE_EVENT(xfs_dir2_leafn_remove);
2290 447721 : DEFINE_DIR2_SPACE_EVENT(xfs_dir2_grow_inode);
2291 297129 : DEFINE_DIR2_SPACE_EVENT(xfs_dir2_shrink_inode);
2292 :
2293 55700 : TRACE_EVENT(xfs_dir2_leafn_moveents,
2294 : TP_PROTO(struct xfs_da_args *args, int src_idx, int dst_idx, int count),
2295 : TP_ARGS(args, src_idx, dst_idx, count),
2296 : TP_STRUCT__entry(
2297 : __field(dev_t, dev)
2298 : __field(xfs_ino_t, ino)
2299 : __field(uint32_t, op_flags)
2300 : __field(int, src_idx)
2301 : __field(int, dst_idx)
2302 : __field(int, count)
2303 : ),
2304 : TP_fast_assign(
2305 : __entry->dev = VFS_I(args->dp)->i_sb->s_dev;
2306 : __entry->ino = args->dp->i_ino;
2307 : __entry->op_flags = args->op_flags;
2308 : __entry->src_idx = src_idx;
2309 : __entry->dst_idx = dst_idx;
2310 : __entry->count = count;
2311 : ),
2312 : TP_printk("dev %d:%d ino 0x%llx op_flags %s "
2313 : "src_idx %d dst_idx %d count %d",
2314 : MAJOR(__entry->dev), MINOR(__entry->dev),
2315 : __entry->ino,
2316 : __print_flags(__entry->op_flags, "|", XFS_DA_OP_FLAGS),
2317 : __entry->src_idx,
2318 : __entry->dst_idx,
2319 : __entry->count)
2320 : );
2321 :
2322 : #define XFS_SWAP_EXT_INODES \
2323 : { 0, "target" }, \
2324 : { 1, "temp" }
2325 :
2326 : TRACE_DEFINE_ENUM(XFS_DINODE_FMT_DEV);
2327 : TRACE_DEFINE_ENUM(XFS_DINODE_FMT_LOCAL);
2328 : TRACE_DEFINE_ENUM(XFS_DINODE_FMT_EXTENTS);
2329 : TRACE_DEFINE_ENUM(XFS_DINODE_FMT_BTREE);
2330 : TRACE_DEFINE_ENUM(XFS_DINODE_FMT_UUID);
2331 : TRACE_DEFINE_ENUM(XFS_DINODE_FMT_RMAP);
2332 : TRACE_DEFINE_ENUM(XFS_DINODE_FMT_REFCOUNT);
2333 :
2334 0 : DECLARE_EVENT_CLASS(xfs_swap_extent_class,
2335 : TP_PROTO(struct xfs_inode *ip, int which),
2336 : TP_ARGS(ip, which),
2337 : TP_STRUCT__entry(
2338 : __field(dev_t, dev)
2339 : __field(int, which)
2340 : __field(xfs_ino_t, ino)
2341 : __field(int, format)
2342 : __field(xfs_extnum_t, nex)
2343 : __field(int, broot_size)
2344 : __field(int, fork_off)
2345 : ),
2346 : TP_fast_assign(
2347 : __entry->dev = VFS_I(ip)->i_sb->s_dev;
2348 : __entry->which = which;
2349 : __entry->ino = ip->i_ino;
2350 : __entry->format = ip->i_df.if_format;
2351 : __entry->nex = ip->i_df.if_nextents;
2352 : __entry->broot_size = ip->i_df.if_broot_bytes;
2353 : __entry->fork_off = xfs_inode_fork_boff(ip);
2354 : ),
2355 : TP_printk("dev %d:%d ino 0x%llx (%s), %s format, num_extents %llu, "
2356 : "broot size %d, forkoff 0x%x",
2357 : MAJOR(__entry->dev), MINOR(__entry->dev),
2358 : __entry->ino,
2359 : __print_symbolic(__entry->which, XFS_SWAP_EXT_INODES),
2360 : __print_symbolic(__entry->format, XFS_INODE_FORMAT_STR),
2361 : __entry->nex,
2362 : __entry->broot_size,
2363 : __entry->fork_off)
2364 : )
2365 :
2366 : #define DEFINE_SWAPEXT_EVENT(name) \
2367 : DEFINE_EVENT(xfs_swap_extent_class, name, \
2368 : TP_PROTO(struct xfs_inode *ip, int which), \
2369 : TP_ARGS(ip, which))
2370 :
2371 529280 : DEFINE_SWAPEXT_EVENT(xfs_swap_extent_before);
2372 529040 : DEFINE_SWAPEXT_EVENT(xfs_swap_extent_after);
2373 :
2374 11369 : TRACE_EVENT(xfs_log_recover,
2375 : TP_PROTO(struct xlog *log, xfs_daddr_t headblk, xfs_daddr_t tailblk),
2376 : TP_ARGS(log, headblk, tailblk),
2377 : TP_STRUCT__entry(
2378 : __field(dev_t, dev)
2379 : __field(xfs_daddr_t, headblk)
2380 : __field(xfs_daddr_t, tailblk)
2381 : ),
2382 : TP_fast_assign(
2383 : __entry->dev = log->l_mp->m_super->s_dev;
2384 : __entry->headblk = headblk;
2385 : __entry->tailblk = tailblk;
2386 : ),
2387 : TP_printk("dev %d:%d headblk 0x%llx tailblk 0x%llx",
2388 : MAJOR(__entry->dev), MINOR(__entry->dev), __entry->headblk,
2389 : __entry->tailblk)
2390 : )
2391 :
2392 2654324 : TRACE_EVENT(xfs_log_recover_record,
2393 : TP_PROTO(struct xlog *log, struct xlog_rec_header *rhead, int pass),
2394 : TP_ARGS(log, rhead, pass),
2395 : TP_STRUCT__entry(
2396 : __field(dev_t, dev)
2397 : __field(xfs_lsn_t, lsn)
2398 : __field(int, len)
2399 : __field(int, num_logops)
2400 : __field(int, pass)
2401 : ),
2402 : TP_fast_assign(
2403 : __entry->dev = log->l_mp->m_super->s_dev;
2404 : __entry->lsn = be64_to_cpu(rhead->h_lsn);
2405 : __entry->len = be32_to_cpu(rhead->h_len);
2406 : __entry->num_logops = be32_to_cpu(rhead->h_num_logops);
2407 : __entry->pass = pass;
2408 : ),
2409 : TP_printk("dev %d:%d lsn 0x%llx len 0x%x num_logops 0x%x pass %d",
2410 : MAJOR(__entry->dev), MINOR(__entry->dev),
2411 : __entry->lsn, __entry->len, __entry->num_logops,
2412 : __entry->pass)
2413 : )
2414 :
2415 0 : DECLARE_EVENT_CLASS(xfs_log_recover_item_class,
2416 : TP_PROTO(struct xlog *log, struct xlog_recover *trans,
2417 : struct xlog_recover_item *item, int pass),
2418 : TP_ARGS(log, trans, item, pass),
2419 : TP_STRUCT__entry(
2420 : __field(dev_t, dev)
2421 : __field(unsigned long, item)
2422 : __field(xlog_tid_t, tid)
2423 : __field(xfs_lsn_t, lsn)
2424 : __field(int, type)
2425 : __field(int, pass)
2426 : __field(int, count)
2427 : __field(int, total)
2428 : ),
2429 : TP_fast_assign(
2430 : __entry->dev = log->l_mp->m_super->s_dev;
2431 : __entry->item = (unsigned long)item;
2432 : __entry->tid = trans->r_log_tid;
2433 : __entry->lsn = trans->r_lsn;
2434 : __entry->type = ITEM_TYPE(item);
2435 : __entry->pass = pass;
2436 : __entry->count = item->ri_cnt;
2437 : __entry->total = item->ri_total;
2438 : ),
2439 : TP_printk("dev %d:%d tid 0x%x lsn 0x%llx, pass %d, item %p, "
2440 : "item type %s item region count/total %d/%d",
2441 : MAJOR(__entry->dev), MINOR(__entry->dev),
2442 : __entry->tid,
2443 : __entry->lsn,
2444 : __entry->pass,
2445 : (void *)__entry->item,
2446 : __print_symbolic(__entry->type, XFS_LI_TYPE_DESC),
2447 : __entry->count,
2448 : __entry->total)
2449 : )
2450 :
2451 : #define DEFINE_LOG_RECOVER_ITEM(name) \
2452 : DEFINE_EVENT(xfs_log_recover_item_class, name, \
2453 : TP_PROTO(struct xlog *log, struct xlog_recover *trans, \
2454 : struct xlog_recover_item *item, int pass), \
2455 : TP_ARGS(log, trans, item, pass))
2456 :
2457 128729690 : DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_add);
2458 1839054 : DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_add_cont);
2459 779884 : DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_reorder_head);
2460 23968404 : DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_reorder_tail);
2461 76883055 : DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_recover);
2462 :
2463 0 : DECLARE_EVENT_CLASS(xfs_log_recover_buf_item_class,
2464 : TP_PROTO(struct xlog *log, struct xfs_buf_log_format *buf_f),
2465 : TP_ARGS(log, buf_f),
2466 : TP_STRUCT__entry(
2467 : __field(dev_t, dev)
2468 : __field(int64_t, blkno)
2469 : __field(unsigned short, len)
2470 : __field(unsigned short, flags)
2471 : __field(unsigned short, size)
2472 : __field(unsigned int, map_size)
2473 : ),
2474 : TP_fast_assign(
2475 : __entry->dev = log->l_mp->m_super->s_dev;
2476 : __entry->blkno = buf_f->blf_blkno;
2477 : __entry->len = buf_f->blf_len;
2478 : __entry->flags = buf_f->blf_flags;
2479 : __entry->size = buf_f->blf_size;
2480 : __entry->map_size = buf_f->blf_map_size;
2481 : ),
2482 : TP_printk("dev %d:%d daddr 0x%llx, bbcount 0x%x, flags 0x%x, size %d, "
2483 : "map_size %d",
2484 : MAJOR(__entry->dev), MINOR(__entry->dev),
2485 : __entry->blkno,
2486 : __entry->len,
2487 : __entry->flags,
2488 : __entry->size,
2489 : __entry->map_size)
2490 : )
2491 :
2492 : #define DEFINE_LOG_RECOVER_BUF_ITEM(name) \
2493 : DEFINE_EVENT(xfs_log_recover_buf_item_class, name, \
2494 : TP_PROTO(struct xlog *log, struct xfs_buf_log_format *buf_f), \
2495 : TP_ARGS(log, buf_f))
2496 :
2497 13245950 : DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_not_cancel);
2498 840405 : DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel);
2499 320090 : DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel_add);
2500 69852 : DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel_ref_inc);
2501 12795487 : DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_recover);
2502 15278 : DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_skip);
2503 8847 : DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_inode_buf);
2504 12771362 : DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_reg_buf);
2505 297688 : DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_dquot_buf);
2506 :
2507 0 : DECLARE_EVENT_CLASS(xfs_log_recover_ino_item_class,
2508 : TP_PROTO(struct xlog *log, struct xfs_inode_log_format *in_f),
2509 : TP_ARGS(log, in_f),
2510 : TP_STRUCT__entry(
2511 : __field(dev_t, dev)
2512 : __field(xfs_ino_t, ino)
2513 : __field(unsigned short, size)
2514 : __field(int, fields)
2515 : __field(unsigned short, asize)
2516 : __field(unsigned short, dsize)
2517 : __field(int64_t, blkno)
2518 : __field(int, len)
2519 : __field(int, boffset)
2520 : ),
2521 : TP_fast_assign(
2522 : __entry->dev = log->l_mp->m_super->s_dev;
2523 : __entry->ino = in_f->ilf_ino;
2524 : __entry->size = in_f->ilf_size;
2525 : __entry->fields = in_f->ilf_fields;
2526 : __entry->asize = in_f->ilf_asize;
2527 : __entry->dsize = in_f->ilf_dsize;
2528 : __entry->blkno = in_f->ilf_blkno;
2529 : __entry->len = in_f->ilf_len;
2530 : __entry->boffset = in_f->ilf_boffset;
2531 : ),
2532 : TP_printk("dev %d:%d ino 0x%llx, size %u, fields 0x%x, asize %d, "
2533 : "dsize %d, daddr 0x%llx, bbcount 0x%x, boffset %d",
2534 : MAJOR(__entry->dev), MINOR(__entry->dev),
2535 : __entry->ino,
2536 : __entry->size,
2537 : __entry->fields,
2538 : __entry->asize,
2539 : __entry->dsize,
2540 : __entry->blkno,
2541 : __entry->len,
2542 : __entry->boffset)
2543 : )
2544 : #define DEFINE_LOG_RECOVER_INO_ITEM(name) \
2545 : DEFINE_EVENT(xfs_log_recover_ino_item_class, name, \
2546 : TP_PROTO(struct xlog *log, struct xfs_inode_log_format *in_f), \
2547 : TP_ARGS(log, in_f))
2548 :
2549 5697744 : DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_recover);
2550 234106 : DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_cancel);
2551 7284 : DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_skip);
2552 :
2553 0 : DECLARE_EVENT_CLASS(xfs_log_recover_icreate_item_class,
2554 : TP_PROTO(struct xlog *log, struct xfs_icreate_log *in_f),
2555 : TP_ARGS(log, in_f),
2556 : TP_STRUCT__entry(
2557 : __field(dev_t, dev)
2558 : __field(xfs_agnumber_t, agno)
2559 : __field(xfs_agblock_t, agbno)
2560 : __field(unsigned int, count)
2561 : __field(unsigned int, isize)
2562 : __field(xfs_agblock_t, length)
2563 : __field(unsigned int, gen)
2564 : ),
2565 : TP_fast_assign(
2566 : __entry->dev = log->l_mp->m_super->s_dev;
2567 : __entry->agno = be32_to_cpu(in_f->icl_ag);
2568 : __entry->agbno = be32_to_cpu(in_f->icl_agbno);
2569 : __entry->count = be32_to_cpu(in_f->icl_count);
2570 : __entry->isize = be32_to_cpu(in_f->icl_isize);
2571 : __entry->length = be32_to_cpu(in_f->icl_length);
2572 : __entry->gen = be32_to_cpu(in_f->icl_gen);
2573 : ),
2574 : TP_printk("dev %d:%d agno 0x%x agbno 0x%x fsbcount 0x%x ireccount %u isize %u gen 0x%x",
2575 : MAJOR(__entry->dev), MINOR(__entry->dev),
2576 : __entry->agno,
2577 : __entry->agbno,
2578 : __entry->length,
2579 : __entry->count,
2580 : __entry->isize,
2581 : __entry->gen)
2582 : )
2583 : #define DEFINE_LOG_RECOVER_ICREATE_ITEM(name) \
2584 : DEFINE_EVENT(xfs_log_recover_icreate_item_class, name, \
2585 : TP_PROTO(struct xlog *log, struct xfs_icreate_log *in_f), \
2586 : TP_ARGS(log, in_f))
2587 :
2588 69 : DEFINE_LOG_RECOVER_ICREATE_ITEM(xfs_log_recover_icreate_cancel);
2589 7522 : DEFINE_LOG_RECOVER_ICREATE_ITEM(xfs_log_recover_icreate_recover);
2590 :
2591 0 : DECLARE_EVENT_CLASS(xfs_discard_class,
2592 : TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
2593 : xfs_agblock_t agbno, xfs_extlen_t len),
2594 : TP_ARGS(mp, agno, agbno, len),
2595 : TP_STRUCT__entry(
2596 : __field(dev_t, dev)
2597 : __field(xfs_agnumber_t, agno)
2598 : __field(xfs_agblock_t, agbno)
2599 : __field(xfs_extlen_t, len)
2600 : ),
2601 : TP_fast_assign(
2602 : __entry->dev = mp->m_super->s_dev;
2603 : __entry->agno = agno;
2604 : __entry->agbno = agbno;
2605 : __entry->len = len;
2606 : ),
2607 : TP_printk("dev %d:%d agno 0x%x agbno 0x%x fsbcount 0x%x",
2608 : MAJOR(__entry->dev), MINOR(__entry->dev),
2609 : __entry->agno,
2610 : __entry->agbno,
2611 : __entry->len)
2612 : )
2613 :
2614 : #define DEFINE_DISCARD_EVENT(name) \
2615 : DEFINE_EVENT(xfs_discard_class, name, \
2616 : TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
2617 : xfs_agblock_t agbno, xfs_extlen_t len), \
2618 : TP_ARGS(mp, agno, agbno, len))
2619 622305 : DEFINE_DISCARD_EVENT(xfs_discard_extent);
2620 8184094 : DEFINE_DISCARD_EVENT(xfs_discard_toosmall);
2621 0 : DEFINE_DISCARD_EVENT(xfs_discard_exclude);
2622 2310 : DEFINE_DISCARD_EVENT(xfs_discard_busy);
2623 208 : DEFINE_DISCARD_EVENT(xfs_discard_relax);
2624 :
2625 0 : DECLARE_EVENT_CLASS(xfs_rtdiscard_class,
2626 : TP_PROTO(struct xfs_mount *mp,
2627 : xfs_rtblock_t rtbno, xfs_rtblock_t len),
2628 : TP_ARGS(mp, rtbno, len),
2629 : TP_STRUCT__entry(
2630 : __field(dev_t, dev)
2631 : __field(xfs_rtblock_t, rtbno)
2632 : __field(xfs_rtblock_t, len)
2633 : ),
2634 : TP_fast_assign(
2635 : __entry->dev = mp->m_rtdev_targp->bt_dev;
2636 : __entry->rtbno = rtbno;
2637 : __entry->len = len;
2638 : ),
2639 : TP_printk("dev %d:%d rtbno 0x%llx rtbcount 0x%llx",
2640 : MAJOR(__entry->dev), MINOR(__entry->dev),
2641 : __entry->rtbno,
2642 : __entry->len)
2643 : )
2644 :
2645 : #define DEFINE_RTDISCARD_EVENT(name) \
2646 : DEFINE_EVENT(xfs_rtdiscard_class, name, \
2647 : TP_PROTO(struct xfs_mount *mp, \
2648 : xfs_rtblock_t rtbno, xfs_rtblock_t len), \
2649 : TP_ARGS(mp, rtbno, len))
2650 21414 : DEFINE_RTDISCARD_EVENT(xfs_discard_rtextent);
2651 373353 : DEFINE_RTDISCARD_EVENT(xfs_discard_rttoosmall);
2652 73 : DEFINE_RTDISCARD_EVENT(xfs_discard_rtrelax);
2653 :
2654 : /* btree cursor events */
2655 : TRACE_DEFINE_ENUM(XFS_BTNUM_BNOi);
2656 : TRACE_DEFINE_ENUM(XFS_BTNUM_CNTi);
2657 : TRACE_DEFINE_ENUM(XFS_BTNUM_BMAPi);
2658 : TRACE_DEFINE_ENUM(XFS_BTNUM_INOi);
2659 : TRACE_DEFINE_ENUM(XFS_BTNUM_FINOi);
2660 : TRACE_DEFINE_ENUM(XFS_BTNUM_RMAPi);
2661 : TRACE_DEFINE_ENUM(XFS_BTNUM_REFCi);
2662 : TRACE_DEFINE_ENUM(XFS_BTNUM_RCBAGi);
2663 : TRACE_DEFINE_ENUM(XFS_BTNUM_RTRMAPi);
2664 : TRACE_DEFINE_ENUM(XFS_BTNUM_RTREFCi);
2665 :
2666 0 : DECLARE_EVENT_CLASS(xfs_btree_cur_class,
2667 : TP_PROTO(struct xfs_btree_cur *cur, int level, struct xfs_buf *bp),
2668 : TP_ARGS(cur, level, bp),
2669 : TP_STRUCT__entry(
2670 : __field(dev_t, dev)
2671 : __field(xfs_btnum_t, btnum)
2672 : __field(int, level)
2673 : __field(int, nlevels)
2674 : __field(int, ptr)
2675 : __field(xfs_daddr_t, daddr)
2676 : ),
2677 : TP_fast_assign(
2678 : __entry->dev = cur->bc_mp->m_super->s_dev;
2679 : __entry->btnum = cur->bc_btnum;
2680 : __entry->level = level;
2681 : __entry->nlevels = cur->bc_nlevels;
2682 : __entry->ptr = cur->bc_levels[level].ptr;
2683 : __entry->daddr = bp ? xfs_buf_daddr(bp) : -1;
2684 : ),
2685 : TP_printk("dev %d:%d btree %s level %d/%d ptr %d daddr 0x%llx",
2686 : MAJOR(__entry->dev), MINOR(__entry->dev),
2687 : __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
2688 : __entry->level,
2689 : __entry->nlevels,
2690 : __entry->ptr,
2691 : (unsigned long long)__entry->daddr)
2692 : )
2693 :
2694 : #define DEFINE_BTREE_CUR_EVENT(name) \
2695 : DEFINE_EVENT(xfs_btree_cur_class, name, \
2696 : TP_PROTO(struct xfs_btree_cur *cur, int level, struct xfs_buf *bp), \
2697 : TP_ARGS(cur, level, bp))
2698 1057370881 : DEFINE_BTREE_CUR_EVENT(xfs_btree_updkeys);
2699 4334294665 : DEFINE_BTREE_CUR_EVENT(xfs_btree_overlapped_query_range);
2700 :
2701 948992 : TRACE_EVENT(xfs_btree_alloc_block,
2702 : TP_PROTO(struct xfs_btree_cur *cur, union xfs_btree_ptr *ptr, int stat,
2703 : int error),
2704 : TP_ARGS(cur, ptr, stat, error),
2705 : TP_STRUCT__entry(
2706 : __field(dev_t, dev)
2707 : __field(xfs_agnumber_t, agno)
2708 : __field(xfs_ino_t, ino)
2709 : __field(xfs_btnum_t, btnum)
2710 : __field(int, error)
2711 : __field(xfs_agblock_t, agbno)
2712 : ),
2713 : TP_fast_assign(
2714 : __entry->dev = cur->bc_mp->m_super->s_dev;
2715 : if (cur->bc_flags & XFS_BTREE_IN_XFILE) {
2716 : __entry->agno = 0;
2717 : __entry->ino = 0;
2718 : } else if (cur->bc_flags & XFS_BTREE_ROOT_IN_INODE) {
2719 : __entry->agno = 0;
2720 : __entry->ino = cur->bc_ino.ip->i_ino;
2721 : } else {
2722 : __entry->agno = cur->bc_ag.pag->pag_agno;
2723 : __entry->ino = 0;
2724 : }
2725 : __entry->btnum = cur->bc_btnum;
2726 : __entry->error = error;
2727 : if (!error && stat) {
2728 : if (cur->bc_flags & XFS_BTREE_LONG_PTRS) {
2729 : xfs_fsblock_t fsb = be64_to_cpu(ptr->l);
2730 :
2731 : __entry->agno = XFS_FSB_TO_AGNO(cur->bc_mp,
2732 : fsb);
2733 : __entry->agbno = XFS_FSB_TO_AGBNO(cur->bc_mp,
2734 : fsb);
2735 : } else {
2736 : __entry->agbno = be32_to_cpu(ptr->s);
2737 : }
2738 : } else {
2739 : __entry->agbno = NULLAGBLOCK;
2740 : }
2741 : ),
2742 : TP_printk("dev %d:%d btree %s agno 0x%x ino 0x%llx agbno 0x%x error %d",
2743 : MAJOR(__entry->dev), MINOR(__entry->dev),
2744 : __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
2745 : __entry->agno,
2746 : __entry->ino,
2747 : __entry->agbno,
2748 : __entry->error)
2749 : );
2750 :
2751 449577 : TRACE_EVENT(xfs_btree_free_block,
2752 : TP_PROTO(struct xfs_btree_cur *cur, struct xfs_buf *bp),
2753 : TP_ARGS(cur, bp),
2754 : TP_STRUCT__entry(
2755 : __field(dev_t, dev)
2756 : __field(xfs_agnumber_t, agno)
2757 : __field(xfs_ino_t, ino)
2758 : __field(xfs_btnum_t, btnum)
2759 : __field(xfs_agblock_t, agbno)
2760 : ),
2761 : TP_fast_assign(
2762 : __entry->dev = cur->bc_mp->m_super->s_dev;
2763 : __entry->agno = xfs_daddr_to_agno(cur->bc_mp,
2764 : xfs_buf_daddr(bp));
2765 : if (cur->bc_flags & XFS_BTREE_ROOT_IN_INODE)
2766 : __entry->ino = cur->bc_ino.ip->i_ino;
2767 : else
2768 : __entry->ino = 0;
2769 : __entry->btnum = cur->bc_btnum;
2770 : __entry->agbno = xfs_daddr_to_agbno(cur->bc_mp,
2771 : xfs_buf_daddr(bp));
2772 : ),
2773 : TP_printk("dev %d:%d btree %s agno 0x%x ino 0x%llx agbno 0x%x",
2774 : MAJOR(__entry->dev), MINOR(__entry->dev),
2775 : __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
2776 : __entry->agno,
2777 : __entry->ino,
2778 : __entry->agbno)
2779 : );
2780 :
2781 : /* deferred ops */
2782 : struct xfs_defer_pending;
2783 :
2784 615576989 : TRACE_EVENT(xfs_defer_stats,
2785 : TP_PROTO(struct xfs_trans *tp),
2786 : TP_ARGS(tp),
2787 : TP_STRUCT__entry(
2788 : __field(dev_t, dev)
2789 : __field(unsigned int, max)
2790 : __field(unsigned int, finished)
2791 : ),
2792 : TP_fast_assign(
2793 : __entry->dev = tp->t_mountp->m_super->s_dev;
2794 : __entry->max = tp->t_dfops_nr_max;
2795 : __entry->finished = tp->t_dfops_finished;
2796 : ),
2797 : TP_printk("dev %d:%d max %u finished %u",
2798 : MAJOR(__entry->dev), MINOR(__entry->dev),
2799 : __entry->max,
2800 : __entry->finished)
2801 : )
2802 :
2803 0 : DECLARE_EVENT_CLASS(xfs_defer_class,
2804 : TP_PROTO(struct xfs_trans *tp, unsigned long caller_ip),
2805 : TP_ARGS(tp, caller_ip),
2806 : TP_STRUCT__entry(
2807 : __field(dev_t, dev)
2808 : __field(struct xfs_trans *, tp)
2809 : __field(char, committed)
2810 : __field(unsigned long, caller_ip)
2811 : ),
2812 : TP_fast_assign(
2813 : __entry->dev = tp->t_mountp->m_super->s_dev;
2814 : __entry->tp = tp;
2815 : __entry->caller_ip = caller_ip;
2816 : ),
2817 : TP_printk("dev %d:%d tp %p caller %pS",
2818 : MAJOR(__entry->dev), MINOR(__entry->dev),
2819 : __entry->tp,
2820 : (char *)__entry->caller_ip)
2821 : )
2822 : #define DEFINE_DEFER_EVENT(name) \
2823 : DEFINE_EVENT(xfs_defer_class, name, \
2824 : TP_PROTO(struct xfs_trans *tp, unsigned long caller_ip), \
2825 : TP_ARGS(tp, caller_ip))
2826 :
2827 0 : DECLARE_EVENT_CLASS(xfs_defer_error_class,
2828 : TP_PROTO(struct xfs_trans *tp, int error),
2829 : TP_ARGS(tp, error),
2830 : TP_STRUCT__entry(
2831 : __field(dev_t, dev)
2832 : __field(struct xfs_trans *, tp)
2833 : __field(char, committed)
2834 : __field(int, error)
2835 : ),
2836 : TP_fast_assign(
2837 : __entry->dev = tp->t_mountp->m_super->s_dev;
2838 : __entry->tp = tp;
2839 : __entry->error = error;
2840 : ),
2841 : TP_printk("dev %d:%d tp %p err %d",
2842 : MAJOR(__entry->dev), MINOR(__entry->dev),
2843 : __entry->tp,
2844 : __entry->error)
2845 : )
2846 : #define DEFINE_DEFER_ERROR_EVENT(name) \
2847 : DEFINE_EVENT(xfs_defer_error_class, name, \
2848 : TP_PROTO(struct xfs_trans *tp, int error), \
2849 : TP_ARGS(tp, error))
2850 :
2851 0 : DECLARE_EVENT_CLASS(xfs_defer_pending_class,
2852 : TP_PROTO(struct xfs_mount *mp, struct xfs_defer_pending *dfp),
2853 : TP_ARGS(mp, dfp),
2854 : TP_STRUCT__entry(
2855 : __field(dev_t, dev)
2856 : __field(int, type)
2857 : __field(void *, intent)
2858 : __field(char, committed)
2859 : __field(int, nr)
2860 : ),
2861 : TP_fast_assign(
2862 : __entry->dev = mp ? mp->m_super->s_dev : 0;
2863 : __entry->type = dfp->dfp_type;
2864 : __entry->intent = dfp->dfp_intent;
2865 : __entry->committed = dfp->dfp_done != NULL;
2866 : __entry->nr = dfp->dfp_count;
2867 : ),
2868 : TP_printk("dev %d:%d optype %d intent %p committed %d nr %d",
2869 : MAJOR(__entry->dev), MINOR(__entry->dev),
2870 : __entry->type,
2871 : __entry->intent,
2872 : __entry->committed,
2873 : __entry->nr)
2874 : )
2875 : #define DEFINE_DEFER_PENDING_EVENT(name) \
2876 : DEFINE_EVENT(xfs_defer_pending_class, name, \
2877 : TP_PROTO(struct xfs_mount *mp, struct xfs_defer_pending *dfp), \
2878 : TP_ARGS(mp, dfp))
2879 :
2880 3653 : DEFINE_DEFER_EVENT(xfs_defer_cancel);
2881 958184096 : DEFINE_DEFER_EVENT(xfs_defer_trans_roll);
2882 3309 : DEFINE_DEFER_EVENT(xfs_defer_trans_abort);
2883 786751670 : DEFINE_DEFER_EVENT(xfs_defer_finish);
2884 786732846 : DEFINE_DEFER_EVENT(xfs_defer_finish_done);
2885 :
2886 273 : DEFINE_DEFER_ERROR_EVENT(xfs_defer_trans_roll_error);
2887 3309 : DEFINE_DEFER_ERROR_EVENT(xfs_defer_finish_error);
2888 :
2889 1048720988 : DEFINE_DEFER_PENDING_EVENT(xfs_defer_create_intent);
2890 6131 : DEFINE_DEFER_PENDING_EVENT(xfs_defer_cancel_list);
2891 1173313799 : DEFINE_DEFER_PENDING_EVENT(xfs_defer_pending_finish);
2892 5777 : DEFINE_DEFER_PENDING_EVENT(xfs_defer_pending_abort);
2893 5853 : DEFINE_DEFER_PENDING_EVENT(xfs_defer_relog_intent);
2894 :
2895 0 : DECLARE_EVENT_CLASS(xfs_free_extent_deferred_class,
2896 : TP_PROTO(struct xfs_mount *mp, struct xfs_extent_free_item *free),
2897 : TP_ARGS(mp, free),
2898 : TP_STRUCT__entry(
2899 : __field(dev_t, dev)
2900 : __field(xfs_agnumber_t, agno)
2901 : __field(xfs_agblock_t, agbno)
2902 : __field(xfs_extlen_t, len)
2903 : __field(unsigned int, flags)
2904 : ),
2905 : TP_fast_assign(
2906 : __entry->dev = mp->m_super->s_dev;
2907 : __entry->agno = XFS_FSB_TO_AGNO(mp, free->xefi_startblock);
2908 : __entry->agbno = XFS_FSB_TO_AGBNO(mp, free->xefi_startblock);
2909 : __entry->len = free->xefi_blockcount;
2910 : __entry->flags = free->xefi_flags;
2911 : ),
2912 : TP_printk("dev %d:%d agno 0x%x agbno 0x%x fsbcount 0x%x flags 0x%x",
2913 : MAJOR(__entry->dev), MINOR(__entry->dev),
2914 : __entry->agno,
2915 : __entry->agbno,
2916 : __entry->len,
2917 : __entry->flags)
2918 : );
2919 : #define DEFINE_FREE_EXTENT_DEFERRED_EVENT(name) \
2920 : DEFINE_EVENT(xfs_free_extent_deferred_class, name, \
2921 : TP_PROTO(struct xfs_mount *mp, struct xfs_extent_free_item *free), \
2922 : TP_ARGS(mp, free))
2923 194204 : DEFINE_FREE_EXTENT_DEFERRED_EVENT(xfs_agfl_free_defer);
2924 194204 : DEFINE_FREE_EXTENT_DEFERRED_EVENT(xfs_agfl_free_deferred);
2925 68644286 : DEFINE_FREE_EXTENT_DEFERRED_EVENT(xfs_extent_free_defer);
2926 68646268 : DEFINE_FREE_EXTENT_DEFERRED_EVENT(xfs_extent_free_deferred);
2927 :
2928 0 : DECLARE_EVENT_CLASS(xfs_defer_pending_item_class,
2929 : TP_PROTO(struct xfs_mount *mp, struct xfs_defer_pending *dfp,
2930 : void *item),
2931 : TP_ARGS(mp, dfp, item),
2932 : TP_STRUCT__entry(
2933 : __field(dev_t, dev)
2934 : __field(int, type)
2935 : __field(void *, intent)
2936 : __field(void *, item)
2937 : __field(char, committed)
2938 : __field(int, nr)
2939 : ),
2940 : TP_fast_assign(
2941 : __entry->dev = mp ? mp->m_super->s_dev : 0;
2942 : __entry->type = dfp->dfp_type;
2943 : __entry->intent = dfp->dfp_intent;
2944 : __entry->item = item;
2945 : __entry->committed = dfp->dfp_done != NULL;
2946 : __entry->nr = dfp->dfp_count;
2947 : ),
2948 : TP_printk("dev %d:%d optype %d intent %p item %p committed %d nr %d",
2949 : MAJOR(__entry->dev), MINOR(__entry->dev),
2950 : __entry->type,
2951 : __entry->intent,
2952 : __entry->item,
2953 : __entry->committed,
2954 : __entry->nr)
2955 : )
2956 : #define DEFINE_DEFER_PENDING_ITEM_EVENT(name) \
2957 : DEFINE_EVENT(xfs_defer_pending_item_class, name, \
2958 : TP_PROTO(struct xfs_mount *mp, struct xfs_defer_pending *dfp, \
2959 : void *item), \
2960 : TP_ARGS(mp, dfp, item))
2961 :
2962 1073130351 : DEFINE_DEFER_PENDING_ITEM_EVENT(xfs_defer_add_item);
2963 3101 : DEFINE_DEFER_PENDING_ITEM_EVENT(xfs_defer_cancel_item);
2964 1197591246 : DEFINE_DEFER_PENDING_ITEM_EVENT(xfs_defer_finish_item);
2965 :
2966 : /* rmap tracepoints */
2967 0 : DECLARE_EVENT_CLASS(xfs_rmap_class,
2968 : TP_PROTO(struct xfs_btree_cur *cur,
2969 : xfs_agblock_t rmapbno, xfs_extlen_t len, bool unwritten,
2970 : const struct xfs_owner_info *oinfo),
2971 : TP_ARGS(cur, rmapbno, len, unwritten, oinfo),
2972 : TP_STRUCT__entry(
2973 : __field(dev_t, dev)
2974 : __field(dev_t, opdev)
2975 : __field(xfs_agnumber_t, agno)
2976 : __field(xfs_agblock_t, rmapbno)
2977 : __field(xfs_extlen_t, len)
2978 : __field(uint64_t, owner)
2979 : __field(uint64_t, offset)
2980 : __field(unsigned long, flags)
2981 : ),
2982 : TP_fast_assign(
2983 : __entry->dev = cur->bc_mp->m_super->s_dev;
2984 : xfs_rmapbt_crack_agno_opdev(cur, &__entry->agno, &__entry->opdev);
2985 : __entry->rmapbno = rmapbno;
2986 : __entry->len = len;
2987 : __entry->owner = oinfo->oi_owner;
2988 : __entry->offset = oinfo->oi_offset;
2989 : __entry->flags = oinfo->oi_flags;
2990 : if (unwritten)
2991 : __entry->flags |= XFS_RMAP_UNWRITTEN;
2992 : ),
2993 : TP_printk("dev %d:%d opdev %d:%d agno 0x%x rmapbno 0x%x fsbcount 0x%x owner 0x%llx fileoff 0x%llx flags 0x%lx",
2994 : MAJOR(__entry->dev), MINOR(__entry->dev),
2995 : MAJOR(__entry->opdev), MINOR(__entry->opdev),
2996 : __entry->agno,
2997 : __entry->rmapbno,
2998 : __entry->len,
2999 : __entry->owner,
3000 : __entry->offset,
3001 : __entry->flags)
3002 : );
3003 : #define DEFINE_RMAP_EVENT(name) \
3004 : DEFINE_EVENT(xfs_rmap_class, name, \
3005 : TP_PROTO(struct xfs_btree_cur *cur, \
3006 : xfs_agblock_t rmapbno, xfs_extlen_t len, bool unwritten, \
3007 : const struct xfs_owner_info *oinfo), \
3008 : TP_ARGS(cur, rmapbno, len, unwritten, oinfo))
3009 :
3010 : /* btree cursor error/%ip tracepoint class */
3011 0 : DECLARE_EVENT_CLASS(xfs_btree_error_class,
3012 : TP_PROTO(struct xfs_btree_cur *cur, int error,
3013 : unsigned long caller_ip),
3014 : TP_ARGS(cur, error, caller_ip),
3015 : TP_STRUCT__entry(
3016 : __field(dev_t, dev)
3017 : __field(xfs_agnumber_t, agno)
3018 : __field(xfs_ino_t, ino)
3019 : __field(int, error)
3020 : __field(unsigned long, caller_ip)
3021 : ),
3022 : TP_fast_assign(
3023 : __entry->dev = cur->bc_mp->m_super->s_dev;
3024 : if (cur->bc_flags & XFS_BTREE_IN_XFILE) {
3025 : __entry->agno = 0;
3026 : __entry->ino = 0;
3027 : } else if (cur->bc_flags & XFS_BTREE_ROOT_IN_INODE) {
3028 : __entry->agno = 0;
3029 : __entry->ino = cur->bc_ino.ip->i_ino;
3030 : } else {
3031 : __entry->agno = cur->bc_ag.pag->pag_agno;
3032 : __entry->ino = 0;
3033 : }
3034 : __entry->error = error;
3035 : __entry->caller_ip = caller_ip;
3036 : ),
3037 : TP_printk("dev %d:%d agno 0x%x ino 0x%llx error %d caller %pS",
3038 : MAJOR(__entry->dev), MINOR(__entry->dev),
3039 : __entry->agno,
3040 : __entry->ino,
3041 : __entry->error,
3042 : (char *)__entry->caller_ip)
3043 : );
3044 :
3045 : #define DEFINE_BTREE_ERROR_EVENT(name) \
3046 : DEFINE_EVENT(xfs_btree_error_class, name, \
3047 : TP_PROTO(struct xfs_btree_cur *cur, int error, \
3048 : unsigned long caller_ip), \
3049 : TP_ARGS(cur, error, caller_ip))
3050 :
3051 144053347 : DEFINE_RMAP_EVENT(xfs_rmap_unmap);
3052 144052306 : DEFINE_RMAP_EVENT(xfs_rmap_unmap_done);
3053 367 : DEFINE_BTREE_ERROR_EVENT(xfs_rmap_unmap_error);
3054 201885744 : DEFINE_RMAP_EVENT(xfs_rmap_map);
3055 201883060 : DEFINE_RMAP_EVENT(xfs_rmap_map_done);
3056 986 : DEFINE_BTREE_ERROR_EVENT(xfs_rmap_map_error);
3057 36577808 : DEFINE_RMAP_EVENT(xfs_rmap_convert);
3058 36577786 : DEFINE_RMAP_EVENT(xfs_rmap_convert_done);
3059 4 : DEFINE_BTREE_ERROR_EVENT(xfs_rmap_convert_error);
3060 :
3061 36577801 : TRACE_EVENT(xfs_rmap_convert_state,
3062 : TP_PROTO(struct xfs_btree_cur *cur, int state,
3063 : unsigned long caller_ip),
3064 : TP_ARGS(cur, state, caller_ip),
3065 : TP_STRUCT__entry(
3066 : __field(dev_t, dev)
3067 : __field(dev_t, opdev)
3068 : __field(xfs_agnumber_t, agno)
3069 : __field(int, state)
3070 : __field(unsigned long, caller_ip)
3071 : ),
3072 : TP_fast_assign(
3073 : __entry->dev = cur->bc_mp->m_super->s_dev;
3074 : xfs_rmapbt_crack_agno_opdev(cur, &__entry->agno, &__entry->opdev);
3075 : __entry->state = state;
3076 : __entry->caller_ip = caller_ip;
3077 : ),
3078 : TP_printk("dev %d:%d opdev %d:%d agno 0x%x state %d caller %pS",
3079 : MAJOR(__entry->dev), MINOR(__entry->dev),
3080 : MAJOR(__entry->opdev), MINOR(__entry->opdev),
3081 : __entry->agno,
3082 : __entry->state,
3083 : (char *)__entry->caller_ip)
3084 : );
3085 :
3086 0 : DECLARE_EVENT_CLASS(xfs_rmapbt_class,
3087 : TP_PROTO(struct xfs_btree_cur *cur,
3088 : xfs_agblock_t rmapbno, xfs_extlen_t len,
3089 : uint64_t owner, uint64_t offset, unsigned int flags),
3090 : TP_ARGS(cur, rmapbno, len, owner, offset, flags),
3091 : TP_STRUCT__entry(
3092 : __field(dev_t, dev)
3093 : __field(dev_t, opdev)
3094 : __field(xfs_agnumber_t, agno)
3095 : __field(xfs_agblock_t, rmapbno)
3096 : __field(xfs_extlen_t, len)
3097 : __field(uint64_t, owner)
3098 : __field(uint64_t, offset)
3099 : __field(unsigned int, flags)
3100 : ),
3101 : TP_fast_assign(
3102 : __entry->dev = cur->bc_mp->m_super->s_dev;
3103 : xfs_rmapbt_crack_agno_opdev(cur, &__entry->agno, &__entry->opdev);
3104 : __entry->rmapbno = rmapbno;
3105 : __entry->len = len;
3106 : __entry->owner = owner;
3107 : __entry->offset = offset;
3108 : __entry->flags = flags;
3109 : ),
3110 : TP_printk("dev %d:%d opdev %d:%d agno 0x%x rmapbno 0x%x fsbcount 0x%x owner 0x%llx fileoff 0x%llx flags 0x%x",
3111 : MAJOR(__entry->dev), MINOR(__entry->dev),
3112 : MAJOR(__entry->opdev), MINOR(__entry->opdev),
3113 : __entry->agno,
3114 : __entry->rmapbno,
3115 : __entry->len,
3116 : __entry->owner,
3117 : __entry->offset,
3118 : __entry->flags)
3119 : );
3120 : #define DEFINE_RMAPBT_EVENT(name) \
3121 : DEFINE_EVENT(xfs_rmapbt_class, name, \
3122 : TP_PROTO(struct xfs_btree_cur *cur, \
3123 : xfs_agblock_t rmapbno, xfs_extlen_t len, \
3124 : uint64_t owner, uint64_t offset, unsigned int flags), \
3125 : TP_ARGS(cur, rmapbno, len, owner, offset, flags))
3126 :
3127 : TRACE_DEFINE_ENUM(XFS_RMAP_MAP);
3128 : TRACE_DEFINE_ENUM(XFS_RMAP_MAP_SHARED);
3129 : TRACE_DEFINE_ENUM(XFS_RMAP_UNMAP);
3130 : TRACE_DEFINE_ENUM(XFS_RMAP_UNMAP_SHARED);
3131 : TRACE_DEFINE_ENUM(XFS_RMAP_CONVERT);
3132 : TRACE_DEFINE_ENUM(XFS_RMAP_CONVERT_SHARED);
3133 : TRACE_DEFINE_ENUM(XFS_RMAP_ALLOC);
3134 : TRACE_DEFINE_ENUM(XFS_RMAP_FREE);
3135 :
3136 0 : DECLARE_EVENT_CLASS(xfs_rmap_deferred_class,
3137 : TP_PROTO(struct xfs_mount *mp, struct xfs_rmap_intent *ri),
3138 : TP_ARGS(mp, ri),
3139 : TP_STRUCT__entry(
3140 : __field(dev_t, dev)
3141 : __field(dev_t, opdev)
3142 : __field(unsigned long long, owner)
3143 : __field(xfs_agnumber_t, agno)
3144 : __field(xfs_agblock_t, rmapbno)
3145 : __field(int, whichfork)
3146 : __field(xfs_fileoff_t, l_loff)
3147 : __field(xfs_filblks_t, l_len)
3148 : __field(xfs_exntst_t, l_state)
3149 : __field(int, op)
3150 : ),
3151 : TP_fast_assign(
3152 : __entry->dev = mp->m_super->s_dev;
3153 : if (ri->ri_realtime) {
3154 : __entry->opdev = mp->m_rtdev_targp->bt_dev;
3155 : __entry->rmapbno = xfs_rtb_to_rgbno(mp,
3156 : ri->ri_bmap.br_startblock,
3157 : &__entry->agno);
3158 : } else {
3159 : __entry->agno = XFS_FSB_TO_AGNO(mp,
3160 : ri->ri_bmap.br_startblock);
3161 : __entry->opdev = __entry->dev;
3162 : __entry->rmapbno = XFS_FSB_TO_AGBNO(mp,
3163 : ri->ri_bmap.br_startblock);
3164 : }
3165 : __entry->owner = ri->ri_owner;
3166 : __entry->whichfork = ri->ri_whichfork;
3167 : __entry->l_loff = ri->ri_bmap.br_startoff;
3168 : __entry->l_len = ri->ri_bmap.br_blockcount;
3169 : __entry->l_state = ri->ri_bmap.br_state;
3170 : __entry->op = ri->ri_type;
3171 : ),
3172 : TP_printk("dev %d:%d op %s opdev %d:%d agno 0x%x rmapbno 0x%x owner 0x%llx %s fileoff 0x%llx fsbcount 0x%llx state %d",
3173 : MAJOR(__entry->dev), MINOR(__entry->dev),
3174 : __print_symbolic(__entry->op, XFS_RMAP_INTENT_STRINGS),
3175 : MAJOR(__entry->opdev), MINOR(__entry->opdev),
3176 : __entry->agno,
3177 : __entry->rmapbno,
3178 : __entry->owner,
3179 : __print_symbolic(__entry->whichfork, XFS_WHICHFORK_STRINGS),
3180 : __entry->l_loff,
3181 : __entry->l_len,
3182 : __entry->l_state)
3183 : );
3184 : #define DEFINE_RMAP_DEFERRED_EVENT(name) \
3185 : DEFINE_EVENT(xfs_rmap_deferred_class, name, \
3186 : TP_PROTO(struct xfs_mount *mp, struct xfs_rmap_intent *ri), \
3187 : TP_ARGS(mp, ri))
3188 351119667 : DEFINE_RMAP_DEFERRED_EVENT(xfs_rmap_defer);
3189 351139522 : DEFINE_RMAP_DEFERRED_EVENT(xfs_rmap_deferred);
3190 :
3191 57471822 : DEFINE_RMAPBT_EVENT(xfs_rmap_update);
3192 216980324 : DEFINE_RMAPBT_EVENT(xfs_rmap_insert);
3193 131822161 : DEFINE_RMAPBT_EVENT(xfs_rmap_delete);
3194 173 : DEFINE_BTREE_ERROR_EVENT(xfs_rmap_insert_error);
3195 1 : DEFINE_BTREE_ERROR_EVENT(xfs_rmap_delete_error);
3196 0 : DEFINE_BTREE_ERROR_EVENT(xfs_rmap_update_error);
3197 :
3198 314323351 : DEFINE_RMAPBT_EVENT(xfs_rmap_find_left_neighbor_candidate);
3199 147604503 : DEFINE_RMAPBT_EVENT(xfs_rmap_find_left_neighbor_query);
3200 200954244 : DEFINE_RMAPBT_EVENT(xfs_rmap_lookup_le_range_candidate);
3201 171914386 : DEFINE_RMAPBT_EVENT(xfs_rmap_lookup_le_range);
3202 321195590 : DEFINE_RMAPBT_EVENT(xfs_rmap_lookup_le_range_result);
3203 80876416 : DEFINE_RMAPBT_EVENT(xfs_rmap_find_right_neighbor_result);
3204 20606022 : DEFINE_RMAPBT_EVENT(xfs_rmap_find_left_neighbor_result);
3205 :
3206 : /* deferred bmbt updates */
3207 : TRACE_DEFINE_ENUM(XFS_BMAP_MAP);
3208 : TRACE_DEFINE_ENUM(XFS_BMAP_UNMAP);
3209 :
3210 0 : DECLARE_EVENT_CLASS(xfs_bmap_deferred_class,
3211 : TP_PROTO(struct xfs_bmap_intent *bi),
3212 : TP_ARGS(bi),
3213 : TP_STRUCT__entry(
3214 : __field(dev_t, dev)
3215 : __field(dev_t, opdev)
3216 : __field(xfs_agnumber_t, agno)
3217 : __field(xfs_ino_t, ino)
3218 : __field(xfs_agblock_t, agbno)
3219 : __field(xfs_fsblock_t, rtbno)
3220 : __field(int, whichfork)
3221 : __field(xfs_fileoff_t, l_loff)
3222 : __field(xfs_filblks_t, l_len)
3223 : __field(xfs_exntst_t, l_state)
3224 : __field(int, op)
3225 : ),
3226 : TP_fast_assign(
3227 : struct xfs_inode *ip = bi->bi_owner;
3228 :
3229 : __entry->dev = ip->i_mount->m_super->s_dev;
3230 : if (xfs_ifork_is_realtime(ip, bi->bi_whichfork)) {
3231 : __entry->agno = 0;
3232 : __entry->agbno = 0;
3233 : __entry->rtbno = bi->bi_bmap.br_startblock;
3234 : __entry->opdev = ip->i_mount->m_rtdev_targp->bt_dev;
3235 : } else {
3236 : __entry->agno = XFS_FSB_TO_AGNO(ip->i_mount,
3237 : bi->bi_bmap.br_startblock);
3238 : __entry->agbno = XFS_FSB_TO_AGBNO(ip->i_mount,
3239 : bi->bi_bmap.br_startblock);
3240 : __entry->rtbno = 0;
3241 : __entry->opdev = __entry->dev;
3242 : }
3243 : __entry->ino = ip->i_ino;
3244 : __entry->whichfork = bi->bi_whichfork;
3245 : __entry->l_loff = bi->bi_bmap.br_startoff;
3246 : __entry->l_len = bi->bi_bmap.br_blockcount;
3247 : __entry->l_state = bi->bi_bmap.br_state;
3248 : __entry->op = bi->bi_type;
3249 : ),
3250 : TP_printk("dev %d:%d op %s opdev %d:%d ino 0x%llx agno 0x%x agbno 0x%x rtbno 0x%llx %s fileoff 0x%llx fsbcount 0x%llx state %d",
3251 : MAJOR(__entry->dev), MINOR(__entry->dev),
3252 : __print_symbolic(__entry->op, XFS_BMAP_INTENT_STRINGS),
3253 : MAJOR(__entry->opdev), MINOR(__entry->opdev),
3254 : __entry->ino,
3255 : __entry->agno,
3256 : __entry->agbno,
3257 : __entry->rtbno,
3258 : __print_symbolic(__entry->whichfork, XFS_WHICHFORK_STRINGS),
3259 : __entry->l_loff,
3260 : __entry->l_len,
3261 : __entry->l_state)
3262 : );
3263 : #define DEFINE_BMAP_DEFERRED_EVENT(name) \
3264 : DEFINE_EVENT(xfs_bmap_deferred_class, name, \
3265 : TP_PROTO(struct xfs_bmap_intent *bi), \
3266 : TP_ARGS(bi))
3267 86539748 : DEFINE_BMAP_DEFERRED_EVENT(xfs_bmap_defer);
3268 86541057 : DEFINE_BMAP_DEFERRED_EVENT(xfs_bmap_deferred);
3269 :
3270 : /* per-AG reservation */
3271 0 : DECLARE_EVENT_CLASS(xfs_ag_resv_class,
3272 : TP_PROTO(struct xfs_perag *pag, enum xfs_ag_resv_type resv,
3273 : xfs_extlen_t len),
3274 : TP_ARGS(pag, resv, len),
3275 : TP_STRUCT__entry(
3276 : __field(dev_t, dev)
3277 : __field(xfs_agnumber_t, agno)
3278 : __field(int, resv)
3279 : __field(xfs_extlen_t, freeblks)
3280 : __field(xfs_extlen_t, flcount)
3281 : __field(xfs_extlen_t, reserved)
3282 : __field(xfs_extlen_t, asked)
3283 : __field(xfs_extlen_t, len)
3284 : ),
3285 : TP_fast_assign(
3286 : struct xfs_ag_resv *r = xfs_perag_resv(pag, resv);
3287 :
3288 : __entry->dev = pag->pag_mount->m_super->s_dev;
3289 : __entry->agno = pag->pag_agno;
3290 : __entry->resv = resv;
3291 : __entry->freeblks = pag->pagf_freeblks;
3292 : __entry->flcount = pag->pagf_flcount;
3293 : __entry->reserved = r ? r->ar_reserved : 0;
3294 : __entry->asked = r ? r->ar_asked : 0;
3295 : __entry->len = len;
3296 : ),
3297 : TP_printk("dev %d:%d agno 0x%x resv %d freeblks %u flcount %u "
3298 : "resv %u ask %u len %u",
3299 : MAJOR(__entry->dev), MINOR(__entry->dev),
3300 : __entry->agno,
3301 : __entry->resv,
3302 : __entry->freeblks,
3303 : __entry->flcount,
3304 : __entry->reserved,
3305 : __entry->asked,
3306 : __entry->len)
3307 : )
3308 : #define DEFINE_AG_RESV_EVENT(name) \
3309 : DEFINE_EVENT(xfs_ag_resv_class, name, \
3310 : TP_PROTO(struct xfs_perag *pag, enum xfs_ag_resv_type type, \
3311 : xfs_extlen_t len), \
3312 : TP_ARGS(pag, type, len))
3313 :
3314 : /* per-AG reservation tracepoints */
3315 738784 : DEFINE_AG_RESV_EVENT(xfs_ag_resv_init);
3316 756746 : DEFINE_AG_RESV_EVENT(xfs_ag_resv_free);
3317 64148965 : DEFINE_AG_RESV_EVENT(xfs_ag_resv_alloc_extent);
3318 53178422 : DEFINE_AG_RESV_EVENT(xfs_ag_resv_free_extent);
3319 108557331 : DEFINE_AG_RESV_EVENT(xfs_ag_resv_critical);
3320 226184074 : DEFINE_AG_RESV_EVENT(xfs_ag_resv_needed);
3321 :
3322 : /* simple AG-based error/%ip tracepoint class */
3323 0 : DECLARE_EVENT_CLASS(xfs_ag_error_class,
3324 : TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int error,
3325 : unsigned long caller_ip),
3326 : TP_ARGS(mp, agno, error, caller_ip),
3327 : TP_STRUCT__entry(
3328 : __field(dev_t, dev)
3329 : __field(xfs_agnumber_t, agno)
3330 : __field(int, error)
3331 : __field(unsigned long, caller_ip)
3332 : ),
3333 : TP_fast_assign(
3334 : __entry->dev = mp->m_super->s_dev;
3335 : __entry->agno = agno;
3336 : __entry->error = error;
3337 : __entry->caller_ip = caller_ip;
3338 : ),
3339 : TP_printk("dev %d:%d agno 0x%x error %d caller %pS",
3340 : MAJOR(__entry->dev), MINOR(__entry->dev),
3341 : __entry->agno,
3342 : __entry->error,
3343 : (char *)__entry->caller_ip)
3344 : );
3345 :
3346 : #define DEFINE_AG_ERROR_EVENT(name) \
3347 : DEFINE_EVENT(xfs_ag_error_class, name, \
3348 : TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int error, \
3349 : unsigned long caller_ip), \
3350 : TP_ARGS(mp, agno, error, caller_ip))
3351 0 : DEFINE_AG_ERROR_EVENT(xfs_ag_resv_init_error);
3352 :
3353 : /* refcount tracepoint classes */
3354 :
3355 0 : DECLARE_EVENT_CLASS(xfs_refcount_class,
3356 : TP_PROTO(struct xfs_btree_cur *cur, xfs_agblock_t refcbno,
3357 : xfs_extlen_t len),
3358 : TP_ARGS(cur, refcbno, len),
3359 : TP_STRUCT__entry(
3360 : __field(dev_t, dev)
3361 : __field(dev_t, opdev)
3362 : __field(xfs_agnumber_t, agno)
3363 : __field(xfs_agblock_t, refcbno)
3364 : __field(xfs_extlen_t, len)
3365 : ),
3366 : TP_fast_assign(
3367 : __entry->dev = cur->bc_mp->m_super->s_dev;
3368 : xfs_refcountbt_crack_agno_opdev(cur, &__entry->agno, &__entry->opdev);
3369 : __entry->refcbno = refcbno;
3370 : __entry->len = len;
3371 : ),
3372 : TP_printk("dev %d:%d opdev %d:%d agno 0x%x refcbno 0x%x fsbcount 0x%x",
3373 : MAJOR(__entry->dev), MINOR(__entry->dev),
3374 : MAJOR(__entry->opdev), MINOR(__entry->opdev),
3375 : __entry->agno,
3376 : __entry->refcbno,
3377 : __entry->len)
3378 : );
3379 : #define DEFINE_REFCOUNT_EVENT(name) \
3380 : DEFINE_EVENT(xfs_refcount_class, name, \
3381 : TP_PROTO(struct xfs_btree_cur *cur, xfs_agblock_t refcbno, \
3382 : xfs_extlen_t len), \
3383 : TP_ARGS(cur, refcbno, len))
3384 :
3385 : TRACE_DEFINE_ENUM(XFS_LOOKUP_EQi);
3386 : TRACE_DEFINE_ENUM(XFS_LOOKUP_LEi);
3387 : TRACE_DEFINE_ENUM(XFS_LOOKUP_GEi);
3388 3248121232 : TRACE_EVENT(xfs_refcount_lookup,
3389 : TP_PROTO(struct xfs_btree_cur *cur, xfs_agblock_t refcbno,
3390 : xfs_lookup_t dir),
3391 : TP_ARGS(cur, refcbno, dir),
3392 : TP_STRUCT__entry(
3393 : __field(dev_t, dev)
3394 : __field(dev_t, opdev)
3395 : __field(xfs_agnumber_t, agno)
3396 : __field(xfs_agblock_t, refcbno)
3397 : __field(xfs_lookup_t, dir)
3398 : ),
3399 : TP_fast_assign(
3400 : __entry->dev = cur->bc_mp->m_super->s_dev;
3401 : xfs_refcountbt_crack_agno_opdev(cur, &__entry->agno, &__entry->opdev);
3402 : __entry->refcbno = refcbno;
3403 : __entry->dir = dir;
3404 : ),
3405 : TP_printk("dev %d:%d opdev %d:%d agno 0x%x refcbno 0x%x cmp %s(%d)",
3406 : MAJOR(__entry->dev), MINOR(__entry->dev),
3407 : MAJOR(__entry->opdev), MINOR(__entry->opdev),
3408 : __entry->agno,
3409 : __entry->refcbno,
3410 : __print_symbolic(__entry->dir, XFS_AG_BTREE_CMP_FORMAT_STR),
3411 : __entry->dir)
3412 : )
3413 :
3414 : /* single-rcext tracepoint class */
3415 0 : DECLARE_EVENT_CLASS(xfs_refcount_extent_class,
3416 : TP_PROTO(struct xfs_btree_cur *cur, struct xfs_refcount_irec *irec),
3417 : TP_ARGS(cur, irec),
3418 : TP_STRUCT__entry(
3419 : __field(dev_t, dev)
3420 : __field(dev_t, opdev)
3421 : __field(xfs_agnumber_t, agno)
3422 : __field(enum xfs_refc_domain, domain)
3423 : __field(xfs_agblock_t, startblock)
3424 : __field(xfs_extlen_t, blockcount)
3425 : __field(xfs_nlink_t, refcount)
3426 : ),
3427 : TP_fast_assign(
3428 : __entry->dev = cur->bc_mp->m_super->s_dev;
3429 : xfs_refcountbt_crack_agno_opdev(cur, &__entry->agno, &__entry->opdev);
3430 : __entry->domain = irec->rc_domain;
3431 : __entry->startblock = irec->rc_startblock;
3432 : __entry->blockcount = irec->rc_blockcount;
3433 : __entry->refcount = irec->rc_refcount;
3434 : ),
3435 : TP_printk("dev %d:%d opdev %d:%d agno 0x%x dom %s refcbno 0x%x fsbcount 0x%x refcount %u",
3436 : MAJOR(__entry->dev), MINOR(__entry->dev),
3437 : MAJOR(__entry->opdev), MINOR(__entry->opdev),
3438 : __entry->agno,
3439 : __print_symbolic(__entry->domain, XFS_REFC_DOMAIN_STRINGS),
3440 : __entry->startblock,
3441 : __entry->blockcount,
3442 : __entry->refcount)
3443 : )
3444 :
3445 : #define DEFINE_REFCOUNT_EXTENT_EVENT(name) \
3446 : DEFINE_EVENT(xfs_refcount_extent_class, name, \
3447 : TP_PROTO(struct xfs_btree_cur *cur, struct xfs_refcount_irec *irec), \
3448 : TP_ARGS(cur, irec))
3449 :
3450 : /* single-rcext and an agbno tracepoint class */
3451 0 : DECLARE_EVENT_CLASS(xfs_refcount_extent_at_class,
3452 : TP_PROTO(struct xfs_btree_cur *cur, struct xfs_refcount_irec *irec,
3453 : xfs_agblock_t refcbno),
3454 : TP_ARGS(cur, irec, refcbno),
3455 : TP_STRUCT__entry(
3456 : __field(dev_t, dev)
3457 : __field(dev_t, opdev)
3458 : __field(xfs_agnumber_t, agno)
3459 : __field(enum xfs_refc_domain, domain)
3460 : __field(xfs_agblock_t, startblock)
3461 : __field(xfs_extlen_t, blockcount)
3462 : __field(xfs_nlink_t, refcount)
3463 : __field(xfs_agblock_t, refcbno)
3464 : ),
3465 : TP_fast_assign(
3466 : __entry->dev = cur->bc_mp->m_super->s_dev;
3467 : xfs_refcountbt_crack_agno_opdev(cur, &__entry->agno, &__entry->opdev);
3468 : __entry->domain = irec->rc_domain;
3469 : __entry->startblock = irec->rc_startblock;
3470 : __entry->blockcount = irec->rc_blockcount;
3471 : __entry->refcount = irec->rc_refcount;
3472 : __entry->refcbno = refcbno;
3473 : ),
3474 : TP_printk("dev %d:%d opdev %d:%d agno 0x%x dom %s refcbno 0x%x fsbcount 0x%x refcount %u @ refcbno 0x%x",
3475 : MAJOR(__entry->dev), MINOR(__entry->dev),
3476 : MAJOR(__entry->opdev), MINOR(__entry->opdev),
3477 : __entry->agno,
3478 : __print_symbolic(__entry->domain, XFS_REFC_DOMAIN_STRINGS),
3479 : __entry->startblock,
3480 : __entry->blockcount,
3481 : __entry->refcount,
3482 : __entry->refcbno)
3483 : )
3484 :
3485 : #define DEFINE_REFCOUNT_EXTENT_AT_EVENT(name) \
3486 : DEFINE_EVENT(xfs_refcount_extent_at_class, name, \
3487 : TP_PROTO(struct xfs_btree_cur *cur, struct xfs_refcount_irec *irec, \
3488 : xfs_agblock_t refcbno), \
3489 : TP_ARGS(cur, irec, refcbno))
3490 :
3491 : /* double-rcext tracepoint class */
3492 0 : DECLARE_EVENT_CLASS(xfs_refcount_double_extent_class,
3493 : TP_PROTO(struct xfs_btree_cur *cur, struct xfs_refcount_irec *i1,
3494 : struct xfs_refcount_irec *i2),
3495 : TP_ARGS(cur, i1, i2),
3496 : TP_STRUCT__entry(
3497 : __field(dev_t, dev)
3498 : __field(dev_t, opdev)
3499 : __field(xfs_agnumber_t, agno)
3500 : __field(enum xfs_refc_domain, i1_domain)
3501 : __field(xfs_agblock_t, i1_startblock)
3502 : __field(xfs_extlen_t, i1_blockcount)
3503 : __field(xfs_nlink_t, i1_refcount)
3504 : __field(enum xfs_refc_domain, i2_domain)
3505 : __field(xfs_agblock_t, i2_startblock)
3506 : __field(xfs_extlen_t, i2_blockcount)
3507 : __field(xfs_nlink_t, i2_refcount)
3508 : ),
3509 : TP_fast_assign(
3510 : __entry->dev = cur->bc_mp->m_super->s_dev;
3511 : xfs_refcountbt_crack_agno_opdev(cur, &__entry->agno, &__entry->opdev);
3512 : __entry->i1_domain = i1->rc_domain;
3513 : __entry->i1_startblock = i1->rc_startblock;
3514 : __entry->i1_blockcount = i1->rc_blockcount;
3515 : __entry->i1_refcount = i1->rc_refcount;
3516 : __entry->i2_domain = i2->rc_domain;
3517 : __entry->i2_startblock = i2->rc_startblock;
3518 : __entry->i2_blockcount = i2->rc_blockcount;
3519 : __entry->i2_refcount = i2->rc_refcount;
3520 : ),
3521 : TP_printk("dev %d:%d opdev %d:%d agno 0x%x dom %s refcbno 0x%x fsbcount 0x%x refcount %u -- "
3522 : "dom %s refcbno 0x%x fsbcount 0x%x refcount %u",
3523 : MAJOR(__entry->dev), MINOR(__entry->dev),
3524 : MAJOR(__entry->opdev), MINOR(__entry->opdev),
3525 : __entry->agno,
3526 : __print_symbolic(__entry->i1_domain, XFS_REFC_DOMAIN_STRINGS),
3527 : __entry->i1_startblock,
3528 : __entry->i1_blockcount,
3529 : __entry->i1_refcount,
3530 : __print_symbolic(__entry->i2_domain, XFS_REFC_DOMAIN_STRINGS),
3531 : __entry->i2_startblock,
3532 : __entry->i2_blockcount,
3533 : __entry->i2_refcount)
3534 : )
3535 :
3536 : #define DEFINE_REFCOUNT_DOUBLE_EXTENT_EVENT(name) \
3537 : DEFINE_EVENT(xfs_refcount_double_extent_class, name, \
3538 : TP_PROTO(struct xfs_btree_cur *cur, struct xfs_refcount_irec *i1, \
3539 : struct xfs_refcount_irec *i2), \
3540 : TP_ARGS(cur, i1, i2))
3541 :
3542 : /* double-rcext and an agbno tracepoint class */
3543 0 : DECLARE_EVENT_CLASS(xfs_refcount_double_extent_at_class,
3544 : TP_PROTO(struct xfs_btree_cur *cur, struct xfs_refcount_irec *i1,
3545 : struct xfs_refcount_irec *i2, xfs_agblock_t refcbno),
3546 : TP_ARGS(cur, i1, i2, refcbno),
3547 : TP_STRUCT__entry(
3548 : __field(dev_t, dev)
3549 : __field(dev_t, opdev)
3550 : __field(xfs_agnumber_t, agno)
3551 : __field(enum xfs_refc_domain, i1_domain)
3552 : __field(xfs_agblock_t, i1_startblock)
3553 : __field(xfs_extlen_t, i1_blockcount)
3554 : __field(xfs_nlink_t, i1_refcount)
3555 : __field(enum xfs_refc_domain, i2_domain)
3556 : __field(xfs_agblock_t, i2_startblock)
3557 : __field(xfs_extlen_t, i2_blockcount)
3558 : __field(xfs_nlink_t, i2_refcount)
3559 : __field(xfs_agblock_t, refcbno)
3560 : ),
3561 : TP_fast_assign(
3562 : __entry->dev = cur->bc_mp->m_super->s_dev;
3563 : xfs_refcountbt_crack_agno_opdev(cur, &__entry->agno, &__entry->opdev);
3564 : __entry->i1_domain = i1->rc_domain;
3565 : __entry->i1_startblock = i1->rc_startblock;
3566 : __entry->i1_blockcount = i1->rc_blockcount;
3567 : __entry->i1_refcount = i1->rc_refcount;
3568 : __entry->i2_domain = i2->rc_domain;
3569 : __entry->i2_startblock = i2->rc_startblock;
3570 : __entry->i2_blockcount = i2->rc_blockcount;
3571 : __entry->i2_refcount = i2->rc_refcount;
3572 : __entry->refcbno = refcbno;
3573 : ),
3574 : TP_printk("dev %d:%d opdev %d:%d agno 0x%x dom %s refcbno 0x%x fsbcount 0x%x refcount %u -- "
3575 : "dom %s refcbno 0x%x fsbcount 0x%x refcount %u @ refcbno 0x%x",
3576 : MAJOR(__entry->dev), MINOR(__entry->dev),
3577 : MAJOR(__entry->opdev), MINOR(__entry->opdev),
3578 : __entry->agno,
3579 : __print_symbolic(__entry->i1_domain, XFS_REFC_DOMAIN_STRINGS),
3580 : __entry->i1_startblock,
3581 : __entry->i1_blockcount,
3582 : __entry->i1_refcount,
3583 : __print_symbolic(__entry->i2_domain, XFS_REFC_DOMAIN_STRINGS),
3584 : __entry->i2_startblock,
3585 : __entry->i2_blockcount,
3586 : __entry->i2_refcount,
3587 : __entry->refcbno)
3588 : )
3589 :
3590 : #define DEFINE_REFCOUNT_DOUBLE_EXTENT_AT_EVENT(name) \
3591 : DEFINE_EVENT(xfs_refcount_double_extent_at_class, name, \
3592 : TP_PROTO(struct xfs_btree_cur *cur, struct xfs_refcount_irec *i1, \
3593 : struct xfs_refcount_irec *i2, xfs_agblock_t refcbno), \
3594 : TP_ARGS(cur, i1, i2, refcbno))
3595 :
3596 : /* triple-rcext tracepoint class */
3597 0 : DECLARE_EVENT_CLASS(xfs_refcount_triple_extent_class,
3598 : TP_PROTO(struct xfs_btree_cur *cur, struct xfs_refcount_irec *i1,
3599 : struct xfs_refcount_irec *i2, struct xfs_refcount_irec *i3),
3600 : TP_ARGS(cur, i1, i2, i3),
3601 : TP_STRUCT__entry(
3602 : __field(dev_t, dev)
3603 : __field(dev_t, opdev)
3604 : __field(xfs_agnumber_t, agno)
3605 : __field(enum xfs_refc_domain, i1_domain)
3606 : __field(xfs_agblock_t, i1_startblock)
3607 : __field(xfs_extlen_t, i1_blockcount)
3608 : __field(xfs_nlink_t, i1_refcount)
3609 : __field(enum xfs_refc_domain, i2_domain)
3610 : __field(xfs_agblock_t, i2_startblock)
3611 : __field(xfs_extlen_t, i2_blockcount)
3612 : __field(xfs_nlink_t, i2_refcount)
3613 : __field(enum xfs_refc_domain, i3_domain)
3614 : __field(xfs_agblock_t, i3_startblock)
3615 : __field(xfs_extlen_t, i3_blockcount)
3616 : __field(xfs_nlink_t, i3_refcount)
3617 : ),
3618 : TP_fast_assign(
3619 : __entry->dev = cur->bc_mp->m_super->s_dev;
3620 : xfs_refcountbt_crack_agno_opdev(cur, &__entry->agno, &__entry->opdev);
3621 : __entry->i1_domain = i1->rc_domain;
3622 : __entry->i1_startblock = i1->rc_startblock;
3623 : __entry->i1_blockcount = i1->rc_blockcount;
3624 : __entry->i1_refcount = i1->rc_refcount;
3625 : __entry->i2_domain = i2->rc_domain;
3626 : __entry->i2_startblock = i2->rc_startblock;
3627 : __entry->i2_blockcount = i2->rc_blockcount;
3628 : __entry->i2_refcount = i2->rc_refcount;
3629 : __entry->i3_domain = i3->rc_domain;
3630 : __entry->i3_startblock = i3->rc_startblock;
3631 : __entry->i3_blockcount = i3->rc_blockcount;
3632 : __entry->i3_refcount = i3->rc_refcount;
3633 : ),
3634 : TP_printk("dev %d:%d opdev %d:%d agno 0x%x dom %s refcbno 0x%x fsbcount 0x%x refcount %u -- "
3635 : "dom %s refcbno 0x%x fsbcount 0x%x refcount %u -- "
3636 : "dom %s refcbno 0x%x fsbcount 0x%x refcount %u",
3637 : MAJOR(__entry->dev), MINOR(__entry->dev),
3638 : MAJOR(__entry->opdev), MINOR(__entry->opdev),
3639 : __entry->agno,
3640 : __print_symbolic(__entry->i1_domain, XFS_REFC_DOMAIN_STRINGS),
3641 : __entry->i1_startblock,
3642 : __entry->i1_blockcount,
3643 : __entry->i1_refcount,
3644 : __print_symbolic(__entry->i2_domain, XFS_REFC_DOMAIN_STRINGS),
3645 : __entry->i2_startblock,
3646 : __entry->i2_blockcount,
3647 : __entry->i2_refcount,
3648 : __print_symbolic(__entry->i3_domain, XFS_REFC_DOMAIN_STRINGS),
3649 : __entry->i3_startblock,
3650 : __entry->i3_blockcount,
3651 : __entry->i3_refcount)
3652 : );
3653 :
3654 : #define DEFINE_REFCOUNT_TRIPLE_EXTENT_EVENT(name) \
3655 : DEFINE_EVENT(xfs_refcount_triple_extent_class, name, \
3656 : TP_PROTO(struct xfs_btree_cur *cur, struct xfs_refcount_irec *i1, \
3657 : struct xfs_refcount_irec *i2, struct xfs_refcount_irec *i3), \
3658 : TP_ARGS(cur, i1, i2, i3))
3659 :
3660 : /* refcount btree tracepoints */
3661 4197369261 : DEFINE_REFCOUNT_EXTENT_EVENT(xfs_refcount_get);
3662 103010754 : DEFINE_REFCOUNT_EXTENT_EVENT(xfs_refcount_update);
3663 50117640 : DEFINE_REFCOUNT_EXTENT_EVENT(xfs_refcount_insert);
3664 47099612 : DEFINE_REFCOUNT_EXTENT_EVENT(xfs_refcount_delete);
3665 57 : DEFINE_BTREE_ERROR_EVENT(xfs_refcount_insert_error);
3666 0 : DEFINE_BTREE_ERROR_EVENT(xfs_refcount_delete_error);
3667 0 : DEFINE_BTREE_ERROR_EVENT(xfs_refcount_update_error);
3668 :
3669 : /* refcount adjustment tracepoints */
3670 61781310 : DEFINE_REFCOUNT_EVENT(xfs_refcount_increase);
3671 79693524 : DEFINE_REFCOUNT_EVENT(xfs_refcount_decrease);
3672 670237 : DEFINE_REFCOUNT_EVENT(xfs_refcount_cow_increase);
3673 3756508 : DEFINE_REFCOUNT_EVENT(xfs_refcount_cow_decrease);
3674 2194664 : DEFINE_REFCOUNT_TRIPLE_EXTENT_EVENT(xfs_refcount_merge_center_extents);
3675 163251150 : DEFINE_REFCOUNT_EXTENT_EVENT(xfs_refcount_modify_extent);
3676 23803213 : DEFINE_REFCOUNT_EXTENT_AT_EVENT(xfs_refcount_split_extent);
3677 6697492 : DEFINE_REFCOUNT_DOUBLE_EXTENT_EVENT(xfs_refcount_merge_left_extent);
3678 4243250 : DEFINE_REFCOUNT_DOUBLE_EXTENT_EVENT(xfs_refcount_merge_right_extent);
3679 25410931 : DEFINE_REFCOUNT_DOUBLE_EXTENT_AT_EVENT(xfs_refcount_find_left_extent);
3680 23287637 : DEFINE_REFCOUNT_DOUBLE_EXTENT_AT_EVENT(xfs_refcount_find_right_extent);
3681 141 : DEFINE_BTREE_ERROR_EVENT(xfs_refcount_adjust_error);
3682 0 : DEFINE_BTREE_ERROR_EVENT(xfs_refcount_adjust_cow_error);
3683 0 : DEFINE_BTREE_ERROR_EVENT(xfs_refcount_merge_center_extents_error);
3684 45 : DEFINE_BTREE_ERROR_EVENT(xfs_refcount_modify_extent_error);
3685 92 : DEFINE_BTREE_ERROR_EVENT(xfs_refcount_split_extent_error);
3686 0 : DEFINE_BTREE_ERROR_EVENT(xfs_refcount_merge_left_extent_error);
3687 0 : DEFINE_BTREE_ERROR_EVENT(xfs_refcount_merge_right_extent_error);
3688 0 : DEFINE_BTREE_ERROR_EVENT(xfs_refcount_find_left_extent_error);
3689 4 : DEFINE_BTREE_ERROR_EVENT(xfs_refcount_find_right_extent_error);
3690 :
3691 : /* reflink helpers */
3692 2462460799 : DEFINE_REFCOUNT_EVENT(xfs_refcount_find_shared);
3693 2462329299 : DEFINE_REFCOUNT_EVENT(xfs_refcount_find_shared_result);
3694 18 : DEFINE_BTREE_ERROR_EVENT(xfs_refcount_find_shared_error);
3695 :
3696 : TRACE_DEFINE_ENUM(XFS_REFCOUNT_INCREASE);
3697 : TRACE_DEFINE_ENUM(XFS_REFCOUNT_DECREASE);
3698 : TRACE_DEFINE_ENUM(XFS_REFCOUNT_ALLOC_COW);
3699 : TRACE_DEFINE_ENUM(XFS_REFCOUNT_FREE_COW);
3700 :
3701 0 : DECLARE_EVENT_CLASS(xfs_refcount_deferred_class,
3702 : TP_PROTO(struct xfs_mount *mp, struct xfs_refcount_intent *refc),
3703 : TP_ARGS(mp, refc),
3704 : TP_STRUCT__entry(
3705 : __field(dev_t, dev)
3706 : __field(xfs_agnumber_t, agno)
3707 : __field(int, op)
3708 : __field(xfs_agblock_t, refcbno)
3709 : __field(xfs_extlen_t, len)
3710 : ),
3711 : TP_fast_assign(
3712 : __entry->dev = mp->m_super->s_dev;
3713 : __entry->agno = XFS_FSB_TO_AGNO(mp, refc->ri_startblock);
3714 : __entry->op = refc->ri_type;
3715 : __entry->refcbno = XFS_FSB_TO_AGBNO(mp, refc->ri_startblock);
3716 : __entry->len = refc->ri_blockcount;
3717 : ),
3718 : TP_printk("dev %d:%d op %s agno 0x%x refcbno 0x%x fsbcount 0x%x",
3719 : MAJOR(__entry->dev), MINOR(__entry->dev),
3720 : __print_symbolic(__entry->op, XFS_REFCOUNT_INTENT_STRINGS),
3721 : __entry->agno,
3722 : __entry->refcbno,
3723 : __entry->len)
3724 : );
3725 : #define DEFINE_REFCOUNT_DEFERRED_EVENT(name) \
3726 : DEFINE_EVENT(xfs_refcount_deferred_class, name, \
3727 : TP_PROTO(struct xfs_mount *mp, struct xfs_refcount_intent *refc), \
3728 : TP_ARGS(mp, refc))
3729 145899931 : DEFINE_REFCOUNT_DEFERRED_EVENT(xfs_refcount_defer);
3730 145901725 : DEFINE_REFCOUNT_DEFERRED_EVENT(xfs_refcount_deferred);
3731 390 : DEFINE_REFCOUNT_DEFERRED_EVENT(xfs_refcount_finish_one_leftover);
3732 :
3733 : /* simple inode-based error/%ip tracepoint class */
3734 0 : DECLARE_EVENT_CLASS(xfs_inode_error_class,
3735 : TP_PROTO(struct xfs_inode *ip, int error, unsigned long caller_ip),
3736 : TP_ARGS(ip, error, caller_ip),
3737 : TP_STRUCT__entry(
3738 : __field(dev_t, dev)
3739 : __field(xfs_ino_t, ino)
3740 : __field(int, error)
3741 : __field(unsigned long, caller_ip)
3742 : ),
3743 : TP_fast_assign(
3744 : __entry->dev = VFS_I(ip)->i_sb->s_dev;
3745 : __entry->ino = ip->i_ino;
3746 : __entry->error = error;
3747 : __entry->caller_ip = caller_ip;
3748 : ),
3749 : TP_printk("dev %d:%d ino 0x%llx error %d caller %pS",
3750 : MAJOR(__entry->dev), MINOR(__entry->dev),
3751 : __entry->ino,
3752 : __entry->error,
3753 : (char *)__entry->caller_ip)
3754 : );
3755 :
3756 : #define DEFINE_INODE_ERROR_EVENT(name) \
3757 : DEFINE_EVENT(xfs_inode_error_class, name, \
3758 : TP_PROTO(struct xfs_inode *ip, int error, \
3759 : unsigned long caller_ip), \
3760 : TP_ARGS(ip, error, caller_ip))
3761 :
3762 : /* reflink tracepoint classes */
3763 :
3764 : /* two-file io tracepoint class */
3765 0 : DECLARE_EVENT_CLASS(xfs_double_io_class,
3766 : TP_PROTO(struct xfs_inode *src, xfs_off_t soffset, xfs_off_t len,
3767 : struct xfs_inode *dest, xfs_off_t doffset),
3768 : TP_ARGS(src, soffset, len, dest, doffset),
3769 : TP_STRUCT__entry(
3770 : __field(dev_t, dev)
3771 : __field(xfs_ino_t, src_ino)
3772 : __field(loff_t, src_isize)
3773 : __field(loff_t, src_disize)
3774 : __field(loff_t, src_offset)
3775 : __field(long long, len)
3776 : __field(xfs_ino_t, dest_ino)
3777 : __field(loff_t, dest_isize)
3778 : __field(loff_t, dest_disize)
3779 : __field(loff_t, dest_offset)
3780 : ),
3781 : TP_fast_assign(
3782 : __entry->dev = VFS_I(src)->i_sb->s_dev;
3783 : __entry->src_ino = src->i_ino;
3784 : __entry->src_isize = VFS_I(src)->i_size;
3785 : __entry->src_disize = src->i_disk_size;
3786 : __entry->src_offset = soffset;
3787 : __entry->len = len;
3788 : __entry->dest_ino = dest->i_ino;
3789 : __entry->dest_isize = VFS_I(dest)->i_size;
3790 : __entry->dest_disize = dest->i_disk_size;
3791 : __entry->dest_offset = doffset;
3792 : ),
3793 : TP_printk("dev %d:%d bytecount 0x%llx "
3794 : "ino 0x%llx isize 0x%llx disize 0x%llx pos 0x%llx -> "
3795 : "ino 0x%llx isize 0x%llx disize 0x%llx pos 0x%llx",
3796 : MAJOR(__entry->dev), MINOR(__entry->dev),
3797 : __entry->len,
3798 : __entry->src_ino,
3799 : __entry->src_isize,
3800 : __entry->src_disize,
3801 : __entry->src_offset,
3802 : __entry->dest_ino,
3803 : __entry->dest_isize,
3804 : __entry->dest_disize,
3805 : __entry->dest_offset)
3806 : )
3807 :
3808 : #define DEFINE_DOUBLE_IO_EVENT(name) \
3809 : DEFINE_EVENT(xfs_double_io_class, name, \
3810 : TP_PROTO(struct xfs_inode *src, xfs_off_t soffset, xfs_off_t len, \
3811 : struct xfs_inode *dest, xfs_off_t doffset), \
3812 : TP_ARGS(src, soffset, len, dest, doffset))
3813 :
3814 : /* inode/irec events */
3815 0 : DECLARE_EVENT_CLASS(xfs_inode_irec_class,
3816 : TP_PROTO(struct xfs_inode *ip, struct xfs_bmbt_irec *irec),
3817 : TP_ARGS(ip, irec),
3818 : TP_STRUCT__entry(
3819 : __field(dev_t, dev)
3820 : __field(xfs_ino_t, ino)
3821 : __field(xfs_fileoff_t, lblk)
3822 : __field(xfs_extlen_t, len)
3823 : __field(xfs_fsblock_t, pblk)
3824 : __field(int, state)
3825 : ),
3826 : TP_fast_assign(
3827 : __entry->dev = VFS_I(ip)->i_sb->s_dev;
3828 : __entry->ino = ip->i_ino;
3829 : __entry->lblk = irec->br_startoff;
3830 : __entry->len = irec->br_blockcount;
3831 : __entry->pblk = irec->br_startblock;
3832 : __entry->state = irec->br_state;
3833 : ),
3834 : TP_printk("dev %d:%d ino 0x%llx fileoff 0x%llx fsbcount 0x%x startblock 0x%llx st %d",
3835 : MAJOR(__entry->dev), MINOR(__entry->dev),
3836 : __entry->ino,
3837 : __entry->lblk,
3838 : __entry->len,
3839 : __entry->pblk,
3840 : __entry->state)
3841 : );
3842 : #define DEFINE_INODE_IREC_EVENT(name) \
3843 : DEFINE_EVENT(xfs_inode_irec_class, name, \
3844 : TP_PROTO(struct xfs_inode *ip, struct xfs_bmbt_irec *irec), \
3845 : TP_ARGS(ip, irec))
3846 30 : DEFINE_INODE_IREC_EVENT(xfs_bmapi_freesp_done);
3847 :
3848 : /* inode iomap invalidation events */
3849 4 : DECLARE_EVENT_CLASS(xfs_wb_invalid_class,
3850 : TP_PROTO(struct xfs_inode *ip, const struct iomap *iomap, unsigned int wpcseq, int whichfork),
3851 : TP_ARGS(ip, iomap, wpcseq, whichfork),
3852 : TP_STRUCT__entry(
3853 : __field(dev_t, dev)
3854 : __field(xfs_ino_t, ino)
3855 : __field(u64, addr)
3856 : __field(loff_t, pos)
3857 : __field(u64, len)
3858 : __field(u16, type)
3859 : __field(u16, flags)
3860 : __field(u32, wpcseq)
3861 : __field(u32, forkseq)
3862 : ),
3863 : TP_fast_assign(
3864 : __entry->dev = VFS_I(ip)->i_sb->s_dev;
3865 : __entry->ino = ip->i_ino;
3866 : __entry->addr = iomap->addr;
3867 : __entry->pos = iomap->offset;
3868 : __entry->len = iomap->length;
3869 : __entry->type = iomap->type;
3870 : __entry->flags = iomap->flags;
3871 : __entry->wpcseq = wpcseq;
3872 : __entry->forkseq = READ_ONCE(xfs_ifork_ptr(ip, whichfork)->if_seq);
3873 : ),
3874 : TP_printk("dev %d:%d ino 0x%llx pos 0x%llx addr 0x%llx bytecount 0x%llx type 0x%x flags 0x%x wpcseq 0x%x forkseq 0x%x",
3875 : MAJOR(__entry->dev), MINOR(__entry->dev),
3876 : __entry->ino,
3877 : __entry->pos,
3878 : __entry->addr,
3879 : __entry->len,
3880 : __entry->type,
3881 : __entry->flags,
3882 : __entry->wpcseq,
3883 : __entry->forkseq)
3884 : );
3885 : #define DEFINE_WB_INVALID_EVENT(name) \
3886 : DEFINE_EVENT(xfs_wb_invalid_class, name, \
3887 : TP_PROTO(struct xfs_inode *ip, const struct iomap *iomap, unsigned int wpcseq, int whichfork), \
3888 : TP_ARGS(ip, iomap, wpcseq, whichfork))
3889 37681082 : DEFINE_WB_INVALID_EVENT(xfs_wb_cow_iomap_invalid);
3890 78289 : DEFINE_WB_INVALID_EVENT(xfs_wb_data_iomap_invalid);
3891 :
3892 4 : DECLARE_EVENT_CLASS(xfs_iomap_invalid_class,
3893 : TP_PROTO(struct xfs_inode *ip, const struct iomap *iomap),
3894 : TP_ARGS(ip, iomap),
3895 : TP_STRUCT__entry(
3896 : __field(dev_t, dev)
3897 : __field(xfs_ino_t, ino)
3898 : __field(u64, addr)
3899 : __field(loff_t, pos)
3900 : __field(u64, len)
3901 : __field(u64, validity_cookie)
3902 : __field(u64, inodeseq)
3903 : __field(u16, type)
3904 : __field(u16, flags)
3905 : ),
3906 : TP_fast_assign(
3907 : __entry->dev = VFS_I(ip)->i_sb->s_dev;
3908 : __entry->ino = ip->i_ino;
3909 : __entry->addr = iomap->addr;
3910 : __entry->pos = iomap->offset;
3911 : __entry->len = iomap->length;
3912 : __entry->validity_cookie = iomap->validity_cookie;
3913 : __entry->type = iomap->type;
3914 : __entry->flags = iomap->flags;
3915 : __entry->inodeseq = xfs_iomap_inode_sequence(ip, iomap->flags);
3916 : ),
3917 : TP_printk("dev %d:%d ino 0x%llx pos 0x%llx addr 0x%llx bytecount 0x%llx type 0x%x flags 0x%x validity_cookie 0x%llx inodeseq 0x%llx",
3918 : MAJOR(__entry->dev), MINOR(__entry->dev),
3919 : __entry->ino,
3920 : __entry->pos,
3921 : __entry->addr,
3922 : __entry->len,
3923 : __entry->type,
3924 : __entry->flags,
3925 : __entry->validity_cookie,
3926 : __entry->inodeseq)
3927 : );
3928 : #define DEFINE_IOMAP_INVALID_EVENT(name) \
3929 : DEFINE_EVENT(xfs_iomap_invalid_class, name, \
3930 : TP_PROTO(struct xfs_inode *ip, const struct iomap *iomap), \
3931 : TP_ARGS(ip, iomap))
3932 11777 : DEFINE_IOMAP_INVALID_EVENT(xfs_iomap_invalid);
3933 :
3934 : /* refcount/reflink tracepoint definitions */
3935 :
3936 : /* reflink tracepoints */
3937 3812088 : DEFINE_INODE_EVENT(xfs_reflink_set_inode_flag);
3938 7482 : DEFINE_INODE_EVENT(xfs_reflink_unset_inode_flag);
3939 56592561 : DEFINE_ITRUNC_EVENT(xfs_reflink_update_inode_size);
3940 197420665 : TRACE_EVENT(xfs_reflink_remap_blocks,
3941 : TP_PROTO(struct xfs_inode *src, xfs_fileoff_t soffset,
3942 : xfs_filblks_t len, struct xfs_inode *dest,
3943 : xfs_fileoff_t doffset),
3944 : TP_ARGS(src, soffset, len, dest, doffset),
3945 : TP_STRUCT__entry(
3946 : __field(dev_t, dev)
3947 : __field(xfs_ino_t, src_ino)
3948 : __field(xfs_fileoff_t, src_lblk)
3949 : __field(xfs_filblks_t, len)
3950 : __field(xfs_ino_t, dest_ino)
3951 : __field(xfs_fileoff_t, dest_lblk)
3952 : ),
3953 : TP_fast_assign(
3954 : __entry->dev = VFS_I(src)->i_sb->s_dev;
3955 : __entry->src_ino = src->i_ino;
3956 : __entry->src_lblk = soffset;
3957 : __entry->len = len;
3958 : __entry->dest_ino = dest->i_ino;
3959 : __entry->dest_lblk = doffset;
3960 : ),
3961 : TP_printk("dev %d:%d fsbcount 0x%llx "
3962 : "ino 0x%llx fileoff 0x%llx -> ino 0x%llx fileoff 0x%llx",
3963 : MAJOR(__entry->dev), MINOR(__entry->dev),
3964 : __entry->len,
3965 : __entry->src_ino,
3966 : __entry->src_lblk,
3967 : __entry->dest_ino,
3968 : __entry->dest_lblk)
3969 : );
3970 197424086 : DEFINE_DOUBLE_IO_EVENT(xfs_reflink_remap_range);
3971 : #ifdef CONFIG_XFS_RT
3972 0 : DEFINE_DOUBLE_IO_EVENT(xfs_reflink_remap_adjust_rtlen);
3973 : #endif /* CONFIG_XFS_RT */
3974 597904 : DEFINE_INODE_ERROR_EVENT(xfs_reflink_remap_range_error);
3975 5 : DEFINE_INODE_ERROR_EVENT(xfs_reflink_set_inode_flag_error);
3976 0 : DEFINE_INODE_ERROR_EVENT(xfs_reflink_update_inode_size_error);
3977 597877 : DEFINE_INODE_ERROR_EVENT(xfs_reflink_remap_blocks_error);
3978 597669 : DEFINE_INODE_ERROR_EVENT(xfs_reflink_remap_extent_error);
3979 287376131 : DEFINE_INODE_IREC_EVENT(xfs_reflink_remap_extent_src);
3980 286778716 : DEFINE_INODE_IREC_EVENT(xfs_reflink_remap_extent_dest);
3981 2 : DEFINE_INODE_ERROR_EVENT(xfs_map_free_reserve_more_fail);
3982 :
3983 : /* dedupe tracepoints */
3984 0 : DEFINE_DOUBLE_IO_EVENT(xfs_reflink_compare_extents);
3985 0 : DEFINE_INODE_ERROR_EVENT(xfs_reflink_compare_extents_error);
3986 :
3987 : /* ioctl tracepoints */
3988 0 : TRACE_EVENT(xfs_ioctl_clone,
3989 : TP_PROTO(struct inode *src, struct inode *dest),
3990 : TP_ARGS(src, dest),
3991 : TP_STRUCT__entry(
3992 : __field(dev_t, dev)
3993 : __field(unsigned long, src_ino)
3994 : __field(loff_t, src_isize)
3995 : __field(unsigned long, dest_ino)
3996 : __field(loff_t, dest_isize)
3997 : ),
3998 : TP_fast_assign(
3999 : __entry->dev = src->i_sb->s_dev;
4000 : __entry->src_ino = src->i_ino;
4001 : __entry->src_isize = i_size_read(src);
4002 : __entry->dest_ino = dest->i_ino;
4003 : __entry->dest_isize = i_size_read(dest);
4004 : ),
4005 : TP_printk("dev %d:%d ino 0x%lx isize 0x%llx -> ino 0x%lx isize 0x%llx",
4006 : MAJOR(__entry->dev), MINOR(__entry->dev),
4007 : __entry->src_ino,
4008 : __entry->src_isize,
4009 : __entry->dest_ino,
4010 : __entry->dest_isize)
4011 : );
4012 :
4013 : /* unshare tracepoints */
4014 40 : DEFINE_SIMPLE_IO_EVENT(xfs_reflink_unshare);
4015 0 : DEFINE_SIMPLE_IO_EVENT(xfs_file_cow_around);
4016 2 : DEFINE_INODE_ERROR_EVENT(xfs_reflink_unshare_error);
4017 : #ifdef CONFIG_XFS_RT
4018 0 : DEFINE_SIMPLE_IO_EVENT(xfs_rtfile_convert_unwritten);
4019 : #endif /* CONFIG_XFS_RT */
4020 :
4021 : /* copy on write */
4022 16573533 : DEFINE_INODE_IREC_EVENT(xfs_reflink_trim_around_shared);
4023 972040 : DEFINE_INODE_IREC_EVENT(xfs_reflink_cow_found);
4024 0 : DEFINE_INODE_IREC_EVENT(xfs_reflink_cow_enospc);
4025 1391473 : DEFINE_INODE_IREC_EVENT(xfs_reflink_convert_cow);
4026 :
4027 348637 : DEFINE_SIMPLE_IO_EVENT(xfs_reflink_cancel_cow_range);
4028 1743149 : DEFINE_SIMPLE_IO_EVENT(xfs_reflink_end_cow);
4029 2965342 : DEFINE_INODE_IREC_EVENT(xfs_reflink_cow_remap_from);
4030 2965342 : DEFINE_INODE_IREC_EVENT(xfs_reflink_cow_remap_to);
4031 :
4032 16 : DEFINE_INODE_ERROR_EVENT(xfs_reflink_cancel_cow_range_error);
4033 24 : DEFINE_INODE_ERROR_EVENT(xfs_reflink_end_cow_error);
4034 :
4035 :
4036 516963 : DEFINE_INODE_IREC_EVENT(xfs_reflink_cancel_cow);
4037 :
4038 :
4039 : /* swapext tracepoints */
4040 58 : DEFINE_INODE_ERROR_EVENT(xfs_file_xchg_range_error);
4041 0 : DEFINE_INODE_ERROR_EVENT(xfs_swap_extent_error);
4042 72 : DEFINE_INODE_IREC_EVENT(xfs_swapext_extent1_skip);
4043 2628291 : DEFINE_INODE_IREC_EVENT(xfs_swapext_extent1);
4044 2628291 : DEFINE_INODE_IREC_EVENT(xfs_swapext_extent2);
4045 73 : DEFINE_ITRUNC_EVENT(xfs_swapext_update_inode_size);
4046 :
4047 : #define XFS_EXCH_RANGE_FLAGS_STRS \
4048 : { XFS_EXCH_RANGE_NONATOMIC, "NONATOMIC" }, \
4049 : { XFS_EXCH_RANGE_FILE2_FRESH, "F2_FRESH" }, \
4050 : { XFS_EXCH_RANGE_FULL_FILES, "FULL" }, \
4051 : { XFS_EXCH_RANGE_TO_EOF, "TO_EOF" }, \
4052 : { XFS_EXCH_RANGE_FSYNC , "FSYNC" }, \
4053 : { XFS_EXCH_RANGE_DRY_RUN, "DRY_RUN" }, \
4054 : { XFS_EXCH_RANGE_FILE1_WRITTEN, "F1_WRITTEN" }
4055 :
4056 : /* file exchange-range tracepoint class */
4057 0 : DECLARE_EVENT_CLASS(xfs_xchg_range_class,
4058 : TP_PROTO(struct xfs_inode *ip1, const struct xfs_exch_range *fxr,
4059 : struct xfs_inode *ip2, unsigned int xchg_flags),
4060 : TP_ARGS(ip1, fxr, ip2, xchg_flags),
4061 : TP_STRUCT__entry(
4062 : __field(dev_t, dev)
4063 : __field(xfs_ino_t, ip1_ino)
4064 : __field(loff_t, ip1_isize)
4065 : __field(loff_t, ip1_disize)
4066 : __field(xfs_ino_t, ip2_ino)
4067 : __field(loff_t, ip2_isize)
4068 : __field(loff_t, ip2_disize)
4069 :
4070 : __field(loff_t, file1_offset)
4071 : __field(loff_t, file2_offset)
4072 : __field(unsigned long long, length)
4073 : __field(unsigned long long, vflags)
4074 : __field(unsigned int, xflags)
4075 : ),
4076 : TP_fast_assign(
4077 : __entry->dev = VFS_I(ip1)->i_sb->s_dev;
4078 : __entry->ip1_ino = ip1->i_ino;
4079 : __entry->ip1_isize = VFS_I(ip1)->i_size;
4080 : __entry->ip1_disize = ip1->i_disk_size;
4081 : __entry->ip2_ino = ip2->i_ino;
4082 : __entry->ip2_isize = VFS_I(ip2)->i_size;
4083 : __entry->ip2_disize = ip2->i_disk_size;
4084 :
4085 : __entry->file1_offset = fxr->file1_offset;
4086 : __entry->file2_offset = fxr->file2_offset;
4087 : __entry->length = fxr->length;
4088 : __entry->vflags = fxr->flags;
4089 : __entry->xflags = xchg_flags;
4090 : ),
4091 : TP_printk("dev %d:%d vfs_flags %s xchg_flags %s bytecount 0x%llx "
4092 : "ino1 0x%llx isize 0x%llx disize 0x%llx pos 0x%llx -> "
4093 : "ino2 0x%llx isize 0x%llx disize 0x%llx pos 0x%llx",
4094 : MAJOR(__entry->dev), MINOR(__entry->dev),
4095 : __print_flags(__entry->vflags, "|", XFS_EXCH_RANGE_FLAGS_STRS),
4096 : __print_flags(__entry->xflags, "|", XCHG_RANGE_FLAGS_STRS),
4097 : __entry->length,
4098 : __entry->ip1_ino,
4099 : __entry->ip1_isize,
4100 : __entry->ip1_disize,
4101 : __entry->file1_offset,
4102 : __entry->ip2_ino,
4103 : __entry->ip2_isize,
4104 : __entry->ip2_disize,
4105 : __entry->file2_offset)
4106 : )
4107 :
4108 : #define DEFINE_XCHG_RANGE_EVENT(name) \
4109 : DEFINE_EVENT(xfs_xchg_range_class, name, \
4110 : TP_PROTO(struct xfs_inode *ip1, const struct xfs_exch_range *fxr, \
4111 : struct xfs_inode *ip2, unsigned int xchg_flags), \
4112 : TP_ARGS(ip1, fxr, ip2, xchg_flags))
4113 264682 : DEFINE_XCHG_RANGE_EVENT(xfs_xchg_range_prep);
4114 264526 : DEFINE_XCHG_RANGE_EVENT(xfs_xchg_range_flush);
4115 264640 : DEFINE_XCHG_RANGE_EVENT(xfs_xchg_range);
4116 :
4117 6522 : TRACE_EVENT(xfs_xchg_range_freshness,
4118 : TP_PROTO(struct xfs_inode *ip2, const struct xfs_exch_range *fxr),
4119 : TP_ARGS(ip2, fxr),
4120 : TP_STRUCT__entry(
4121 : __field(dev_t, dev)
4122 : __field(xfs_ino_t, ip2_ino)
4123 : __field(long long, ip2_mtime)
4124 : __field(long long, ip2_ctime)
4125 : __field(int, ip2_mtime_nsec)
4126 : __field(int, ip2_ctime_nsec)
4127 :
4128 : __field(xfs_ino_t, file2_ino)
4129 : __field(long long, file2_mtime)
4130 : __field(long long, file2_ctime)
4131 : __field(int, file2_mtime_nsec)
4132 : __field(int, file2_ctime_nsec)
4133 : ),
4134 : TP_fast_assign(
4135 : __entry->dev = VFS_I(ip2)->i_sb->s_dev;
4136 : __entry->ip2_ino = ip2->i_ino;
4137 : __entry->ip2_mtime = VFS_I(ip2)->i_mtime.tv_sec;
4138 : __entry->ip2_ctime = VFS_I(ip2)->i_ctime.tv_sec;
4139 : __entry->ip2_mtime_nsec = VFS_I(ip2)->i_mtime.tv_nsec;
4140 : __entry->ip2_ctime_nsec = VFS_I(ip2)->i_ctime.tv_nsec;
4141 :
4142 : __entry->file2_ino = fxr->file2_ino;
4143 : __entry->file2_mtime = fxr->file2_mtime;
4144 : __entry->file2_ctime = fxr->file2_ctime;
4145 : __entry->file2_mtime_nsec = fxr->file2_mtime_nsec;
4146 : __entry->file2_ctime_nsec = fxr->file2_ctime_nsec;
4147 : ),
4148 : TP_printk("dev %d:%d "
4149 : "ino 0x%llx mtime %lld:%d ctime %lld:%d -> "
4150 : "file 0x%llx mtime %lld:%d ctime %lld:%d",
4151 : MAJOR(__entry->dev), MINOR(__entry->dev),
4152 : __entry->ip2_ino,
4153 : __entry->ip2_mtime,
4154 : __entry->ip2_mtime_nsec,
4155 : __entry->ip2_ctime,
4156 : __entry->ip2_ctime_nsec,
4157 : __entry->file2_ino,
4158 : __entry->file2_mtime,
4159 : __entry->file2_mtime_nsec,
4160 : __entry->file2_ctime,
4161 : __entry->file2_ctime_nsec)
4162 : );
4163 :
4164 : /* fsmap traces */
4165 0 : DECLARE_EVENT_CLASS(xfs_fsmap_class,
4166 : TP_PROTO(struct xfs_mount *mp, u32 keydev, xfs_agnumber_t agno,
4167 : const struct xfs_rmap_irec *rmap),
4168 : TP_ARGS(mp, keydev, agno, rmap),
4169 : TP_STRUCT__entry(
4170 : __field(dev_t, dev)
4171 : __field(dev_t, keydev)
4172 : __field(xfs_agnumber_t, agno)
4173 : __field(xfs_fsblock_t, bno)
4174 : __field(xfs_filblks_t, len)
4175 : __field(uint64_t, owner)
4176 : __field(uint64_t, offset)
4177 : __field(unsigned int, flags)
4178 : ),
4179 : TP_fast_assign(
4180 : __entry->dev = mp->m_super->s_dev;
4181 : __entry->keydev = new_decode_dev(keydev);
4182 : __entry->agno = agno;
4183 : __entry->bno = rmap->rm_startblock;
4184 : __entry->len = rmap->rm_blockcount;
4185 : __entry->owner = rmap->rm_owner;
4186 : __entry->offset = rmap->rm_offset;
4187 : __entry->flags = rmap->rm_flags;
4188 : ),
4189 : TP_printk("dev %d:%d keydev %d:%d agno 0x%x startblock 0x%llx fsbcount 0x%llx owner 0x%llx fileoff 0x%llx flags 0x%x",
4190 : MAJOR(__entry->dev), MINOR(__entry->dev),
4191 : MAJOR(__entry->keydev), MINOR(__entry->keydev),
4192 : __entry->agno,
4193 : __entry->bno,
4194 : __entry->len,
4195 : __entry->owner,
4196 : __entry->offset,
4197 : __entry->flags)
4198 : )
4199 : #define DEFINE_FSMAP_EVENT(name) \
4200 : DEFINE_EVENT(xfs_fsmap_class, name, \
4201 : TP_PROTO(struct xfs_mount *mp, u32 keydev, xfs_agnumber_t agno, \
4202 : const struct xfs_rmap_irec *rmap), \
4203 : TP_ARGS(mp, keydev, agno, rmap))
4204 166561 : DEFINE_FSMAP_EVENT(xfs_fsmap_low_key);
4205 166417 : DEFINE_FSMAP_EVENT(xfs_fsmap_high_key);
4206 109756757 : DEFINE_FSMAP_EVENT(xfs_fsmap_mapping);
4207 :
4208 0 : DECLARE_EVENT_CLASS(xfs_fsmap_linear_class,
4209 : TP_PROTO(struct xfs_mount *mp, u32 keydev, uint64_t bno),
4210 : TP_ARGS(mp, keydev, bno),
4211 : TP_STRUCT__entry(
4212 : __field(dev_t, dev)
4213 : __field(dev_t, keydev)
4214 : __field(xfs_fsblock_t, bno)
4215 : ),
4216 : TP_fast_assign(
4217 : __entry->dev = mp->m_super->s_dev;
4218 : __entry->keydev = new_decode_dev(keydev);
4219 : __entry->bno = bno;
4220 : ),
4221 : TP_printk("dev %d:%d keydev %d:%d bno 0x%llx",
4222 : MAJOR(__entry->dev), MINOR(__entry->dev),
4223 : MAJOR(__entry->keydev), MINOR(__entry->keydev),
4224 : __entry->bno)
4225 : )
4226 : #define DEFINE_FSMAP_LINEAR_EVENT(name) \
4227 : DEFINE_EVENT(xfs_fsmap_linear_class, name, \
4228 : TP_PROTO(struct xfs_mount *mp, u32 keydev, uint64_t bno), \
4229 : TP_ARGS(mp, keydev, bno))
4230 0 : DEFINE_FSMAP_LINEAR_EVENT(xfs_fsmap_low_key_linear);
4231 0 : DEFINE_FSMAP_LINEAR_EVENT(xfs_fsmap_high_key_linear);
4232 :
4233 0 : DECLARE_EVENT_CLASS(xfs_getfsmap_class,
4234 : TP_PROTO(struct xfs_mount *mp, struct xfs_fsmap *fsmap),
4235 : TP_ARGS(mp, fsmap),
4236 : TP_STRUCT__entry(
4237 : __field(dev_t, dev)
4238 : __field(dev_t, keydev)
4239 : __field(xfs_daddr_t, block)
4240 : __field(xfs_daddr_t, len)
4241 : __field(uint64_t, owner)
4242 : __field(uint64_t, offset)
4243 : __field(uint64_t, flags)
4244 : ),
4245 : TP_fast_assign(
4246 : __entry->dev = mp->m_super->s_dev;
4247 : __entry->keydev = new_decode_dev(fsmap->fmr_device);
4248 : __entry->block = fsmap->fmr_physical;
4249 : __entry->len = fsmap->fmr_length;
4250 : __entry->owner = fsmap->fmr_owner;
4251 : __entry->offset = fsmap->fmr_offset;
4252 : __entry->flags = fsmap->fmr_flags;
4253 : ),
4254 : TP_printk("dev %d:%d keydev %d:%d daddr 0x%llx bbcount 0x%llx owner 0x%llx fileoff_daddr 0x%llx flags 0x%llx",
4255 : MAJOR(__entry->dev), MINOR(__entry->dev),
4256 : MAJOR(__entry->keydev), MINOR(__entry->keydev),
4257 : __entry->block,
4258 : __entry->len,
4259 : __entry->owner,
4260 : __entry->offset,
4261 : __entry->flags)
4262 : )
4263 : #define DEFINE_GETFSMAP_EVENT(name) \
4264 : DEFINE_EVENT(xfs_getfsmap_class, name, \
4265 : TP_PROTO(struct xfs_mount *mp, struct xfs_fsmap *fsmap), \
4266 : TP_ARGS(mp, fsmap))
4267 231071 : DEFINE_GETFSMAP_EVENT(xfs_getfsmap_low_key);
4268 94896 : DEFINE_GETFSMAP_EVENT(xfs_getfsmap_high_key);
4269 121933281 : DEFINE_GETFSMAP_EVENT(xfs_getfsmap_mapping);
4270 :
4271 : /* fsrefs traces */
4272 0 : DECLARE_EVENT_CLASS(xfs_fsrefs_class,
4273 : TP_PROTO(struct xfs_mount *mp, u32 keydev, xfs_agnumber_t agno,
4274 : const struct xfs_refcount_irec *refc),
4275 : TP_ARGS(mp, keydev, agno, refc),
4276 : TP_STRUCT__entry(
4277 : __field(dev_t, dev)
4278 : __field(dev_t, keydev)
4279 : __field(xfs_agnumber_t, agno)
4280 : __field(xfs_agblock_t, bno)
4281 : __field(xfs_extlen_t, len)
4282 : __field(uint64_t, owners)
4283 : ),
4284 : TP_fast_assign(
4285 : __entry->dev = mp->m_super->s_dev;
4286 : __entry->keydev = new_decode_dev(keydev);
4287 : __entry->agno = agno;
4288 : __entry->bno = refc->rc_startblock;
4289 : __entry->len = refc->rc_blockcount;
4290 : __entry->owners = refc->rc_refcount;
4291 : ),
4292 : TP_printk("dev %d:%d keydev %d:%d agno 0x%x refcbno 0x%x fsbcount 0x%x owners %llu",
4293 : MAJOR(__entry->dev), MINOR(__entry->dev),
4294 : MAJOR(__entry->keydev), MINOR(__entry->keydev),
4295 : __entry->agno,
4296 : __entry->bno,
4297 : __entry->len,
4298 : __entry->owners)
4299 : )
4300 : #define DEFINE_FSREFS_EVENT(name) \
4301 : DEFINE_EVENT(xfs_fsrefs_class, name, \
4302 : TP_PROTO(struct xfs_mount *mp, u32 keydev, xfs_agnumber_t agno, \
4303 : const struct xfs_refcount_irec *refc), \
4304 : TP_ARGS(mp, keydev, agno, refc))
4305 1035 : DEFINE_FSREFS_EVENT(xfs_fsrefs_low_key);
4306 1035 : DEFINE_FSREFS_EVENT(xfs_fsrefs_high_key);
4307 2545 : DEFINE_FSREFS_EVENT(xfs_fsrefs_mapping);
4308 :
4309 0 : DECLARE_EVENT_CLASS(xfs_fsrefs_linear_class,
4310 : TP_PROTO(struct xfs_mount *mp, u32 keydev, uint64_t bno),
4311 : TP_ARGS(mp, keydev, bno),
4312 : TP_STRUCT__entry(
4313 : __field(dev_t, dev)
4314 : __field(dev_t, keydev)
4315 : __field(xfs_fsblock_t, bno)
4316 : ),
4317 : TP_fast_assign(
4318 : __entry->dev = mp->m_super->s_dev;
4319 : __entry->keydev = new_decode_dev(keydev);
4320 : __entry->bno = bno;
4321 : ),
4322 : TP_printk("dev %d:%d keydev %d:%d bno 0x%llx",
4323 : MAJOR(__entry->dev), MINOR(__entry->dev),
4324 : MAJOR(__entry->keydev), MINOR(__entry->keydev),
4325 : __entry->bno)
4326 : )
4327 : #define DEFINE_FSREFS_LINEAR_EVENT(name) \
4328 : DEFINE_EVENT(xfs_fsrefs_linear_class, name, \
4329 : TP_PROTO(struct xfs_mount *mp, u32 keydev, uint64_t bno), \
4330 : TP_ARGS(mp, keydev, bno))
4331 0 : DEFINE_FSREFS_LINEAR_EVENT(xfs_fsrefs_low_key_linear);
4332 0 : DEFINE_FSREFS_LINEAR_EVENT(xfs_fsrefs_high_key_linear);
4333 :
4334 0 : DECLARE_EVENT_CLASS(xfs_getfsrefs_class,
4335 : TP_PROTO(struct xfs_mount *mp, struct xfs_fsrefs *fsrefs),
4336 : TP_ARGS(mp, fsrefs),
4337 : TP_STRUCT__entry(
4338 : __field(dev_t, dev)
4339 : __field(dev_t, keydev)
4340 : __field(xfs_daddr_t, block)
4341 : __field(xfs_daddr_t, len)
4342 : __field(uint64_t, owners)
4343 : __field(uint32_t, flags)
4344 : ),
4345 : TP_fast_assign(
4346 : __entry->dev = mp->m_super->s_dev;
4347 : __entry->keydev = new_decode_dev(fsrefs->fcr_device);
4348 : __entry->block = fsrefs->fcr_physical;
4349 : __entry->len = fsrefs->fcr_length;
4350 : __entry->owners = fsrefs->fcr_owners;
4351 : __entry->flags = fsrefs->fcr_flags;
4352 : ),
4353 : TP_printk("dev %d:%d keydev %d:%d daddr 0x%llx bbcount 0x%llx owners %llu flags 0x%x",
4354 : MAJOR(__entry->dev), MINOR(__entry->dev),
4355 : MAJOR(__entry->keydev), MINOR(__entry->keydev),
4356 : __entry->block,
4357 : __entry->len,
4358 : __entry->owners,
4359 : __entry->flags)
4360 : )
4361 : #define DEFINE_GETFSREFS_EVENT(name) \
4362 : DEFINE_EVENT(xfs_getfsrefs_class, name, \
4363 : TP_PROTO(struct xfs_mount *mp, struct xfs_fsrefs *fsrefs), \
4364 : TP_ARGS(mp, fsrefs))
4365 2022 : DEFINE_GETFSREFS_EVENT(xfs_getfsrefs_low_key);
4366 1011 : DEFINE_GETFSREFS_EVENT(xfs_getfsrefs_high_key);
4367 2545 : DEFINE_GETFSREFS_EVENT(xfs_getfsrefs_mapping);
4368 :
4369 0 : DECLARE_EVENT_CLASS(xfs_trans_resv_class,
4370 : TP_PROTO(struct xfs_mount *mp, unsigned int type,
4371 : struct xfs_trans_res *res),
4372 : TP_ARGS(mp, type, res),
4373 : TP_STRUCT__entry(
4374 : __field(dev_t, dev)
4375 : __field(int, type)
4376 : __field(uint, logres)
4377 : __field(int, logcount)
4378 : __field(int, logflags)
4379 : ),
4380 : TP_fast_assign(
4381 : __entry->dev = mp->m_super->s_dev;
4382 : __entry->type = type;
4383 : __entry->logres = res->tr_logres;
4384 : __entry->logcount = res->tr_logcount;
4385 : __entry->logflags = res->tr_logflags;
4386 : ),
4387 : TP_printk("dev %d:%d type %d logres %u logcount %d flags 0x%x",
4388 : MAJOR(__entry->dev), MINOR(__entry->dev),
4389 : __entry->type,
4390 : __entry->logres,
4391 : __entry->logcount,
4392 : __entry->logflags)
4393 : )
4394 :
4395 : #define DEFINE_TRANS_RESV_EVENT(name) \
4396 : DEFINE_EVENT(xfs_trans_resv_class, name, \
4397 : TP_PROTO(struct xfs_mount *mp, unsigned int type, \
4398 : struct xfs_trans_res *res), \
4399 : TP_ARGS(mp, type, res))
4400 705657 : DEFINE_TRANS_RESV_EVENT(xfs_trans_resv_calc);
4401 715488 : DEFINE_TRANS_RESV_EVENT(xfs_trans_resv_calc_minlogsize);
4402 :
4403 24672 : TRACE_EVENT(xfs_log_get_max_trans_res,
4404 : TP_PROTO(struct xfs_mount *mp, const struct xfs_trans_res *res),
4405 : TP_ARGS(mp, res),
4406 : TP_STRUCT__entry(
4407 : __field(dev_t, dev)
4408 : __field(uint, logres)
4409 : __field(int, logcount)
4410 : ),
4411 : TP_fast_assign(
4412 : __entry->dev = mp->m_super->s_dev;
4413 : __entry->logres = res->tr_logres;
4414 : __entry->logcount = res->tr_logcount;
4415 : ),
4416 : TP_printk("dev %d:%d logres %u logcount %d",
4417 : MAJOR(__entry->dev), MINOR(__entry->dev),
4418 : __entry->logres,
4419 : __entry->logcount)
4420 : );
4421 :
4422 0 : DECLARE_EVENT_CLASS(xfs_trans_class,
4423 : TP_PROTO(struct xfs_trans *tp, unsigned long caller_ip),
4424 : TP_ARGS(tp, caller_ip),
4425 : TP_STRUCT__entry(
4426 : __field(dev_t, dev)
4427 : __field(uint32_t, tid)
4428 : __field(uint32_t, flags)
4429 : __field(unsigned long, caller_ip)
4430 : ),
4431 : TP_fast_assign(
4432 : __entry->dev = tp->t_mountp->m_super->s_dev;
4433 : __entry->tid = 0;
4434 : if (tp->t_ticket)
4435 : __entry->tid = tp->t_ticket->t_tid;
4436 : __entry->flags = tp->t_flags;
4437 : __entry->caller_ip = caller_ip;
4438 : ),
4439 : TP_printk("dev %d:%d trans %x flags 0x%x caller %pS",
4440 : MAJOR(__entry->dev), MINOR(__entry->dev),
4441 : __entry->tid,
4442 : __entry->flags,
4443 : (char *)__entry->caller_ip)
4444 : )
4445 :
4446 : #define DEFINE_TRANS_EVENT(name) \
4447 : DEFINE_EVENT(xfs_trans_class, name, \
4448 : TP_PROTO(struct xfs_trans *tp, unsigned long caller_ip), \
4449 : TP_ARGS(tp, caller_ip))
4450 2250204259 : DEFINE_TRANS_EVENT(xfs_trans_alloc);
4451 1431245421 : DEFINE_TRANS_EVENT(xfs_trans_cancel);
4452 1789621973 : DEFINE_TRANS_EVENT(xfs_trans_commit);
4453 962278505 : DEFINE_TRANS_EVENT(xfs_trans_dup);
4454 3221120664 : DEFINE_TRANS_EVENT(xfs_trans_free);
4455 962312225 : DEFINE_TRANS_EVENT(xfs_trans_roll);
4456 30758881946 : DEFINE_TRANS_EVENT(xfs_trans_add_item);
4457 1774930270 : DEFINE_TRANS_EVENT(xfs_trans_commit_items);
4458 1446353799 : DEFINE_TRANS_EVENT(xfs_trans_free_items);
4459 :
4460 78059925 : TRACE_EVENT(xfs_iunlink_update_bucket,
4461 : TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, unsigned int bucket,
4462 : xfs_agino_t old_ptr, xfs_agino_t new_ptr),
4463 : TP_ARGS(mp, agno, bucket, old_ptr, new_ptr),
4464 : TP_STRUCT__entry(
4465 : __field(dev_t, dev)
4466 : __field(xfs_agnumber_t, agno)
4467 : __field(unsigned int, bucket)
4468 : __field(xfs_agino_t, old_ptr)
4469 : __field(xfs_agino_t, new_ptr)
4470 : ),
4471 : TP_fast_assign(
4472 : __entry->dev = mp->m_super->s_dev;
4473 : __entry->agno = agno;
4474 : __entry->bucket = bucket;
4475 : __entry->old_ptr = old_ptr;
4476 : __entry->new_ptr = new_ptr;
4477 : ),
4478 : TP_printk("dev %d:%d agno 0x%x bucket %u old 0x%x new 0x%x",
4479 : MAJOR(__entry->dev), MINOR(__entry->dev),
4480 : __entry->agno,
4481 : __entry->bucket,
4482 : __entry->old_ptr,
4483 : __entry->new_ptr)
4484 : );
4485 :
4486 18134048 : TRACE_EVENT(xfs_iunlink_update_dinode,
4487 : TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, xfs_agino_t agino,
4488 : xfs_agino_t old_ptr, xfs_agino_t new_ptr),
4489 : TP_ARGS(mp, agno, agino, old_ptr, new_ptr),
4490 : TP_STRUCT__entry(
4491 : __field(dev_t, dev)
4492 : __field(xfs_agnumber_t, agno)
4493 : __field(xfs_agino_t, agino)
4494 : __field(xfs_agino_t, old_ptr)
4495 : __field(xfs_agino_t, new_ptr)
4496 : ),
4497 : TP_fast_assign(
4498 : __entry->dev = mp->m_super->s_dev;
4499 : __entry->agno = agno;
4500 : __entry->agino = agino;
4501 : __entry->old_ptr = old_ptr;
4502 : __entry->new_ptr = new_ptr;
4503 : ),
4504 : TP_printk("dev %d:%d agno 0x%x agino 0x%x old 0x%x new 0x%x",
4505 : MAJOR(__entry->dev), MINOR(__entry->dev),
4506 : __entry->agno,
4507 : __entry->agino,
4508 : __entry->old_ptr,
4509 : __entry->new_ptr)
4510 : );
4511 :
4512 0 : DECLARE_EVENT_CLASS(xfs_ag_inode_class,
4513 : TP_PROTO(struct xfs_inode *ip),
4514 : TP_ARGS(ip),
4515 : TP_STRUCT__entry(
4516 : __field(dev_t, dev)
4517 : __field(xfs_agnumber_t, agno)
4518 : __field(xfs_agino_t, agino)
4519 : ),
4520 : TP_fast_assign(
4521 : __entry->dev = VFS_I(ip)->i_sb->s_dev;
4522 : __entry->agno = XFS_INO_TO_AGNO(ip->i_mount, ip->i_ino);
4523 : __entry->agino = XFS_INO_TO_AGINO(ip->i_mount, ip->i_ino);
4524 : ),
4525 : TP_printk("dev %d:%d agno 0x%x agino 0x%x",
4526 : MAJOR(__entry->dev), MINOR(__entry->dev),
4527 : __entry->agno, __entry->agino)
4528 : )
4529 :
4530 : #define DEFINE_AGINODE_EVENT(name) \
4531 : DEFINE_EVENT(xfs_ag_inode_class, name, \
4532 : TP_PROTO(struct xfs_inode *ip), \
4533 : TP_ARGS(ip))
4534 40418030 : DEFINE_AGINODE_EVENT(xfs_iunlink);
4535 80831668 : DEFINE_AGINODE_EVENT(xfs_iunlink_remove);
4536 :
4537 0 : DECLARE_EVENT_CLASS(xfs_fs_corrupt_class,
4538 : TP_PROTO(struct xfs_mount *mp, unsigned int flags),
4539 : TP_ARGS(mp, flags),
4540 : TP_STRUCT__entry(
4541 : __field(dev_t, dev)
4542 : __field(unsigned int, flags)
4543 : ),
4544 : TP_fast_assign(
4545 : __entry->dev = mp->m_super->s_dev;
4546 : __entry->flags = flags;
4547 : ),
4548 : TP_printk("dev %d:%d flags 0x%x",
4549 : MAJOR(__entry->dev), MINOR(__entry->dev),
4550 : __entry->flags)
4551 : );
4552 : #define DEFINE_FS_CORRUPT_EVENT(name) \
4553 : DEFINE_EVENT(xfs_fs_corrupt_class, name, \
4554 : TP_PROTO(struct xfs_mount *mp, unsigned int flags), \
4555 : TP_ARGS(mp, flags))
4556 434598 : DEFINE_FS_CORRUPT_EVENT(xfs_fs_mark_sick);
4557 268392 : DEFINE_FS_CORRUPT_EVENT(xfs_fs_mark_healthy);
4558 5 : DEFINE_FS_CORRUPT_EVENT(xfs_fs_unfixed_corruption);
4559 0 : DEFINE_FS_CORRUPT_EVENT(xfs_rt_mark_sick);
4560 106308 : DEFINE_FS_CORRUPT_EVENT(xfs_rt_mark_healthy);
4561 0 : DEFINE_FS_CORRUPT_EVENT(xfs_rt_unfixed_corruption);
4562 :
4563 0 : DECLARE_EVENT_CLASS(xfs_ag_corrupt_class,
4564 : TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, unsigned int flags),
4565 : TP_ARGS(mp, agno, flags),
4566 : TP_STRUCT__entry(
4567 : __field(dev_t, dev)
4568 : __field(xfs_agnumber_t, agno)
4569 : __field(unsigned int, flags)
4570 : ),
4571 : TP_fast_assign(
4572 : __entry->dev = mp->m_super->s_dev;
4573 : __entry->agno = agno;
4574 : __entry->flags = flags;
4575 : ),
4576 : TP_printk("dev %d:%d agno 0x%x flags 0x%x",
4577 : MAJOR(__entry->dev), MINOR(__entry->dev),
4578 : __entry->agno, __entry->flags)
4579 : );
4580 : #define DEFINE_AG_CORRUPT_EVENT(name) \
4581 : DEFINE_EVENT(xfs_ag_corrupt_class, name, \
4582 : TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
4583 : unsigned int flags), \
4584 : TP_ARGS(mp, agno, flags))
4585 1806 : DEFINE_AG_CORRUPT_EVENT(xfs_ag_mark_sick);
4586 2979037 : DEFINE_AG_CORRUPT_EVENT(xfs_ag_mark_healthy);
4587 24 : DEFINE_AG_CORRUPT_EVENT(xfs_ag_unfixed_corruption);
4588 :
4589 0 : DECLARE_EVENT_CLASS(xfs_rtgroup_corrupt_class,
4590 : TP_PROTO(struct xfs_rtgroup *rtg, unsigned int flags),
4591 : TP_ARGS(rtg, flags),
4592 : TP_STRUCT__entry(
4593 : __field(dev_t, dev)
4594 : __field(xfs_rgnumber_t, rgno)
4595 : __field(unsigned int, flags)
4596 : ),
4597 : TP_fast_assign(
4598 : __entry->dev = rtg->rtg_mount->m_super->s_dev;
4599 : __entry->rgno = rtg->rtg_rgno;
4600 : __entry->flags = flags;
4601 : ),
4602 : TP_printk("dev %d:%d rgno 0x%x flags 0x%x",
4603 : MAJOR(__entry->dev), MINOR(__entry->dev),
4604 : __entry->rgno, __entry->flags)
4605 : );
4606 : #define DEFINE_RTGROUP_CORRUPT_EVENT(name) \
4607 : DEFINE_EVENT(xfs_rtgroup_corrupt_class, name, \
4608 : TP_PROTO(struct xfs_rtgroup *rtg, unsigned int flags), \
4609 : TP_ARGS(rtg, flags))
4610 0 : DEFINE_RTGROUP_CORRUPT_EVENT(xfs_rtgroup_mark_sick);
4611 156449 : DEFINE_RTGROUP_CORRUPT_EVENT(xfs_rtgroup_mark_healthy);
4612 0 : DEFINE_RTGROUP_CORRUPT_EVENT(xfs_rtgroup_unfixed_corruption);
4613 :
4614 0 : DECLARE_EVENT_CLASS(xfs_inode_corrupt_class,
4615 : TP_PROTO(struct xfs_inode *ip, unsigned int flags),
4616 : TP_ARGS(ip, flags),
4617 : TP_STRUCT__entry(
4618 : __field(dev_t, dev)
4619 : __field(xfs_ino_t, ino)
4620 : __field(unsigned int, flags)
4621 : ),
4622 : TP_fast_assign(
4623 : __entry->dev = ip->i_mount->m_super->s_dev;
4624 : __entry->ino = ip->i_ino;
4625 : __entry->flags = flags;
4626 : ),
4627 : TP_printk("dev %d:%d ino 0x%llx flags 0x%x",
4628 : MAJOR(__entry->dev), MINOR(__entry->dev),
4629 : __entry->ino, __entry->flags)
4630 : );
4631 : #define DEFINE_INODE_CORRUPT_EVENT(name) \
4632 : DEFINE_EVENT(xfs_inode_corrupt_class, name, \
4633 : TP_PROTO(struct xfs_inode *ip, unsigned int flags), \
4634 : TP_ARGS(ip, flags))
4635 466 : DEFINE_INODE_CORRUPT_EVENT(xfs_inode_mark_sick);
4636 426706991 : DEFINE_INODE_CORRUPT_EVENT(xfs_inode_mark_healthy);
4637 0 : DEFINE_INODE_CORRUPT_EVENT(xfs_inode_unfixed_corruption);
4638 :
4639 0 : DECLARE_EVENT_CLASS(xfs_ag_noalloc_class,
4640 : TP_PROTO(struct xfs_perag *pag),
4641 : TP_ARGS(pag),
4642 : TP_STRUCT__entry(
4643 : __field(dev_t, dev)
4644 : __field(xfs_agnumber_t, agno)
4645 : __field(xfs_extlen_t, freeblks)
4646 : __field(xfs_extlen_t, flcount)
4647 : __field(xfs_extlen_t, btreeblks)
4648 : __field(xfs_extlen_t, meta_resv)
4649 : __field(xfs_extlen_t, rmap_resv)
4650 :
4651 : __field(unsigned long long, resblks)
4652 : __field(unsigned long long, resblks_avail)
4653 : ),
4654 : TP_fast_assign(
4655 : __entry->dev = pag->pag_mount->m_super->s_dev;
4656 : __entry->agno = pag->pag_agno;
4657 : __entry->freeblks = pag->pagf_freeblks;
4658 : __entry->flcount = pag->pagf_flcount;
4659 : __entry->btreeblks = pag->pagf_btreeblks;
4660 : __entry->meta_resv = pag->pag_meta_resv.ar_reserved;
4661 : __entry->rmap_resv = pag->pag_rmapbt_resv.ar_orig_reserved;
4662 :
4663 : __entry->resblks = pag->pag_mount->m_resblks;
4664 : __entry->resblks_avail = pag->pag_mount->m_resblks_avail;
4665 : ),
4666 : TP_printk("dev %d:%d agno 0x%x freeblks %u flcount %u btreeblks %u metaresv %u rmapresv %u resblks %llu resblks_avail %llu",
4667 : MAJOR(__entry->dev), MINOR(__entry->dev),
4668 : __entry->agno,
4669 : __entry->freeblks,
4670 : __entry->flcount,
4671 : __entry->btreeblks,
4672 : __entry->meta_resv,
4673 : __entry->rmap_resv,
4674 : __entry->resblks,
4675 : __entry->resblks_avail)
4676 : );
4677 : #define DEFINE_AG_NOALLOC_EVENT(name) \
4678 : DEFINE_EVENT(xfs_ag_noalloc_class, name, \
4679 : TP_PROTO(struct xfs_perag *pag), \
4680 : TP_ARGS(pag))
4681 :
4682 0 : DEFINE_AG_NOALLOC_EVENT(xfs_ag_set_noalloc);
4683 0 : DEFINE_AG_NOALLOC_EVENT(xfs_ag_clear_noalloc);
4684 :
4685 0 : TRACE_EVENT(xfs_iwalk_ag,
4686 : TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
4687 : xfs_agino_t startino),
4688 : TP_ARGS(mp, agno, startino),
4689 : TP_STRUCT__entry(
4690 : __field(dev_t, dev)
4691 : __field(xfs_agnumber_t, agno)
4692 : __field(xfs_agino_t, startino)
4693 : ),
4694 : TP_fast_assign(
4695 : __entry->dev = mp->m_super->s_dev;
4696 : __entry->agno = agno;
4697 : __entry->startino = startino;
4698 : ),
4699 : TP_printk("dev %d:%d agno 0x%x startino 0x%x",
4700 : MAJOR(__entry->dev), MINOR(__entry->dev), __entry->agno,
4701 : __entry->startino)
4702 : )
4703 :
4704 1881949818 : TRACE_EVENT(xfs_iwalk_ag_rec,
4705 : TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
4706 : struct xfs_inobt_rec_incore *irec),
4707 : TP_ARGS(mp, agno, irec),
4708 : TP_STRUCT__entry(
4709 : __field(dev_t, dev)
4710 : __field(xfs_agnumber_t, agno)
4711 : __field(xfs_agino_t, startino)
4712 : __field(uint64_t, freemask)
4713 : ),
4714 : TP_fast_assign(
4715 : __entry->dev = mp->m_super->s_dev;
4716 : __entry->agno = agno;
4717 : __entry->startino = irec->ir_startino;
4718 : __entry->freemask = irec->ir_free;
4719 : ),
4720 : TP_printk("dev %d:%d agno 0x%x startino 0x%x freemask 0x%llx",
4721 : MAJOR(__entry->dev), MINOR(__entry->dev), __entry->agno,
4722 : __entry->startino, __entry->freemask)
4723 : )
4724 :
4725 3065 : TRACE_EVENT(xfs_pwork_init,
4726 : TP_PROTO(struct xfs_mount *mp, unsigned int nr_threads, pid_t pid),
4727 : TP_ARGS(mp, nr_threads, pid),
4728 : TP_STRUCT__entry(
4729 : __field(dev_t, dev)
4730 : __field(unsigned int, nr_threads)
4731 : __field(pid_t, pid)
4732 : ),
4733 : TP_fast_assign(
4734 : __entry->dev = mp->m_super->s_dev;
4735 : __entry->nr_threads = nr_threads;
4736 : __entry->pid = pid;
4737 : ),
4738 : TP_printk("dev %d:%d nr_threads %u pid %u",
4739 : MAJOR(__entry->dev), MINOR(__entry->dev),
4740 : __entry->nr_threads, __entry->pid)
4741 : )
4742 :
4743 0 : DECLARE_EVENT_CLASS(xfs_kmem_class,
4744 : TP_PROTO(ssize_t size, int flags, unsigned long caller_ip),
4745 : TP_ARGS(size, flags, caller_ip),
4746 : TP_STRUCT__entry(
4747 : __field(ssize_t, size)
4748 : __field(int, flags)
4749 : __field(unsigned long, caller_ip)
4750 : ),
4751 : TP_fast_assign(
4752 : __entry->size = size;
4753 : __entry->flags = flags;
4754 : __entry->caller_ip = caller_ip;
4755 : ),
4756 : TP_printk("size %zd flags 0x%x caller %pS",
4757 : __entry->size,
4758 : __entry->flags,
4759 : (char *)__entry->caller_ip)
4760 : )
4761 :
4762 : #define DEFINE_KMEM_EVENT(name) \
4763 : DEFINE_EVENT(xfs_kmem_class, name, \
4764 : TP_PROTO(ssize_t size, int flags, unsigned long caller_ip), \
4765 : TP_ARGS(size, flags, caller_ip))
4766 2553575669 : DEFINE_KMEM_EVENT(kmem_alloc);
4767 :
4768 14 : TRACE_EVENT(xfs_check_new_dalign,
4769 : TP_PROTO(struct xfs_mount *mp, int new_dalign, xfs_ino_t calc_rootino),
4770 : TP_ARGS(mp, new_dalign, calc_rootino),
4771 : TP_STRUCT__entry(
4772 : __field(dev_t, dev)
4773 : __field(int, new_dalign)
4774 : __field(xfs_ino_t, sb_rootino)
4775 : __field(xfs_ino_t, calc_rootino)
4776 : ),
4777 : TP_fast_assign(
4778 : __entry->dev = mp->m_super->s_dev;
4779 : __entry->new_dalign = new_dalign;
4780 : __entry->sb_rootino = mp->m_sb.sb_rootino;
4781 : __entry->calc_rootino = calc_rootino;
4782 : ),
4783 : TP_printk("dev %d:%d new_dalign %d sb_rootino 0x%llx calc_rootino 0x%llx",
4784 : MAJOR(__entry->dev), MINOR(__entry->dev),
4785 : __entry->new_dalign, __entry->sb_rootino,
4786 : __entry->calc_rootino)
4787 : )
4788 :
4789 347872 : TRACE_EVENT(xfs_btree_commit_afakeroot,
4790 : TP_PROTO(struct xfs_btree_cur *cur),
4791 : TP_ARGS(cur),
4792 : TP_STRUCT__entry(
4793 : __field(dev_t, dev)
4794 : __field(xfs_btnum_t, btnum)
4795 : __field(xfs_agnumber_t, agno)
4796 : __field(xfs_agblock_t, agbno)
4797 : __field(unsigned int, levels)
4798 : __field(unsigned int, blocks)
4799 : ),
4800 : TP_fast_assign(
4801 : __entry->dev = cur->bc_mp->m_super->s_dev;
4802 : __entry->btnum = cur->bc_btnum;
4803 : __entry->agno = cur->bc_ag.pag->pag_agno;
4804 : __entry->agbno = cur->bc_ag.afake->af_root;
4805 : __entry->levels = cur->bc_ag.afake->af_levels;
4806 : __entry->blocks = cur->bc_ag.afake->af_blocks;
4807 : ),
4808 : TP_printk("dev %d:%d btree %s agno 0x%x levels %u blocks %u root %u",
4809 : MAJOR(__entry->dev), MINOR(__entry->dev),
4810 : __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
4811 : __entry->agno,
4812 : __entry->levels,
4813 : __entry->blocks,
4814 : __entry->agbno)
4815 : )
4816 :
4817 151800 : TRACE_EVENT(xfs_btree_commit_ifakeroot,
4818 : TP_PROTO(struct xfs_btree_cur *cur),
4819 : TP_ARGS(cur),
4820 : TP_STRUCT__entry(
4821 : __field(dev_t, dev)
4822 : __field(xfs_btnum_t, btnum)
4823 : __field(xfs_agnumber_t, agno)
4824 : __field(xfs_agino_t, agino)
4825 : __field(unsigned int, levels)
4826 : __field(unsigned int, blocks)
4827 : __field(int, whichfork)
4828 : ),
4829 : TP_fast_assign(
4830 : __entry->dev = cur->bc_mp->m_super->s_dev;
4831 : __entry->btnum = cur->bc_btnum;
4832 : __entry->agno = XFS_INO_TO_AGNO(cur->bc_mp,
4833 : cur->bc_ino.ip->i_ino);
4834 : __entry->agino = XFS_INO_TO_AGINO(cur->bc_mp,
4835 : cur->bc_ino.ip->i_ino);
4836 : __entry->levels = cur->bc_ino.ifake->if_levels;
4837 : __entry->blocks = cur->bc_ino.ifake->if_blocks;
4838 : __entry->whichfork = cur->bc_ino.whichfork;
4839 : ),
4840 : TP_printk("dev %d:%d btree %s agno 0x%x agino 0x%x whichfork %s levels %u blocks %u",
4841 : MAJOR(__entry->dev), MINOR(__entry->dev),
4842 : __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
4843 : __entry->agno,
4844 : __entry->agino,
4845 : __print_symbolic(__entry->whichfork, XFS_WHICHFORK_STRINGS),
4846 : __entry->levels,
4847 : __entry->blocks)
4848 : )
4849 :
4850 1061978 : TRACE_EVENT(xfs_btree_bload_level_geometry,
4851 : TP_PROTO(struct xfs_btree_cur *cur, unsigned int level,
4852 : uint64_t nr_this_level, unsigned int nr_per_block,
4853 : unsigned int desired_npb, uint64_t blocks,
4854 : uint64_t blocks_with_extra),
4855 : TP_ARGS(cur, level, nr_this_level, nr_per_block, desired_npb, blocks,
4856 : blocks_with_extra),
4857 : TP_STRUCT__entry(
4858 : __field(dev_t, dev)
4859 : __field(xfs_btnum_t, btnum)
4860 : __field(unsigned int, level)
4861 : __field(unsigned int, nlevels)
4862 : __field(uint64_t, nr_this_level)
4863 : __field(unsigned int, nr_per_block)
4864 : __field(unsigned int, desired_npb)
4865 : __field(unsigned long long, blocks)
4866 : __field(unsigned long long, blocks_with_extra)
4867 : ),
4868 : TP_fast_assign(
4869 : __entry->dev = cur->bc_mp->m_super->s_dev;
4870 : __entry->btnum = cur->bc_btnum;
4871 : __entry->level = level;
4872 : __entry->nlevels = cur->bc_nlevels;
4873 : __entry->nr_this_level = nr_this_level;
4874 : __entry->nr_per_block = nr_per_block;
4875 : __entry->desired_npb = desired_npb;
4876 : __entry->blocks = blocks;
4877 : __entry->blocks_with_extra = blocks_with_extra;
4878 : ),
4879 : TP_printk("dev %d:%d btree %s level %u/%u nr_this_level %llu nr_per_block %u desired_npb %u blocks %llu blocks_with_extra %llu",
4880 : MAJOR(__entry->dev), MINOR(__entry->dev),
4881 : __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
4882 : __entry->level,
4883 : __entry->nlevels,
4884 : __entry->nr_this_level,
4885 : __entry->nr_per_block,
4886 : __entry->desired_npb,
4887 : __entry->blocks,
4888 : __entry->blocks_with_extra)
4889 : )
4890 :
4891 1240975 : TRACE_EVENT(xfs_btree_bload_block,
4892 : TP_PROTO(struct xfs_btree_cur *cur, unsigned int level,
4893 : uint64_t block_idx, uint64_t nr_blocks,
4894 : union xfs_btree_ptr *ptr, unsigned int nr_records),
4895 : TP_ARGS(cur, level, block_idx, nr_blocks, ptr, nr_records),
4896 : TP_STRUCT__entry(
4897 : __field(dev_t, dev)
4898 : __field(xfs_btnum_t, btnum)
4899 : __field(unsigned int, level)
4900 : __field(unsigned long long, block_idx)
4901 : __field(unsigned long long, nr_blocks)
4902 : __field(xfs_agnumber_t, agno)
4903 : __field(xfs_agblock_t, agbno)
4904 : __field(unsigned int, nr_records)
4905 : ),
4906 : TP_fast_assign(
4907 : __entry->dev = cur->bc_mp->m_super->s_dev;
4908 : __entry->btnum = cur->bc_btnum;
4909 : __entry->level = level;
4910 : __entry->block_idx = block_idx;
4911 : __entry->nr_blocks = nr_blocks;
4912 : if (cur->bc_flags & XFS_BTREE_LONG_PTRS) {
4913 : xfs_fsblock_t fsb = be64_to_cpu(ptr->l);
4914 :
4915 : __entry->agno = XFS_FSB_TO_AGNO(cur->bc_mp, fsb);
4916 : __entry->agbno = XFS_FSB_TO_AGBNO(cur->bc_mp, fsb);
4917 : } else {
4918 : __entry->agno = cur->bc_ag.pag->pag_agno;
4919 : __entry->agbno = be32_to_cpu(ptr->s);
4920 : }
4921 : __entry->nr_records = nr_records;
4922 : ),
4923 : TP_printk("dev %d:%d btree %s level %u block %llu/%llu agno 0x%x agbno 0x%x recs %u",
4924 : MAJOR(__entry->dev), MINOR(__entry->dev),
4925 : __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS),
4926 : __entry->level,
4927 : __entry->block_idx,
4928 : __entry->nr_blocks,
4929 : __entry->agno,
4930 : __entry->agbno,
4931 : __entry->nr_records)
4932 : )
4933 :
4934 0 : DECLARE_EVENT_CLASS(xfs_timestamp_range_class,
4935 : TP_PROTO(struct xfs_mount *mp, time64_t min, time64_t max),
4936 : TP_ARGS(mp, min, max),
4937 : TP_STRUCT__entry(
4938 : __field(dev_t, dev)
4939 : __field(long long, min)
4940 : __field(long long, max)
4941 : ),
4942 : TP_fast_assign(
4943 : __entry->dev = mp->m_super->s_dev;
4944 : __entry->min = min;
4945 : __entry->max = max;
4946 : ),
4947 : TP_printk("dev %d:%d min %lld max %lld",
4948 : MAJOR(__entry->dev), MINOR(__entry->dev),
4949 : __entry->min,
4950 : __entry->max)
4951 : )
4952 :
4953 : #define DEFINE_TIMESTAMP_RANGE_EVENT(name) \
4954 : DEFINE_EVENT(xfs_timestamp_range_class, name, \
4955 : TP_PROTO(struct xfs_mount *mp, long long min, long long max), \
4956 : TP_ARGS(mp, min, max))
4957 24343 : DEFINE_TIMESTAMP_RANGE_EVENT(xfs_inode_timestamp_range);
4958 22302 : DEFINE_TIMESTAMP_RANGE_EVENT(xfs_quota_expiry_range);
4959 :
4960 0 : DECLARE_EVENT_CLASS(xfs_icwalk_class,
4961 : TP_PROTO(struct xfs_mount *mp, struct xfs_icwalk *icw,
4962 : unsigned long caller_ip),
4963 : TP_ARGS(mp, icw, caller_ip),
4964 : TP_STRUCT__entry(
4965 : __field(dev_t, dev)
4966 : __field(__u32, flags)
4967 : __field(uint32_t, uid)
4968 : __field(uint32_t, gid)
4969 : __field(prid_t, prid)
4970 : __field(__u64, min_file_size)
4971 : __field(long, scan_limit)
4972 : __field(unsigned long, caller_ip)
4973 : ),
4974 : TP_fast_assign(
4975 : __entry->dev = mp->m_super->s_dev;
4976 : __entry->flags = icw ? icw->icw_flags : 0;
4977 : __entry->uid = icw ? from_kuid(mp->m_super->s_user_ns,
4978 : icw->icw_uid) : 0;
4979 : __entry->gid = icw ? from_kgid(mp->m_super->s_user_ns,
4980 : icw->icw_gid) : 0;
4981 : __entry->prid = icw ? icw->icw_prid : 0;
4982 : __entry->min_file_size = icw ? icw->icw_min_file_size : 0;
4983 : __entry->scan_limit = icw ? icw->icw_scan_limit : 0;
4984 : __entry->caller_ip = caller_ip;
4985 : ),
4986 : TP_printk("dev %d:%d flags 0x%x uid %u gid %u prid %u minsize %llu scan_limit %ld caller %pS",
4987 : MAJOR(__entry->dev), MINOR(__entry->dev),
4988 : __entry->flags,
4989 : __entry->uid,
4990 : __entry->gid,
4991 : __entry->prid,
4992 : __entry->min_file_size,
4993 : __entry->scan_limit,
4994 : (char *)__entry->caller_ip)
4995 : );
4996 : #define DEFINE_ICWALK_EVENT(name) \
4997 : DEFINE_EVENT(xfs_icwalk_class, name, \
4998 : TP_PROTO(struct xfs_mount *mp, struct xfs_icwalk *icw, \
4999 : unsigned long caller_ip), \
5000 : TP_ARGS(mp, icw, caller_ip))
5001 0 : DEFINE_ICWALK_EVENT(xfs_ioc_free_eofblocks);
5002 436559 : DEFINE_ICWALK_EVENT(xfs_blockgc_free_space);
5003 :
5004 : TRACE_DEFINE_ENUM(XLOG_STATE_ACTIVE);
5005 : TRACE_DEFINE_ENUM(XLOG_STATE_WANT_SYNC);
5006 : TRACE_DEFINE_ENUM(XLOG_STATE_SYNCING);
5007 : TRACE_DEFINE_ENUM(XLOG_STATE_DONE_SYNC);
5008 : TRACE_DEFINE_ENUM(XLOG_STATE_CALLBACK);
5009 : TRACE_DEFINE_ENUM(XLOG_STATE_DIRTY);
5010 :
5011 0 : DECLARE_EVENT_CLASS(xlog_iclog_class,
5012 : TP_PROTO(struct xlog_in_core *iclog, unsigned long caller_ip),
5013 : TP_ARGS(iclog, caller_ip),
5014 : TP_STRUCT__entry(
5015 : __field(dev_t, dev)
5016 : __field(uint32_t, state)
5017 : __field(int32_t, refcount)
5018 : __field(uint32_t, offset)
5019 : __field(uint32_t, flags)
5020 : __field(unsigned long long, lsn)
5021 : __field(unsigned long, caller_ip)
5022 : ),
5023 : TP_fast_assign(
5024 : __entry->dev = iclog->ic_log->l_mp->m_super->s_dev;
5025 : __entry->state = iclog->ic_state;
5026 : __entry->refcount = atomic_read(&iclog->ic_refcnt);
5027 : __entry->offset = iclog->ic_offset;
5028 : __entry->flags = iclog->ic_flags;
5029 : __entry->lsn = be64_to_cpu(iclog->ic_header.h_lsn);
5030 : __entry->caller_ip = caller_ip;
5031 : ),
5032 : TP_printk("dev %d:%d state %s refcnt %d offset %u lsn 0x%llx flags %s caller %pS",
5033 : MAJOR(__entry->dev), MINOR(__entry->dev),
5034 : __print_symbolic(__entry->state, XLOG_STATE_STRINGS),
5035 : __entry->refcount,
5036 : __entry->offset,
5037 : __entry->lsn,
5038 : __print_flags(__entry->flags, "|", XLOG_ICL_STRINGS),
5039 : (char *)__entry->caller_ip)
5040 :
5041 : );
5042 :
5043 : #define DEFINE_ICLOG_EVENT(name) \
5044 : DEFINE_EVENT(xlog_iclog_class, name, \
5045 : TP_PROTO(struct xlog_in_core *iclog, unsigned long caller_ip), \
5046 : TP_ARGS(iclog, caller_ip))
5047 :
5048 32313715 : DEFINE_ICLOG_EVENT(xlog_iclog_activate);
5049 32313715 : DEFINE_ICLOG_EVENT(xlog_iclog_clean);
5050 32313715 : DEFINE_ICLOG_EVENT(xlog_iclog_callback);
5051 32313715 : DEFINE_ICLOG_EVENT(xlog_iclog_callbacks_start);
5052 32313715 : DEFINE_ICLOG_EVENT(xlog_iclog_callbacks_done);
5053 3168844 : DEFINE_ICLOG_EVENT(xlog_iclog_force);
5054 3141508 : DEFINE_ICLOG_EVENT(xlog_iclog_force_lsn);
5055 36291967 : DEFINE_ICLOG_EVENT(xlog_iclog_get_space);
5056 42981865 : DEFINE_ICLOG_EVENT(xlog_iclog_release);
5057 32324679 : DEFINE_ICLOG_EVENT(xlog_iclog_switch);
5058 32324237 : DEFINE_ICLOG_EVENT(xlog_iclog_sync);
5059 32324235 : DEFINE_ICLOG_EVENT(xlog_iclog_syncing);
5060 32324238 : DEFINE_ICLOG_EVENT(xlog_iclog_sync_done);
5061 0 : DEFINE_ICLOG_EVENT(xlog_iclog_want_sync);
5062 7958258 : DEFINE_ICLOG_EVENT(xlog_iclog_wait_on);
5063 32324184 : DEFINE_ICLOG_EVENT(xlog_iclog_write);
5064 :
5065 : TRACE_DEFINE_ENUM(XFS_DAS_UNINIT);
5066 : TRACE_DEFINE_ENUM(XFS_DAS_SF_ADD);
5067 : TRACE_DEFINE_ENUM(XFS_DAS_SF_REMOVE);
5068 : TRACE_DEFINE_ENUM(XFS_DAS_LEAF_ADD);
5069 : TRACE_DEFINE_ENUM(XFS_DAS_LEAF_REMOVE);
5070 : TRACE_DEFINE_ENUM(XFS_DAS_NODE_ADD);
5071 : TRACE_DEFINE_ENUM(XFS_DAS_NODE_REMOVE);
5072 : TRACE_DEFINE_ENUM(XFS_DAS_LEAF_SET_RMT);
5073 : TRACE_DEFINE_ENUM(XFS_DAS_LEAF_ALLOC_RMT);
5074 : TRACE_DEFINE_ENUM(XFS_DAS_LEAF_REPLACE);
5075 : TRACE_DEFINE_ENUM(XFS_DAS_LEAF_REMOVE_OLD);
5076 : TRACE_DEFINE_ENUM(XFS_DAS_LEAF_REMOVE_RMT);
5077 : TRACE_DEFINE_ENUM(XFS_DAS_LEAF_REMOVE_ATTR);
5078 : TRACE_DEFINE_ENUM(XFS_DAS_NODE_SET_RMT);
5079 : TRACE_DEFINE_ENUM(XFS_DAS_NODE_ALLOC_RMT);
5080 : TRACE_DEFINE_ENUM(XFS_DAS_NODE_REPLACE);
5081 : TRACE_DEFINE_ENUM(XFS_DAS_NODE_REMOVE_OLD);
5082 : TRACE_DEFINE_ENUM(XFS_DAS_NODE_REMOVE_RMT);
5083 : TRACE_DEFINE_ENUM(XFS_DAS_NODE_REMOVE_ATTR);
5084 : TRACE_DEFINE_ENUM(XFS_DAS_DONE);
5085 :
5086 0 : DECLARE_EVENT_CLASS(xfs_das_state_class,
5087 : TP_PROTO(int das, struct xfs_inode *ip),
5088 : TP_ARGS(das, ip),
5089 : TP_STRUCT__entry(
5090 : __field(int, das)
5091 : __field(xfs_ino_t, ino)
5092 : ),
5093 : TP_fast_assign(
5094 : __entry->das = das;
5095 : __entry->ino = ip->i_ino;
5096 : ),
5097 : TP_printk("state change %s ino 0x%llx",
5098 : __print_symbolic(__entry->das, XFS_DAS_STRINGS),
5099 : __entry->ino)
5100 : )
5101 :
5102 : #define DEFINE_DAS_STATE_EVENT(name) \
5103 : DEFINE_EVENT(xfs_das_state_class, name, \
5104 : TP_PROTO(int das, struct xfs_inode *ip), \
5105 : TP_ARGS(das, ip))
5106 164738311 : DEFINE_DAS_STATE_EVENT(xfs_attr_sf_addname_return);
5107 224355304 : DEFINE_DAS_STATE_EVENT(xfs_attr_set_iter_return);
5108 151846292 : DEFINE_DAS_STATE_EVENT(xfs_attr_leaf_addname_return);
5109 3219848 : DEFINE_DAS_STATE_EVENT(xfs_attr_node_addname_return);
5110 0 : DEFINE_DAS_STATE_EVENT(xfs_attr_remove_iter_return);
5111 585 : DEFINE_DAS_STATE_EVENT(xfs_attr_rmtval_alloc);
5112 0 : DEFINE_DAS_STATE_EVENT(xfs_attr_rmtval_remove_return);
5113 220857207 : DEFINE_DAS_STATE_EVENT(xfs_attr_defer_add);
5114 90268956 : DEFINE_DAS_STATE_EVENT(xfs_attr_defer_replace);
5115 109319424 : DEFINE_DAS_STATE_EVENT(xfs_attr_defer_remove);
5116 :
5117 :
5118 7523 : TRACE_EVENT(xfs_force_shutdown,
5119 : TP_PROTO(struct xfs_mount *mp, int ptag, int flags, const char *fname,
5120 : int line_num),
5121 : TP_ARGS(mp, ptag, flags, fname, line_num),
5122 : TP_STRUCT__entry(
5123 : __field(dev_t, dev)
5124 : __field(int, ptag)
5125 : __field(int, flags)
5126 : __string(fname, fname)
5127 : __field(int, line_num)
5128 : ),
5129 : TP_fast_assign(
5130 : __entry->dev = mp->m_super->s_dev;
5131 : __entry->ptag = ptag;
5132 : __entry->flags = flags;
5133 : __assign_str(fname, fname);
5134 : __entry->line_num = line_num;
5135 : ),
5136 : TP_printk("dev %d:%d tag %s flags %s file %s line_num %d",
5137 : MAJOR(__entry->dev), MINOR(__entry->dev),
5138 : __print_flags(__entry->ptag, "|", XFS_PTAG_STRINGS),
5139 : __print_flags(__entry->flags, "|", XFS_SHUTDOWN_STRINGS),
5140 : __get_str(fname),
5141 : __entry->line_num)
5142 : );
5143 :
5144 : #ifdef CONFIG_XFS_DRAIN_INTENTS
5145 0 : DECLARE_EVENT_CLASS(xfs_perag_intents_class,
5146 : TP_PROTO(struct xfs_perag *pag, void *caller_ip),
5147 : TP_ARGS(pag, caller_ip),
5148 : TP_STRUCT__entry(
5149 : __field(dev_t, dev)
5150 : __field(xfs_agnumber_t, agno)
5151 : __field(long, nr_intents)
5152 : __field(void *, caller_ip)
5153 : ),
5154 : TP_fast_assign(
5155 : __entry->dev = pag->pag_mount->m_super->s_dev;
5156 : __entry->agno = pag->pag_agno;
5157 : __entry->nr_intents = atomic_read(&pag->pag_intents_drain.dr_count);
5158 : __entry->caller_ip = caller_ip;
5159 : ),
5160 : TP_printk("dev %d:%d agno 0x%x intents %ld caller %pS",
5161 : MAJOR(__entry->dev), MINOR(__entry->dev),
5162 : __entry->agno,
5163 : __entry->nr_intents,
5164 : __entry->caller_ip)
5165 : );
5166 :
5167 : #define DEFINE_PERAG_INTENTS_EVENT(name) \
5168 : DEFINE_EVENT(xfs_perag_intents_class, name, \
5169 : TP_PROTO(struct xfs_perag *pag, void *caller_ip), \
5170 : TP_ARGS(pag, caller_ip))
5171 510707056 : DEFINE_PERAG_INTENTS_EVENT(xfs_perag_intent_hold);
5172 510660165 : DEFINE_PERAG_INTENTS_EVENT(xfs_perag_intent_rele);
5173 14598 : DEFINE_PERAG_INTENTS_EVENT(xfs_perag_wait_intents);
5174 :
5175 : #ifdef CONFIG_XFS_RT
5176 0 : DECLARE_EVENT_CLASS(xfs_rtgroup_intents_class,
5177 : TP_PROTO(struct xfs_rtgroup *rtg, void *caller_ip),
5178 : TP_ARGS(rtg, caller_ip),
5179 : TP_STRUCT__entry(
5180 : __field(dev_t, dev)
5181 : __field(dev_t, rtdev)
5182 : __field(long, nr_intents)
5183 : __field(void *, caller_ip)
5184 : ),
5185 : TP_fast_assign(
5186 : __entry->dev = rtg->rtg_mount->m_super->s_dev;
5187 : __entry->rtdev = rtg->rtg_mount->m_rtdev_targp->bt_dev;
5188 : __entry->nr_intents = atomic_read(&rtg->rtg_intents_drain.dr_count);
5189 : __entry->caller_ip = caller_ip;
5190 : ),
5191 : TP_printk("dev %d:%d rtdev %d:%d intents %ld caller %pS",
5192 : MAJOR(__entry->dev), MINOR(__entry->dev),
5193 : MAJOR(__entry->rtdev), MINOR(__entry->rtdev),
5194 : __entry->nr_intents,
5195 : __entry->caller_ip)
5196 : );
5197 :
5198 : #define DEFINE_RTGROUP_INTENTS_EVENT(name) \
5199 : DEFINE_EVENT(xfs_rtgroup_intents_class, name, \
5200 : TP_PROTO(struct xfs_rtgroup *rtg, void *caller_ip), \
5201 : TP_ARGS(rtg, caller_ip))
5202 141913980 : DEFINE_RTGROUP_INTENTS_EVENT(xfs_rtgroup_intent_hold);
5203 141917085 : DEFINE_RTGROUP_INTENTS_EVENT(xfs_rtgroup_intent_rele);
5204 20712 : DEFINE_RTGROUP_INTENTS_EVENT(xfs_rtgroup_wait_intents);
5205 : #endif /* CONFIG_XFS_RT */
5206 :
5207 : #endif /* CONFIG_XFS_DRAIN_INTENTS */
5208 :
5209 668157 : TRACE_EVENT(xfs_swapext_overhead,
5210 : TP_PROTO(struct xfs_mount *mp, unsigned long long bmbt_blocks,
5211 : unsigned long long rmapbt_blocks),
5212 : TP_ARGS(mp, bmbt_blocks, rmapbt_blocks),
5213 : TP_STRUCT__entry(
5214 : __field(dev_t, dev)
5215 : __field(unsigned long long, bmbt_blocks)
5216 : __field(unsigned long long, rmapbt_blocks)
5217 : ),
5218 : TP_fast_assign(
5219 : __entry->dev = mp->m_super->s_dev;
5220 : __entry->bmbt_blocks = bmbt_blocks;
5221 : __entry->rmapbt_blocks = rmapbt_blocks;
5222 : ),
5223 : TP_printk("dev %d:%d bmbt_blocks 0x%llx rmapbt_blocks 0x%llx",
5224 : MAJOR(__entry->dev), MINOR(__entry->dev),
5225 : __entry->bmbt_blocks,
5226 : __entry->rmapbt_blocks)
5227 : );
5228 :
5229 0 : DECLARE_EVENT_CLASS(xfs_swapext_estimate_class,
5230 : TP_PROTO(const struct xfs_swapext_req *req),
5231 : TP_ARGS(req),
5232 : TP_STRUCT__entry(
5233 : __field(dev_t, dev)
5234 : __field(xfs_ino_t, ino1)
5235 : __field(xfs_ino_t, ino2)
5236 : __field(xfs_fileoff_t, startoff1)
5237 : __field(xfs_fileoff_t, startoff2)
5238 : __field(xfs_filblks_t, blockcount)
5239 : __field(int, whichfork)
5240 : __field(unsigned int, req_flags)
5241 : __field(xfs_filblks_t, ip1_bcount)
5242 : __field(xfs_filblks_t, ip2_bcount)
5243 : __field(xfs_filblks_t, ip1_rtbcount)
5244 : __field(xfs_filblks_t, ip2_rtbcount)
5245 : __field(unsigned long long, resblks)
5246 : __field(unsigned long long, nr_exchanges)
5247 : ),
5248 : TP_fast_assign(
5249 : __entry->dev = req->ip1->i_mount->m_super->s_dev;
5250 : __entry->ino1 = req->ip1->i_ino;
5251 : __entry->ino2 = req->ip2->i_ino;
5252 : __entry->startoff1 = req->startoff1;
5253 : __entry->startoff2 = req->startoff2;
5254 : __entry->blockcount = req->blockcount;
5255 : __entry->whichfork = req->whichfork;
5256 : __entry->req_flags = req->req_flags;
5257 : __entry->ip1_bcount = req->ip1_bcount;
5258 : __entry->ip2_bcount = req->ip2_bcount;
5259 : __entry->ip1_rtbcount = req->ip1_rtbcount;
5260 : __entry->ip2_rtbcount = req->ip2_rtbcount;
5261 : __entry->resblks = req->resblks;
5262 : __entry->nr_exchanges = req->nr_exchanges;
5263 : ),
5264 : TP_printk("dev %d:%d ino1 0x%llx fileoff1 0x%llx ino2 0x%llx fileoff2 0x%llx fsbcount 0x%llx flags (%s) fork %s bcount1 0x%llx rtbcount1 0x%llx bcount2 0x%llx rtbcount2 0x%llx resblks 0x%llx nr_exchanges %llu",
5265 : MAJOR(__entry->dev), MINOR(__entry->dev),
5266 : __entry->ino1, __entry->startoff1,
5267 : __entry->ino2, __entry->startoff2,
5268 : __entry->blockcount,
5269 : __print_flags(__entry->req_flags, "|", XFS_SWAP_REQ_STRINGS),
5270 : __print_symbolic(__entry->whichfork, XFS_WHICHFORK_STRINGS),
5271 : __entry->ip1_bcount,
5272 : __entry->ip1_rtbcount,
5273 : __entry->ip2_bcount,
5274 : __entry->ip2_rtbcount,
5275 : __entry->resblks,
5276 : __entry->nr_exchanges)
5277 : );
5278 :
5279 : #define DEFINE_SWAPEXT_ESTIMATE_EVENT(name) \
5280 : DEFINE_EVENT(xfs_swapext_estimate_class, name, \
5281 : TP_PROTO(const struct xfs_swapext_req *req), \
5282 : TP_ARGS(req))
5283 362350 : DEFINE_SWAPEXT_ESTIMATE_EVENT(xfs_swapext_initial_estimate);
5284 668155 : DEFINE_SWAPEXT_ESTIMATE_EVENT(xfs_swapext_final_estimate);
5285 :
5286 0 : DECLARE_EVENT_CLASS(xfs_swapext_intent_class,
5287 : TP_PROTO(struct xfs_mount *mp, const struct xfs_swapext_intent *sxi),
5288 : TP_ARGS(mp, sxi),
5289 : TP_STRUCT__entry(
5290 : __field(dev_t, dev)
5291 : __field(xfs_ino_t, ino1)
5292 : __field(xfs_ino_t, ino2)
5293 : __field(unsigned int, flags)
5294 : __field(unsigned int, opflags)
5295 : __field(xfs_fileoff_t, startoff1)
5296 : __field(xfs_fileoff_t, startoff2)
5297 : __field(xfs_filblks_t, blockcount)
5298 : __field(xfs_fsize_t, isize1)
5299 : __field(xfs_fsize_t, isize2)
5300 : __field(xfs_fsize_t, new_isize1)
5301 : __field(xfs_fsize_t, new_isize2)
5302 : ),
5303 : TP_fast_assign(
5304 : __entry->dev = mp->m_super->s_dev;
5305 : __entry->ino1 = sxi->sxi_ip1->i_ino;
5306 : __entry->ino2 = sxi->sxi_ip2->i_ino;
5307 : __entry->flags = sxi->sxi_flags;
5308 : __entry->opflags = sxi->sxi_op_flags;
5309 : __entry->startoff1 = sxi->sxi_startoff1;
5310 : __entry->startoff2 = sxi->sxi_startoff2;
5311 : __entry->blockcount = sxi->sxi_blockcount;
5312 : __entry->isize1 = sxi->sxi_ip1->i_disk_size;
5313 : __entry->isize2 = sxi->sxi_ip2->i_disk_size;
5314 : __entry->new_isize1 = sxi->sxi_isize1;
5315 : __entry->new_isize2 = sxi->sxi_isize2;
5316 : ),
5317 : TP_printk("dev %d:%d ino1 0x%llx fileoff1 0x%llx ino2 0x%llx fileoff2 0x%llx fsbcount 0x%llx flags (%s) opflags (%s) isize1 0x%llx newisize1 0x%llx isize2 0x%llx newisize2 0x%llx",
5318 : MAJOR(__entry->dev), MINOR(__entry->dev),
5319 : __entry->ino1, __entry->startoff1,
5320 : __entry->ino2, __entry->startoff2,
5321 : __entry->blockcount,
5322 : __print_flags(__entry->flags, "|", XFS_SWAP_EXT_STRINGS),
5323 : __print_flags(__entry->opflags, "|", XFS_SWAP_EXT_OP_STRINGS),
5324 : __entry->isize1, __entry->new_isize1,
5325 : __entry->isize2, __entry->new_isize2)
5326 : );
5327 :
5328 : #define DEFINE_SWAPEXT_INTENT_EVENT(name) \
5329 : DEFINE_EVENT(xfs_swapext_intent_class, name, \
5330 : TP_PROTO(struct xfs_mount *mp, const struct xfs_swapext_intent *sxi), \
5331 : TP_ARGS(mp, sxi))
5332 1270567 : DEFINE_SWAPEXT_INTENT_EVENT(xfs_swapext_defer);
5333 6 : DEFINE_SWAPEXT_INTENT_EVENT(xfs_swapext_recover);
5334 :
5335 2238874 : TRACE_EVENT(xfs_swapext_delta_nextents_step,
5336 : TP_PROTO(struct xfs_mount *mp,
5337 : const struct xfs_bmbt_irec *left,
5338 : const struct xfs_bmbt_irec *curr,
5339 : const struct xfs_bmbt_irec *new,
5340 : const struct xfs_bmbt_irec *right,
5341 : int delta, unsigned int state),
5342 : TP_ARGS(mp, left, curr, new, right, delta, state),
5343 : TP_STRUCT__entry(
5344 : __field(dev_t, dev)
5345 : __field(xfs_fileoff_t, loff)
5346 : __field(xfs_fsblock_t, lstart)
5347 : __field(xfs_filblks_t, lcount)
5348 : __field(xfs_fileoff_t, coff)
5349 : __field(xfs_fsblock_t, cstart)
5350 : __field(xfs_filblks_t, ccount)
5351 : __field(xfs_fileoff_t, noff)
5352 : __field(xfs_fsblock_t, nstart)
5353 : __field(xfs_filblks_t, ncount)
5354 : __field(xfs_fileoff_t, roff)
5355 : __field(xfs_fsblock_t, rstart)
5356 : __field(xfs_filblks_t, rcount)
5357 : __field(int, delta)
5358 : __field(unsigned int, state)
5359 : ),
5360 : TP_fast_assign(
5361 : __entry->dev = mp->m_super->s_dev;
5362 : __entry->loff = left->br_startoff;
5363 : __entry->lstart = left->br_startblock;
5364 : __entry->lcount = left->br_blockcount;
5365 : __entry->coff = curr->br_startoff;
5366 : __entry->cstart = curr->br_startblock;
5367 : __entry->ccount = curr->br_blockcount;
5368 : __entry->noff = new->br_startoff;
5369 : __entry->nstart = new->br_startblock;
5370 : __entry->ncount = new->br_blockcount;
5371 : __entry->roff = right->br_startoff;
5372 : __entry->rstart = right->br_startblock;
5373 : __entry->rcount = right->br_blockcount;
5374 : __entry->delta = delta;
5375 : __entry->state = state;
5376 : ),
5377 : TP_printk("dev %d:%d left 0x%llx:0x%llx:0x%llx; curr 0x%llx:0x%llx:0x%llx <- new 0x%llx:0x%llx:0x%llx; right 0x%llx:0x%llx:0x%llx delta %d state 0x%x",
5378 : MAJOR(__entry->dev), MINOR(__entry->dev),
5379 : __entry->loff, __entry->lstart, __entry->lcount,
5380 : __entry->coff, __entry->cstart, __entry->ccount,
5381 : __entry->noff, __entry->nstart, __entry->ncount,
5382 : __entry->roff, __entry->rstart, __entry->rcount,
5383 : __entry->delta, __entry->state)
5384 : );
5385 :
5386 362352 : TRACE_EVENT(xfs_swapext_delta_nextents,
5387 : TP_PROTO(const struct xfs_swapext_req *req, int64_t d_nexts1,
5388 : int64_t d_nexts2),
5389 : TP_ARGS(req, d_nexts1, d_nexts2),
5390 : TP_STRUCT__entry(
5391 : __field(dev_t, dev)
5392 : __field(xfs_ino_t, ino1)
5393 : __field(xfs_ino_t, ino2)
5394 : __field(xfs_extnum_t, nexts1)
5395 : __field(xfs_extnum_t, nexts2)
5396 : __field(int64_t, d_nexts1)
5397 : __field(int64_t, d_nexts2)
5398 : ),
5399 : TP_fast_assign(
5400 : __entry->dev = req->ip1->i_mount->m_super->s_dev;
5401 : __entry->ino1 = req->ip1->i_ino;
5402 : __entry->ino2 = req->ip2->i_ino;
5403 : __entry->nexts1 = xfs_ifork_ptr(req->ip1, req->whichfork)->if_nextents;
5404 : __entry->nexts2 = xfs_ifork_ptr(req->ip2, req->whichfork)->if_nextents;
5405 : __entry->d_nexts1 = d_nexts1;
5406 : __entry->d_nexts2 = d_nexts2;
5407 : ),
5408 : TP_printk("dev %d:%d ino1 0x%llx nexts %llu ino2 0x%llx nexts %llu delta1 %lld delta2 %lld",
5409 : MAJOR(__entry->dev), MINOR(__entry->dev),
5410 : __entry->ino1, __entry->nexts1,
5411 : __entry->ino2, __entry->nexts2,
5412 : __entry->d_nexts1, __entry->d_nexts2)
5413 : );
5414 :
5415 34472010 : TRACE_EVENT(xfs_getparent_listent,
5416 : TP_PROTO(struct xfs_inode *ip, const struct xfs_getparents *ppi,
5417 : const struct xfs_parent_name_irec *irec),
5418 : TP_ARGS(ip, ppi, irec),
5419 : TP_STRUCT__entry(
5420 : __field(dev_t, dev)
5421 : __field(xfs_ino_t, ino)
5422 : __field(unsigned int, count)
5423 : __field(unsigned int, bufsize)
5424 : __field(xfs_ino_t, parent_ino)
5425 : __field(unsigned int, parent_gen)
5426 : __field(unsigned int, namelen)
5427 : __dynamic_array(char, name, irec->p_namelen)
5428 : ),
5429 : TP_fast_assign(
5430 : __entry->dev = ip->i_mount->m_super->s_dev;
5431 : __entry->ino = ip->i_ino;
5432 : __entry->count = ppi->gp_count;
5433 : __entry->bufsize = ppi->gp_bufsize;
5434 : __entry->parent_ino = irec->p_ino;
5435 : __entry->parent_gen = irec->p_gen;
5436 : __entry->namelen = irec->p_namelen;
5437 : memcpy(__get_str(name), irec->p_name, irec->p_namelen);
5438 : ),
5439 : TP_printk("dev %d:%d ino 0x%llx bufsize %u count %u: parent_ino 0x%llx parent_gen 0x%x name '%.*s'",
5440 : MAJOR(__entry->dev), MINOR(__entry->dev),
5441 : __entry->ino,
5442 : __entry->bufsize,
5443 : __entry->count,
5444 : __entry->parent_ino,
5445 : __entry->parent_gen,
5446 : __entry->namelen,
5447 : __get_str(name))
5448 : );
5449 :
5450 36269620 : TRACE_EVENT(xfs_getparent_pointers,
5451 : TP_PROTO(struct xfs_inode *ip, const struct xfs_getparents *ppi,
5452 : const struct xfs_attrlist_cursor_kern *cur),
5453 : TP_ARGS(ip, ppi, cur),
5454 : TP_STRUCT__entry(
5455 : __field(dev_t, dev)
5456 : __field(xfs_ino_t, ino)
5457 : __field(unsigned int, flags)
5458 : __field(unsigned int, bufsize)
5459 : __field(unsigned int, hashval)
5460 : __field(unsigned int, blkno)
5461 : __field(unsigned int, offset)
5462 : __field(int, initted)
5463 : ),
5464 : TP_fast_assign(
5465 : __entry->dev = ip->i_mount->m_super->s_dev;
5466 : __entry->ino = ip->i_ino;
5467 : __entry->flags = ppi->gp_flags;
5468 : __entry->bufsize = ppi->gp_bufsize;
5469 : __entry->hashval = cur->hashval;
5470 : __entry->blkno = cur->blkno;
5471 : __entry->offset = cur->offset;
5472 : __entry->initted = cur->initted;
5473 : ),
5474 : TP_printk("dev %d:%d ino 0x%llx flags 0x%x bufsize %u cur_init? %d hashval 0x%x blkno %u offset %u",
5475 : MAJOR(__entry->dev), MINOR(__entry->dev),
5476 : __entry->ino,
5477 : __entry->flags,
5478 : __entry->bufsize,
5479 : __entry->initted,
5480 : __entry->hashval,
5481 : __entry->blkno,
5482 : __entry->offset)
5483 : );
5484 :
5485 0 : DECLARE_EVENT_CLASS(xfs_imeta_sb_class,
5486 : TP_PROTO(struct xfs_mount *mp, xfs_ino_t *sb_inop),
5487 : TP_ARGS(mp, sb_inop),
5488 : TP_STRUCT__entry(
5489 : __field(dev_t, dev)
5490 : __field(unsigned int, sb_offset)
5491 : __field(xfs_ino_t, ino)
5492 : ),
5493 : TP_fast_assign(
5494 : __entry->dev = mp->m_super->s_dev;
5495 : __entry->sb_offset = (char *)sb_inop - (char *)&mp->m_sb;
5496 : __entry->ino = *sb_inop;
5497 : ),
5498 : TP_printk("dev %d:%d sb_offset 0x%x ino 0x%llx",
5499 : MAJOR(__entry->dev), MINOR(__entry->dev),
5500 : __entry->sb_offset,
5501 : __entry->ino)
5502 : )
5503 :
5504 : #define DEFINE_IMETA_SB_EVENT(name) \
5505 : DEFINE_EVENT(xfs_imeta_sb_class, name, \
5506 : TP_PROTO(struct xfs_mount *mp, xfs_ino_t *sb_inop), \
5507 : TP_ARGS(mp, sb_inop))
5508 0 : DEFINE_IMETA_SB_EVENT(xfs_imeta_sb_lookup);
5509 :
5510 0 : DECLARE_EVENT_CLASS(xfs_imeta_update_class,
5511 : TP_PROTO(const struct xfs_imeta_update *upd),
5512 : TP_ARGS(upd),
5513 : TP_STRUCT__entry(
5514 : __field(dev_t, dev)
5515 : __field(xfs_ino_t, dp_ino)
5516 : __field(xfs_ino_t, ino)
5517 : __string(fname, xfs_imeta_lastpath(upd))
5518 : ),
5519 : TP_fast_assign(
5520 : __entry->dev = upd->mp->m_super->s_dev;
5521 : __entry->dp_ino = upd->dp ? upd->dp->i_ino : NULLFSINO;
5522 : __entry->ino = upd->ip ? upd->ip->i_ino : NULLFSINO;
5523 : __assign_str(fname, xfs_imeta_lastpath(upd));
5524 : ),
5525 : TP_printk("dev %d:%d dp 0x%llx fname '%s' ino 0x%llx",
5526 : MAJOR(__entry->dev), MINOR(__entry->dev),
5527 : __entry->dp_ino,
5528 : __get_str(fname),
5529 : __entry->ino)
5530 : )
5531 :
5532 : #define DEFINE_IMETA_UPDATE_EVENT(name) \
5533 : DEFINE_EVENT(xfs_imeta_update_class, name, \
5534 : TP_PROTO(const struct xfs_imeta_update *upd), \
5535 : TP_ARGS(upd))
5536 16860 : DEFINE_IMETA_UPDATE_EVENT(xfs_imeta_start_create);
5537 0 : DEFINE_IMETA_UPDATE_EVENT(xfs_imeta_start_link);
5538 0 : DEFINE_IMETA_UPDATE_EVENT(xfs_imeta_start_unlink);
5539 11394 : DEFINE_IMETA_UPDATE_EVENT(xfs_imeta_update_commit);
5540 5468 : DEFINE_IMETA_UPDATE_EVENT(xfs_imeta_update_cancel);
5541 322 : DEFINE_IMETA_UPDATE_EVENT(xfs_imeta_sb_create);
5542 0 : DEFINE_IMETA_UPDATE_EVENT(xfs_imeta_sb_unlink);
5543 0 : DEFINE_IMETA_UPDATE_EVENT(xfs_imeta_sb_link);
5544 11070 : DEFINE_IMETA_UPDATE_EVENT(xfs_imeta_dir_try_create);
5545 11070 : DEFINE_IMETA_UPDATE_EVENT(xfs_imeta_dir_create);
5546 0 : DEFINE_IMETA_UPDATE_EVENT(xfs_imeta_dir_unlink);
5547 0 : DEFINE_IMETA_UPDATE_EVENT(xfs_imeta_dir_link);
5548 :
5549 0 : DECLARE_EVENT_CLASS(xfs_imeta_update_error_class,
5550 : TP_PROTO(const struct xfs_imeta_update *upd, int error),
5551 : TP_ARGS(upd, error),
5552 : TP_STRUCT__entry(
5553 : __field(dev_t, dev)
5554 : __field(xfs_ino_t, dp_ino)
5555 : __field(xfs_ino_t, ino)
5556 : __field(int, error)
5557 : __string(fname, xfs_imeta_lastpath(upd))
5558 : ),
5559 : TP_fast_assign(
5560 : __entry->dev = upd->mp->m_super->s_dev;
5561 : __entry->dp_ino = upd->dp ? upd->dp->i_ino : NULLFSINO;
5562 : __entry->ino = upd->ip ? upd->ip->i_ino : NULLFSINO;
5563 : __entry->error = error;
5564 : __assign_str(fname, xfs_imeta_lastpath(upd));
5565 : ),
5566 : TP_printk("dev %d:%d dp 0x%llx fname '%s' ino 0x%llx error %d",
5567 : MAJOR(__entry->dev), MINOR(__entry->dev),
5568 : __entry->dp_ino,
5569 : __get_str(fname),
5570 : __entry->ino,
5571 : __entry->error)
5572 : )
5573 :
5574 : #define DEFINE_IMETA_UPDATE_ERROR_EVENT(name) \
5575 : DEFINE_EVENT(xfs_imeta_update_error_class, name, \
5576 : TP_PROTO(const struct xfs_imeta_update *upd, int error), \
5577 : TP_ARGS(upd, error))
5578 16862 : DEFINE_IMETA_UPDATE_ERROR_EVENT(xfs_imeta_end_update);
5579 :
5580 0 : DECLARE_EVENT_CLASS(xfs_imeta_dir_class,
5581 : TP_PROTO(struct xfs_inode *dp, struct xfs_name *name,
5582 : xfs_ino_t ino),
5583 : TP_ARGS(dp, name, ino),
5584 : TP_STRUCT__entry(
5585 : __field(dev_t, dev)
5586 : __field(xfs_ino_t, dp_ino)
5587 : __field(xfs_ino_t, ino)
5588 : __field(int, ftype)
5589 : __field(int, namelen)
5590 : __dynamic_array(char, name, name->len)
5591 : ),
5592 : TP_fast_assign(
5593 : __entry->dev = VFS_I(dp)->i_sb->s_dev;
5594 : __entry->dp_ino = dp->i_ino;
5595 : __entry->ino = ino,
5596 : __entry->ftype = name->type;
5597 : __entry->namelen = name->len;
5598 : memcpy(__get_str(name), name->name, name->len);
5599 : ),
5600 : TP_printk("dev %d:%d dir 0x%llx type %s name '%.*s' ino 0x%llx",
5601 : MAJOR(__entry->dev), MINOR(__entry->dev),
5602 : __entry->dp_ino,
5603 : __print_symbolic(__entry->ftype, XFS_DIR3_FTYPE_STR),
5604 : __entry->namelen,
5605 : __get_str(name),
5606 : __entry->ino)
5607 : )
5608 :
5609 : #define DEFINE_IMETA_DIR_EVENT(name) \
5610 : DEFINE_EVENT(xfs_imeta_dir_class, name, \
5611 : TP_PROTO(struct xfs_inode *dp, struct xfs_name *name, \
5612 : xfs_ino_t ino), \
5613 : TP_ARGS(dp, name, ino))
5614 228727 : DEFINE_IMETA_DIR_EVENT(xfs_imeta_dir_lookup);
5615 :
5616 : /* metadata inode space reservations */
5617 :
5618 0 : DECLARE_EVENT_CLASS(xfs_imeta_resv_class,
5619 : TP_PROTO(struct xfs_inode *ip, xfs_filblks_t len),
5620 : TP_ARGS(ip, len),
5621 : TP_STRUCT__entry(
5622 : __field(dev_t, dev)
5623 : __field(xfs_ino_t, ino)
5624 : __field(unsigned long long, freeblks)
5625 : __field(unsigned long long, reserved)
5626 : __field(unsigned long long, asked)
5627 : __field(unsigned long long, used)
5628 : __field(unsigned long long, len)
5629 : ),
5630 : TP_fast_assign(
5631 : struct xfs_mount *mp = ip->i_mount;
5632 :
5633 : __entry->dev = mp->m_super->s_dev;
5634 : __entry->ino = ip->i_ino;
5635 : __entry->freeblks = percpu_counter_sum(&mp->m_fdblocks);
5636 : __entry->reserved = ip->i_delayed_blks;
5637 : __entry->asked = ip->i_meta_resv_asked;
5638 : __entry->used = ip->i_nblocks;
5639 : __entry->len = len;
5640 : ),
5641 : TP_printk("dev %d:%d ino 0x%llx freeblks %llu resv %llu ask %llu used %llu len %llu",
5642 : MAJOR(__entry->dev), MINOR(__entry->dev),
5643 : __entry->ino,
5644 : __entry->freeblks,
5645 : __entry->reserved,
5646 : __entry->asked,
5647 : __entry->used,
5648 : __entry->len)
5649 : )
5650 : #define DEFINE_IMETA_RESV_EVENT(name) \
5651 : DEFINE_EVENT(xfs_imeta_resv_class, name, \
5652 : TP_PROTO(struct xfs_inode *ip, xfs_filblks_t len), \
5653 : TP_ARGS(ip, len))
5654 5752 : DEFINE_IMETA_RESV_EVENT(xfs_imeta_resv_init);
5655 5792 : DEFINE_IMETA_RESV_EVENT(xfs_imeta_resv_free);
5656 162793 : DEFINE_IMETA_RESV_EVENT(xfs_imeta_resv_alloc_extent);
5657 16485 : DEFINE_IMETA_RESV_EVENT(xfs_imeta_resv_free_extent);
5658 15004973 : DEFINE_IMETA_RESV_EVENT(xfs_imeta_resv_critical);
5659 0 : DEFINE_INODE_ERROR_EVENT(xfs_imeta_resv_init_error);
5660 :
5661 : #ifdef CONFIG_XFS_RT
5662 339 : TRACE_EVENT(xfs_growfs_check_rtgeom,
5663 : TP_PROTO(const struct xfs_mount *mp, unsigned int min_logfsbs),
5664 : TP_ARGS(mp, min_logfsbs),
5665 : TP_STRUCT__entry(
5666 : __field(dev_t, dev)
5667 : __field(unsigned int, logblocks)
5668 : __field(unsigned int, min_logfsbs)
5669 : ),
5670 : TP_fast_assign(
5671 : __entry->dev = mp->m_super->s_dev;
5672 : __entry->logblocks = mp->m_sb.sb_logblocks;
5673 : __entry->min_logfsbs = min_logfsbs;
5674 : ),
5675 : TP_printk("dev %d:%d logblocks %u min_logfsbs %u",
5676 : MAJOR(__entry->dev), MINOR(__entry->dev),
5677 : __entry->logblocks,
5678 : __entry->min_logfsbs)
5679 : );
5680 : #endif /* CONFIG_XFS_RT */
5681 :
5682 : #endif /* _TRACE_XFS_H */
5683 :
5684 : #undef TRACE_INCLUDE_PATH
5685 : #define TRACE_INCLUDE_PATH .
5686 : #define TRACE_INCLUDE_FILE xfs_trace
5687 : #include <trace/define_trace.h>
|