blob: 69b9e1f1baaf911c5e38d97be2d669132042a8df [file] [log] [blame]
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001/*
2 * Copyright (c) 2009, Christoph Hellwig
3 * All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18#undef TRACE_SYSTEM
19#define TRACE_SYSTEM xfs
20
21#if !defined(_TRACE_XFS_H) || defined(TRACE_HEADER_MULTI_READ)
22#define _TRACE_XFS_H
23
24#include <linux/tracepoint.h>
25
26struct xfs_agf;
27struct xfs_alloc_arg;
28struct xfs_attr_list_context;
29struct xfs_buf_log_item;
30struct xfs_da_args;
31struct xfs_da_node_entry;
32struct xfs_dquot;
33struct xlog_ticket;
34struct log;
Dave Chinner9abbc532010-04-13 15:06:46 +100035struct xlog_recover;
36struct xlog_recover_item;
37struct xfs_buf_log_format;
38struct xfs_inode_log_format;
Christoph Hellwig0b1b2132009-12-14 23:14:59 +000039
Christoph Hellwigea9a4882009-12-21 14:03:03 +000040DECLARE_EVENT_CLASS(xfs_attr_list_class,
41 TP_PROTO(struct xfs_attr_list_context *ctx),
42 TP_ARGS(ctx),
43 TP_STRUCT__entry(
44 __field(dev_t, dev)
45 __field(xfs_ino_t, ino)
46 __field(u32, hashval)
47 __field(u32, blkno)
48 __field(u32, offset)
49 __field(void *, alist)
50 __field(int, bufsize)
51 __field(int, count)
52 __field(int, firstu)
53 __field(int, dupcnt)
54 __field(int, flags)
55 ),
56 TP_fast_assign(
57 __entry->dev = VFS_I(ctx->dp)->i_sb->s_dev;
58 __entry->ino = ctx->dp->i_ino;
59 __entry->hashval = ctx->cursor->hashval;
60 __entry->blkno = ctx->cursor->blkno;
61 __entry->offset = ctx->cursor->offset;
62 __entry->alist = ctx->alist;
63 __entry->bufsize = ctx->bufsize;
64 __entry->count = ctx->count;
65 __entry->firstu = ctx->firstu;
66 __entry->flags = ctx->flags;
67 ),
68 TP_printk("dev %d:%d ino 0x%llx cursor h/b/o 0x%x/0x%x/%u dupcnt %u "
69 "alist 0x%p size %u count %u firstu %u flags %d %s",
70 MAJOR(__entry->dev), MINOR(__entry->dev),
71 __entry->ino,
72 __entry->hashval,
73 __entry->blkno,
74 __entry->offset,
75 __entry->dupcnt,
76 __entry->alist,
77 __entry->bufsize,
78 __entry->count,
79 __entry->firstu,
80 __entry->flags,
81 __print_flags(__entry->flags, "|", XFS_ATTR_FLAGS)
82 )
Christoph Hellwig0b1b2132009-12-14 23:14:59 +000083)
Christoph Hellwigea9a4882009-12-21 14:03:03 +000084
85#define DEFINE_ATTR_LIST_EVENT(name) \
86DEFINE_EVENT(xfs_attr_list_class, name, \
87 TP_PROTO(struct xfs_attr_list_context *ctx), \
88 TP_ARGS(ctx))
Christoph Hellwig0b1b2132009-12-14 23:14:59 +000089DEFINE_ATTR_LIST_EVENT(xfs_attr_list_sf);
90DEFINE_ATTR_LIST_EVENT(xfs_attr_list_sf_all);
91DEFINE_ATTR_LIST_EVENT(xfs_attr_list_leaf);
92DEFINE_ATTR_LIST_EVENT(xfs_attr_list_leaf_end);
93DEFINE_ATTR_LIST_EVENT(xfs_attr_list_full);
94DEFINE_ATTR_LIST_EVENT(xfs_attr_list_add);
95DEFINE_ATTR_LIST_EVENT(xfs_attr_list_wrong_blk);
96DEFINE_ATTR_LIST_EVENT(xfs_attr_list_notfound);
97
Li Zefanf8adb4d2010-05-24 08:25:57 +000098DECLARE_EVENT_CLASS(xfs_perag_class,
99 TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int refcount,
100 unsigned long caller_ip),
101 TP_ARGS(mp, agno, refcount, caller_ip),
102 TP_STRUCT__entry(
103 __field(dev_t, dev)
104 __field(xfs_agnumber_t, agno)
105 __field(int, refcount)
106 __field(unsigned long, caller_ip)
107 ),
108 TP_fast_assign(
109 __entry->dev = mp->m_super->s_dev;
110 __entry->agno = agno;
111 __entry->refcount = refcount;
112 __entry->caller_ip = caller_ip;
113 ),
114 TP_printk("dev %d:%d agno %u refcount %d caller %pf",
115 MAJOR(__entry->dev), MINOR(__entry->dev),
116 __entry->agno,
117 __entry->refcount,
118 (char *)__entry->caller_ip)
119);
120
121#define DEFINE_PERAG_REF_EVENT(name) \
122DEFINE_EVENT(xfs_perag_class, name, \
123 TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int refcount, \
124 unsigned long caller_ip), \
125 TP_ARGS(mp, agno, refcount, caller_ip))
126DEFINE_PERAG_REF_EVENT(xfs_perag_get);
Dave Chinner65d0f202010-09-24 18:40:15 +1000127DEFINE_PERAG_REF_EVENT(xfs_perag_get_tag);
Li Zefanf8adb4d2010-05-24 08:25:57 +0000128DEFINE_PERAG_REF_EVENT(xfs_perag_put);
Dave Chinner16fd5362010-07-20 09:43:39 +1000129DEFINE_PERAG_REF_EVENT(xfs_perag_set_reclaim);
130DEFINE_PERAG_REF_EVENT(xfs_perag_clear_reclaim);
Li Zefanf8adb4d2010-05-24 08:25:57 +0000131
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000132TRACE_EVENT(xfs_attr_list_node_descend,
133 TP_PROTO(struct xfs_attr_list_context *ctx,
134 struct xfs_da_node_entry *btree),
135 TP_ARGS(ctx, btree),
136 TP_STRUCT__entry(
137 __field(dev_t, dev)
138 __field(xfs_ino_t, ino)
139 __field(u32, hashval)
140 __field(u32, blkno)
141 __field(u32, offset)
142 __field(void *, alist)
143 __field(int, bufsize)
144 __field(int, count)
145 __field(int, firstu)
146 __field(int, dupcnt)
147 __field(int, flags)
148 __field(u32, bt_hashval)
149 __field(u32, bt_before)
150 ),
151 TP_fast_assign(
152 __entry->dev = VFS_I(ctx->dp)->i_sb->s_dev;
153 __entry->ino = ctx->dp->i_ino;
154 __entry->hashval = ctx->cursor->hashval;
155 __entry->blkno = ctx->cursor->blkno;
156 __entry->offset = ctx->cursor->offset;
157 __entry->alist = ctx->alist;
158 __entry->bufsize = ctx->bufsize;
159 __entry->count = ctx->count;
160 __entry->firstu = ctx->firstu;
161 __entry->flags = ctx->flags;
162 __entry->bt_hashval = be32_to_cpu(btree->hashval);
163 __entry->bt_before = be32_to_cpu(btree->before);
164 ),
165 TP_printk("dev %d:%d ino 0x%llx cursor h/b/o 0x%x/0x%x/%u dupcnt %u "
166 "alist 0x%p size %u count %u firstu %u flags %d %s "
167 "node hashval %u, node before %u",
168 MAJOR(__entry->dev), MINOR(__entry->dev),
169 __entry->ino,
170 __entry->hashval,
171 __entry->blkno,
172 __entry->offset,
173 __entry->dupcnt,
174 __entry->alist,
175 __entry->bufsize,
176 __entry->count,
177 __entry->firstu,
178 __entry->flags,
179 __print_flags(__entry->flags, "|", XFS_ATTR_FLAGS),
180 __entry->bt_hashval,
181 __entry->bt_before)
182);
183
184TRACE_EVENT(xfs_iext_insert,
185 TP_PROTO(struct xfs_inode *ip, xfs_extnum_t idx,
186 struct xfs_bmbt_irec *r, int state, unsigned long caller_ip),
187 TP_ARGS(ip, idx, r, state, caller_ip),
188 TP_STRUCT__entry(
189 __field(dev_t, dev)
190 __field(xfs_ino_t, ino)
191 __field(xfs_extnum_t, idx)
192 __field(xfs_fileoff_t, startoff)
193 __field(xfs_fsblock_t, startblock)
194 __field(xfs_filblks_t, blockcount)
195 __field(xfs_exntst_t, state)
196 __field(int, bmap_state)
197 __field(unsigned long, caller_ip)
198 ),
199 TP_fast_assign(
200 __entry->dev = VFS_I(ip)->i_sb->s_dev;
201 __entry->ino = ip->i_ino;
202 __entry->idx = idx;
203 __entry->startoff = r->br_startoff;
204 __entry->startblock = r->br_startblock;
205 __entry->blockcount = r->br_blockcount;
206 __entry->state = r->br_state;
207 __entry->bmap_state = state;
208 __entry->caller_ip = caller_ip;
209 ),
210 TP_printk("dev %d:%d ino 0x%llx state %s idx %ld "
Christoph Hellwigf7008d02010-02-15 22:02:19 +0000211 "offset %lld block %lld count %lld flag %d caller %pf",
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000212 MAJOR(__entry->dev), MINOR(__entry->dev),
213 __entry->ino,
214 __print_flags(__entry->bmap_state, "|", XFS_BMAP_EXT_FLAGS),
215 (long)__entry->idx,
216 __entry->startoff,
Christoph Hellwigf7008d02010-02-15 22:02:19 +0000217 (__int64_t)__entry->startblock,
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000218 __entry->blockcount,
219 __entry->state,
220 (char *)__entry->caller_ip)
221);
222
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000223DECLARE_EVENT_CLASS(xfs_bmap_class,
224 TP_PROTO(struct xfs_inode *ip, xfs_extnum_t idx, int state,
225 unsigned long caller_ip),
226 TP_ARGS(ip, idx, state, caller_ip),
227 TP_STRUCT__entry(
228 __field(dev_t, dev)
229 __field(xfs_ino_t, ino)
230 __field(xfs_extnum_t, idx)
231 __field(xfs_fileoff_t, startoff)
232 __field(xfs_fsblock_t, startblock)
233 __field(xfs_filblks_t, blockcount)
234 __field(xfs_exntst_t, state)
235 __field(int, bmap_state)
236 __field(unsigned long, caller_ip)
237 ),
238 TP_fast_assign(
239 struct xfs_ifork *ifp = (state & BMAP_ATTRFORK) ?
240 ip->i_afp : &ip->i_df;
241 struct xfs_bmbt_irec r;
242
243 xfs_bmbt_get_all(xfs_iext_get_ext(ifp, idx), &r);
244 __entry->dev = VFS_I(ip)->i_sb->s_dev;
245 __entry->ino = ip->i_ino;
246 __entry->idx = idx;
247 __entry->startoff = r.br_startoff;
248 __entry->startblock = r.br_startblock;
249 __entry->blockcount = r.br_blockcount;
250 __entry->state = r.br_state;
251 __entry->bmap_state = state;
252 __entry->caller_ip = caller_ip;
253 ),
254 TP_printk("dev %d:%d ino 0x%llx state %s idx %ld "
Christoph Hellwigf7008d02010-02-15 22:02:19 +0000255 "offset %lld block %lld count %lld flag %d caller %pf",
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000256 MAJOR(__entry->dev), MINOR(__entry->dev),
257 __entry->ino,
258 __print_flags(__entry->bmap_state, "|", XFS_BMAP_EXT_FLAGS),
259 (long)__entry->idx,
260 __entry->startoff,
Christoph Hellwigf7008d02010-02-15 22:02:19 +0000261 (__int64_t)__entry->startblock,
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000262 __entry->blockcount,
263 __entry->state,
264 (char *)__entry->caller_ip)
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000265)
266
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000267#define DEFINE_BMAP_EVENT(name) \
268DEFINE_EVENT(xfs_bmap_class, name, \
269 TP_PROTO(struct xfs_inode *ip, xfs_extnum_t idx, int state, \
270 unsigned long caller_ip), \
271 TP_ARGS(ip, idx, state, caller_ip))
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000272DEFINE_BMAP_EVENT(xfs_iext_remove);
273DEFINE_BMAP_EVENT(xfs_bmap_pre_update);
274DEFINE_BMAP_EVENT(xfs_bmap_post_update);
275DEFINE_BMAP_EVENT(xfs_extlist);
276
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000277DECLARE_EVENT_CLASS(xfs_buf_class,
278 TP_PROTO(struct xfs_buf *bp, unsigned long caller_ip),
279 TP_ARGS(bp, caller_ip),
280 TP_STRUCT__entry(
281 __field(dev_t, dev)
282 __field(xfs_daddr_t, bno)
283 __field(size_t, buffer_length)
284 __field(int, hold)
285 __field(int, pincount)
286 __field(unsigned, lockval)
287 __field(unsigned, flags)
288 __field(unsigned long, caller_ip)
289 ),
290 TP_fast_assign(
291 __entry->dev = bp->b_target->bt_dev;
292 __entry->bno = bp->b_bn;
293 __entry->buffer_length = bp->b_buffer_length;
294 __entry->hold = atomic_read(&bp->b_hold);
295 __entry->pincount = atomic_read(&bp->b_pin_count);
296 __entry->lockval = xfs_buf_lock_value(bp);
297 __entry->flags = bp->b_flags;
298 __entry->caller_ip = caller_ip;
299 ),
300 TP_printk("dev %d:%d bno 0x%llx len 0x%zx hold %d pincount %d "
301 "lock %d flags %s caller %pf",
302 MAJOR(__entry->dev), MINOR(__entry->dev),
303 (unsigned long long)__entry->bno,
304 __entry->buffer_length,
305 __entry->hold,
306 __entry->pincount,
307 __entry->lockval,
308 __print_flags(__entry->flags, "|", XFS_BUF_FLAGS),
309 (void *)__entry->caller_ip)
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000310)
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000311
312#define DEFINE_BUF_EVENT(name) \
313DEFINE_EVENT(xfs_buf_class, name, \
314 TP_PROTO(struct xfs_buf *bp, unsigned long caller_ip), \
315 TP_ARGS(bp, caller_ip))
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000316DEFINE_BUF_EVENT(xfs_buf_init);
317DEFINE_BUF_EVENT(xfs_buf_free);
318DEFINE_BUF_EVENT(xfs_buf_hold);
319DEFINE_BUF_EVENT(xfs_buf_rele);
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000320DEFINE_BUF_EVENT(xfs_buf_iodone);
321DEFINE_BUF_EVENT(xfs_buf_iorequest);
322DEFINE_BUF_EVENT(xfs_buf_bawrite);
323DEFINE_BUF_EVENT(xfs_buf_bdwrite);
324DEFINE_BUF_EVENT(xfs_buf_lock);
325DEFINE_BUF_EVENT(xfs_buf_lock_done);
326DEFINE_BUF_EVENT(xfs_buf_cond_lock);
327DEFINE_BUF_EVENT(xfs_buf_unlock);
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000328DEFINE_BUF_EVENT(xfs_buf_iowait);
329DEFINE_BUF_EVENT(xfs_buf_iowait_done);
330DEFINE_BUF_EVENT(xfs_buf_delwri_queue);
331DEFINE_BUF_EVENT(xfs_buf_delwri_dequeue);
332DEFINE_BUF_EVENT(xfs_buf_delwri_split);
Dave Chinner686865f2010-09-24 20:07:47 +1000333DEFINE_BUF_EVENT(xfs_buf_get_uncached);
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000334DEFINE_BUF_EVENT(xfs_bdstrat_shut);
335DEFINE_BUF_EVENT(xfs_buf_item_relse);
336DEFINE_BUF_EVENT(xfs_buf_item_iodone);
337DEFINE_BUF_EVENT(xfs_buf_item_iodone_async);
338DEFINE_BUF_EVENT(xfs_buf_error_relse);
339DEFINE_BUF_EVENT(xfs_trans_read_buf_io);
340DEFINE_BUF_EVENT(xfs_trans_read_buf_shut);
341
342/* not really buffer traces, but the buf provides useful information */
343DEFINE_BUF_EVENT(xfs_btree_corrupt);
344DEFINE_BUF_EVENT(xfs_da_btree_corrupt);
345DEFINE_BUF_EVENT(xfs_reset_dqcounts);
346DEFINE_BUF_EVENT(xfs_inode_item_push);
347
348/* pass flags explicitly */
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000349DECLARE_EVENT_CLASS(xfs_buf_flags_class,
350 TP_PROTO(struct xfs_buf *bp, unsigned flags, unsigned long caller_ip),
351 TP_ARGS(bp, flags, caller_ip),
352 TP_STRUCT__entry(
353 __field(dev_t, dev)
354 __field(xfs_daddr_t, bno)
355 __field(size_t, buffer_length)
356 __field(int, hold)
357 __field(int, pincount)
358 __field(unsigned, lockval)
359 __field(unsigned, flags)
360 __field(unsigned long, caller_ip)
361 ),
362 TP_fast_assign(
363 __entry->dev = bp->b_target->bt_dev;
364 __entry->bno = bp->b_bn;
365 __entry->buffer_length = bp->b_buffer_length;
366 __entry->flags = flags;
367 __entry->hold = atomic_read(&bp->b_hold);
368 __entry->pincount = atomic_read(&bp->b_pin_count);
369 __entry->lockval = xfs_buf_lock_value(bp);
370 __entry->caller_ip = caller_ip;
371 ),
372 TP_printk("dev %d:%d bno 0x%llx len 0x%zx hold %d pincount %d "
373 "lock %d flags %s caller %pf",
374 MAJOR(__entry->dev), MINOR(__entry->dev),
375 (unsigned long long)__entry->bno,
376 __entry->buffer_length,
377 __entry->hold,
378 __entry->pincount,
379 __entry->lockval,
380 __print_flags(__entry->flags, "|", XFS_BUF_FLAGS),
381 (void *)__entry->caller_ip)
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000382)
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000383
384#define DEFINE_BUF_FLAGS_EVENT(name) \
385DEFINE_EVENT(xfs_buf_flags_class, name, \
386 TP_PROTO(struct xfs_buf *bp, unsigned flags, unsigned long caller_ip), \
387 TP_ARGS(bp, flags, caller_ip))
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000388DEFINE_BUF_FLAGS_EVENT(xfs_buf_find);
389DEFINE_BUF_FLAGS_EVENT(xfs_buf_get);
390DEFINE_BUF_FLAGS_EVENT(xfs_buf_read);
391
392TRACE_EVENT(xfs_buf_ioerror,
393 TP_PROTO(struct xfs_buf *bp, int error, unsigned long caller_ip),
394 TP_ARGS(bp, error, caller_ip),
395 TP_STRUCT__entry(
396 __field(dev_t, dev)
397 __field(xfs_daddr_t, bno)
398 __field(size_t, buffer_length)
399 __field(unsigned, flags)
400 __field(int, hold)
401 __field(int, pincount)
402 __field(unsigned, lockval)
403 __field(int, error)
404 __field(unsigned long, caller_ip)
405 ),
406 TP_fast_assign(
407 __entry->dev = bp->b_target->bt_dev;
408 __entry->bno = bp->b_bn;
409 __entry->buffer_length = bp->b_buffer_length;
410 __entry->hold = atomic_read(&bp->b_hold);
411 __entry->pincount = atomic_read(&bp->b_pin_count);
412 __entry->lockval = xfs_buf_lock_value(bp);
413 __entry->error = error;
414 __entry->flags = bp->b_flags;
415 __entry->caller_ip = caller_ip;
416 ),
417 TP_printk("dev %d:%d bno 0x%llx len 0x%zx hold %d pincount %d "
418 "lock %d error %d flags %s caller %pf",
419 MAJOR(__entry->dev), MINOR(__entry->dev),
420 (unsigned long long)__entry->bno,
421 __entry->buffer_length,
422 __entry->hold,
423 __entry->pincount,
424 __entry->lockval,
425 __entry->error,
426 __print_flags(__entry->flags, "|", XFS_BUF_FLAGS),
427 (void *)__entry->caller_ip)
428);
429
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000430DECLARE_EVENT_CLASS(xfs_buf_item_class,
431 TP_PROTO(struct xfs_buf_log_item *bip),
432 TP_ARGS(bip),
433 TP_STRUCT__entry(
434 __field(dev_t, dev)
435 __field(xfs_daddr_t, buf_bno)
436 __field(size_t, buf_len)
437 __field(int, buf_hold)
438 __field(int, buf_pincount)
439 __field(int, buf_lockval)
440 __field(unsigned, buf_flags)
441 __field(unsigned, bli_recur)
442 __field(int, bli_refcount)
443 __field(unsigned, bli_flags)
444 __field(void *, li_desc)
445 __field(unsigned, li_flags)
446 ),
447 TP_fast_assign(
448 __entry->dev = bip->bli_buf->b_target->bt_dev;
449 __entry->bli_flags = bip->bli_flags;
450 __entry->bli_recur = bip->bli_recur;
451 __entry->bli_refcount = atomic_read(&bip->bli_refcount);
452 __entry->buf_bno = bip->bli_buf->b_bn;
453 __entry->buf_len = bip->bli_buf->b_buffer_length;
454 __entry->buf_flags = bip->bli_buf->b_flags;
455 __entry->buf_hold = atomic_read(&bip->bli_buf->b_hold);
456 __entry->buf_pincount = atomic_read(&bip->bli_buf->b_pin_count);
457 __entry->buf_lockval = xfs_buf_lock_value(bip->bli_buf);
458 __entry->li_desc = bip->bli_item.li_desc;
459 __entry->li_flags = bip->bli_item.li_flags;
460 ),
461 TP_printk("dev %d:%d bno 0x%llx len 0x%zx hold %d pincount %d "
462 "lock %d flags %s recur %d refcount %d bliflags %s "
463 "lidesc 0x%p liflags %s",
464 MAJOR(__entry->dev), MINOR(__entry->dev),
465 (unsigned long long)__entry->buf_bno,
466 __entry->buf_len,
467 __entry->buf_hold,
468 __entry->buf_pincount,
469 __entry->buf_lockval,
470 __print_flags(__entry->buf_flags, "|", XFS_BUF_FLAGS),
471 __entry->bli_recur,
472 __entry->bli_refcount,
473 __print_flags(__entry->bli_flags, "|", XFS_BLI_FLAGS),
474 __entry->li_desc,
475 __print_flags(__entry->li_flags, "|", XFS_LI_FLAGS))
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000476)
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000477
478#define DEFINE_BUF_ITEM_EVENT(name) \
479DEFINE_EVENT(xfs_buf_item_class, name, \
480 TP_PROTO(struct xfs_buf_log_item *bip), \
481 TP_ARGS(bip))
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000482DEFINE_BUF_ITEM_EVENT(xfs_buf_item_size);
483DEFINE_BUF_ITEM_EVENT(xfs_buf_item_size_stale);
484DEFINE_BUF_ITEM_EVENT(xfs_buf_item_format);
485DEFINE_BUF_ITEM_EVENT(xfs_buf_item_format_stale);
486DEFINE_BUF_ITEM_EVENT(xfs_buf_item_pin);
487DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unpin);
488DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unpin_stale);
489DEFINE_BUF_ITEM_EVENT(xfs_buf_item_trylock);
490DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unlock);
491DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unlock_stale);
492DEFINE_BUF_ITEM_EVENT(xfs_buf_item_committed);
493DEFINE_BUF_ITEM_EVENT(xfs_buf_item_push);
Dave Chinnerd808f612010-02-02 10:13:42 +1100494DEFINE_BUF_ITEM_EVENT(xfs_buf_item_pushbuf);
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000495DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf);
496DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf_recur);
497DEFINE_BUF_ITEM_EVENT(xfs_trans_getsb);
498DEFINE_BUF_ITEM_EVENT(xfs_trans_getsb_recur);
499DEFINE_BUF_ITEM_EVENT(xfs_trans_read_buf);
500DEFINE_BUF_ITEM_EVENT(xfs_trans_read_buf_recur);
501DEFINE_BUF_ITEM_EVENT(xfs_trans_log_buf);
502DEFINE_BUF_ITEM_EVENT(xfs_trans_brelse);
503DEFINE_BUF_ITEM_EVENT(xfs_trans_bjoin);
504DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold);
505DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold_release);
506DEFINE_BUF_ITEM_EVENT(xfs_trans_binval);
507
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000508DECLARE_EVENT_CLASS(xfs_lock_class,
509 TP_PROTO(struct xfs_inode *ip, unsigned lock_flags,
510 unsigned long caller_ip),
511 TP_ARGS(ip, lock_flags, caller_ip),
512 TP_STRUCT__entry(
513 __field(dev_t, dev)
514 __field(xfs_ino_t, ino)
515 __field(int, lock_flags)
516 __field(unsigned long, caller_ip)
517 ),
518 TP_fast_assign(
519 __entry->dev = VFS_I(ip)->i_sb->s_dev;
520 __entry->ino = ip->i_ino;
521 __entry->lock_flags = lock_flags;
522 __entry->caller_ip = caller_ip;
523 ),
524 TP_printk("dev %d:%d ino 0x%llx flags %s caller %pf",
525 MAJOR(__entry->dev), MINOR(__entry->dev),
526 __entry->ino,
527 __print_flags(__entry->lock_flags, "|", XFS_LOCK_FLAGS),
528 (void *)__entry->caller_ip)
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000529)
530
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000531#define DEFINE_LOCK_EVENT(name) \
532DEFINE_EVENT(xfs_lock_class, name, \
533 TP_PROTO(struct xfs_inode *ip, unsigned lock_flags, \
534 unsigned long caller_ip), \
535 TP_ARGS(ip, lock_flags, caller_ip))
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000536DEFINE_LOCK_EVENT(xfs_ilock);
537DEFINE_LOCK_EVENT(xfs_ilock_nowait);
538DEFINE_LOCK_EVENT(xfs_ilock_demote);
539DEFINE_LOCK_EVENT(xfs_iunlock);
540
Christoph Hellwigcca28fb2010-06-24 11:57:09 +1000541DECLARE_EVENT_CLASS(xfs_inode_class,
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000542 TP_PROTO(struct xfs_inode *ip),
543 TP_ARGS(ip),
544 TP_STRUCT__entry(
545 __field(dev_t, dev)
546 __field(xfs_ino_t, ino)
547 ),
548 TP_fast_assign(
549 __entry->dev = VFS_I(ip)->i_sb->s_dev;
550 __entry->ino = ip->i_ino;
551 ),
552 TP_printk("dev %d:%d ino 0x%llx",
553 MAJOR(__entry->dev), MINOR(__entry->dev),
554 __entry->ino)
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000555)
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000556
Christoph Hellwigcca28fb2010-06-24 11:57:09 +1000557#define DEFINE_INODE_EVENT(name) \
558DEFINE_EVENT(xfs_inode_class, name, \
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000559 TP_PROTO(struct xfs_inode *ip), \
560 TP_ARGS(ip))
Christoph Hellwigcca28fb2010-06-24 11:57:09 +1000561DEFINE_INODE_EVENT(xfs_iget_skip);
562DEFINE_INODE_EVENT(xfs_iget_reclaim);
563DEFINE_INODE_EVENT(xfs_iget_reclaim_fail);
564DEFINE_INODE_EVENT(xfs_iget_hit);
565DEFINE_INODE_EVENT(xfs_iget_miss);
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000566
Christoph Hellwigcca28fb2010-06-24 11:57:09 +1000567DEFINE_INODE_EVENT(xfs_getattr);
568DEFINE_INODE_EVENT(xfs_setattr);
569DEFINE_INODE_EVENT(xfs_readlink);
570DEFINE_INODE_EVENT(xfs_alloc_file_space);
571DEFINE_INODE_EVENT(xfs_free_file_space);
572DEFINE_INODE_EVENT(xfs_readdir);
Tony Luck0f1a9322010-07-20 17:54:41 +1000573#ifdef CONFIG_XFS_POSIX_ACL
Christoph Hellwigcca28fb2010-06-24 11:57:09 +1000574DEFINE_INODE_EVENT(xfs_check_acl);
Tony Luck0f1a9322010-07-20 17:54:41 +1000575#endif
Christoph Hellwigcca28fb2010-06-24 11:57:09 +1000576DEFINE_INODE_EVENT(xfs_vm_bmap);
577DEFINE_INODE_EVENT(xfs_file_ioctl);
578DEFINE_INODE_EVENT(xfs_file_compat_ioctl);
579DEFINE_INODE_EVENT(xfs_ioctl_setattr);
580DEFINE_INODE_EVENT(xfs_file_fsync);
581DEFINE_INODE_EVENT(xfs_destroy_inode);
582DEFINE_INODE_EVENT(xfs_write_inode);
Al Virob57922d2010-06-07 14:34:48 -0400583DEFINE_INODE_EVENT(xfs_evict_inode);
Christoph Hellwigcca28fb2010-06-24 11:57:09 +1000584
585DEFINE_INODE_EVENT(xfs_dquot_dqalloc);
586DEFINE_INODE_EVENT(xfs_dquot_dqdetach);
587
588DECLARE_EVENT_CLASS(xfs_iref_class,
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000589 TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip),
590 TP_ARGS(ip, caller_ip),
591 TP_STRUCT__entry(
592 __field(dev_t, dev)
593 __field(xfs_ino_t, ino)
594 __field(int, count)
Dave Chinner4aaf15d2010-03-08 11:24:07 +1100595 __field(int, pincount)
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000596 __field(unsigned long, caller_ip)
597 ),
598 TP_fast_assign(
599 __entry->dev = VFS_I(ip)->i_sb->s_dev;
600 __entry->ino = ip->i_ino;
601 __entry->count = atomic_read(&VFS_I(ip)->i_count);
Dave Chinner4aaf15d2010-03-08 11:24:07 +1100602 __entry->pincount = atomic_read(&ip->i_pincount);
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000603 __entry->caller_ip = caller_ip;
604 ),
Dave Chinner4aaf15d2010-03-08 11:24:07 +1100605 TP_printk("dev %d:%d ino 0x%llx count %d pincount %d caller %pf",
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000606 MAJOR(__entry->dev), MINOR(__entry->dev),
607 __entry->ino,
608 __entry->count,
Dave Chinner4aaf15d2010-03-08 11:24:07 +1100609 __entry->pincount,
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000610 (char *)__entry->caller_ip)
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000611)
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000612
Christoph Hellwigcca28fb2010-06-24 11:57:09 +1000613#define DEFINE_IREF_EVENT(name) \
614DEFINE_EVENT(xfs_iref_class, name, \
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000615 TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip), \
616 TP_ARGS(ip, caller_ip))
Christoph Hellwigcca28fb2010-06-24 11:57:09 +1000617DEFINE_IREF_EVENT(xfs_ihold);
618DEFINE_IREF_EVENT(xfs_irele);
619DEFINE_IREF_EVENT(xfs_inode_pin);
620DEFINE_IREF_EVENT(xfs_inode_unpin);
621DEFINE_IREF_EVENT(xfs_inode_unpin_nowait);
Dave Chinner4aaf15d2010-03-08 11:24:07 +1100622
Christoph Hellwigcca28fb2010-06-24 11:57:09 +1000623DECLARE_EVENT_CLASS(xfs_namespace_class,
624 TP_PROTO(struct xfs_inode *dp, struct xfs_name *name),
625 TP_ARGS(dp, name),
626 TP_STRUCT__entry(
627 __field(dev_t, dev)
628 __field(xfs_ino_t, dp_ino)
629 __dynamic_array(char, name, name->len)
630 ),
631 TP_fast_assign(
632 __entry->dev = VFS_I(dp)->i_sb->s_dev;
633 __entry->dp_ino = dp->i_ino;
634 memcpy(__get_str(name), name->name, name->len);
635 ),
636 TP_printk("dev %d:%d dp ino 0x%llx name %s",
637 MAJOR(__entry->dev), MINOR(__entry->dev),
638 __entry->dp_ino,
639 __get_str(name))
640)
641
642#define DEFINE_NAMESPACE_EVENT(name) \
643DEFINE_EVENT(xfs_namespace_class, name, \
644 TP_PROTO(struct xfs_inode *dp, struct xfs_name *name), \
645 TP_ARGS(dp, name))
646DEFINE_NAMESPACE_EVENT(xfs_remove);
647DEFINE_NAMESPACE_EVENT(xfs_link);
648DEFINE_NAMESPACE_EVENT(xfs_lookup);
649DEFINE_NAMESPACE_EVENT(xfs_create);
650DEFINE_NAMESPACE_EVENT(xfs_symlink);
651
652TRACE_EVENT(xfs_rename,
653 TP_PROTO(struct xfs_inode *src_dp, struct xfs_inode *target_dp,
654 struct xfs_name *src_name, struct xfs_name *target_name),
655 TP_ARGS(src_dp, target_dp, src_name, target_name),
656 TP_STRUCT__entry(
657 __field(dev_t, dev)
658 __field(xfs_ino_t, src_dp_ino)
659 __field(xfs_ino_t, target_dp_ino)
660 __dynamic_array(char, src_name, src_name->len)
661 __dynamic_array(char, target_name, target_name->len)
662 ),
663 TP_fast_assign(
664 __entry->dev = VFS_I(src_dp)->i_sb->s_dev;
665 __entry->src_dp_ino = src_dp->i_ino;
666 __entry->target_dp_ino = target_dp->i_ino;
667 memcpy(__get_str(src_name), src_name->name, src_name->len);
668 memcpy(__get_str(target_name), target_name->name, target_name->len);
669 ),
670 TP_printk("dev %d:%d src dp ino 0x%llx target dp ino 0x%llx"
671 " src name %s target name %s",
672 MAJOR(__entry->dev), MINOR(__entry->dev),
673 __entry->src_dp_ino,
674 __entry->target_dp_ino,
675 __get_str(src_name),
676 __get_str(target_name))
677)
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000678
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000679DECLARE_EVENT_CLASS(xfs_dquot_class,
680 TP_PROTO(struct xfs_dquot *dqp),
681 TP_ARGS(dqp),
682 TP_STRUCT__entry(
683 __field(dev_t, dev)
Christoph Hellwigb262e5d2010-02-14 22:01:45 +0000684 __field(u32, id)
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000685 __field(unsigned, flags)
686 __field(unsigned, nrefs)
687 __field(unsigned long long, res_bcount)
688 __field(unsigned long long, bcount)
689 __field(unsigned long long, icount)
690 __field(unsigned long long, blk_hardlimit)
691 __field(unsigned long long, blk_softlimit)
692 __field(unsigned long long, ino_hardlimit)
693 __field(unsigned long long, ino_softlimit)
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000694 ), \
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000695 TP_fast_assign(
696 __entry->dev = dqp->q_mount->m_super->s_dev;
Christoph Hellwigb262e5d2010-02-14 22:01:45 +0000697 __entry->id = be32_to_cpu(dqp->q_core.d_id);
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000698 __entry->flags = dqp->dq_flags;
699 __entry->nrefs = dqp->q_nrefs;
700 __entry->res_bcount = dqp->q_res_bcount;
701 __entry->bcount = be64_to_cpu(dqp->q_core.d_bcount);
702 __entry->icount = be64_to_cpu(dqp->q_core.d_icount);
703 __entry->blk_hardlimit =
704 be64_to_cpu(dqp->q_core.d_blk_hardlimit);
705 __entry->blk_softlimit =
706 be64_to_cpu(dqp->q_core.d_blk_softlimit);
707 __entry->ino_hardlimit =
708 be64_to_cpu(dqp->q_core.d_ino_hardlimit);
709 __entry->ino_softlimit =
710 be64_to_cpu(dqp->q_core.d_ino_softlimit);
711 ),
712 TP_printk("dev %d:%d id 0x%x flags %s nrefs %u res_bc 0x%llx "
Christoph Hellwigb262e5d2010-02-14 22:01:45 +0000713 "bcnt 0x%llx bhardlimit 0x%llx bsoftlimit 0x%llx "
714 "icnt 0x%llx ihardlimit 0x%llx isoftlimit 0x%llx]",
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000715 MAJOR(__entry->dev), MINOR(__entry->dev),
Christoph Hellwigb262e5d2010-02-14 22:01:45 +0000716 __entry->id,
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000717 __print_flags(__entry->flags, "|", XFS_DQ_FLAGS),
718 __entry->nrefs,
719 __entry->res_bcount,
720 __entry->bcount,
721 __entry->blk_hardlimit,
722 __entry->blk_softlimit,
723 __entry->icount,
724 __entry->ino_hardlimit,
725 __entry->ino_softlimit)
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000726)
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000727
728#define DEFINE_DQUOT_EVENT(name) \
729DEFINE_EVENT(xfs_dquot_class, name, \
730 TP_PROTO(struct xfs_dquot *dqp), \
731 TP_ARGS(dqp))
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000732DEFINE_DQUOT_EVENT(xfs_dqadjust);
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000733DEFINE_DQUOT_EVENT(xfs_dqreclaim_want);
734DEFINE_DQUOT_EVENT(xfs_dqreclaim_dirty);
735DEFINE_DQUOT_EVENT(xfs_dqreclaim_unlink);
736DEFINE_DQUOT_EVENT(xfs_dqattach_found);
737DEFINE_DQUOT_EVENT(xfs_dqattach_get);
738DEFINE_DQUOT_EVENT(xfs_dqinit);
739DEFINE_DQUOT_EVENT(xfs_dqreuse);
740DEFINE_DQUOT_EVENT(xfs_dqalloc);
741DEFINE_DQUOT_EVENT(xfs_dqtobp_read);
742DEFINE_DQUOT_EVENT(xfs_dqread);
743DEFINE_DQUOT_EVENT(xfs_dqread_fail);
744DEFINE_DQUOT_EVENT(xfs_dqlookup_found);
745DEFINE_DQUOT_EVENT(xfs_dqlookup_want);
746DEFINE_DQUOT_EVENT(xfs_dqlookup_freelist);
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000747DEFINE_DQUOT_EVENT(xfs_dqlookup_done);
748DEFINE_DQUOT_EVENT(xfs_dqget_hit);
749DEFINE_DQUOT_EVENT(xfs_dqget_miss);
750DEFINE_DQUOT_EVENT(xfs_dqput);
751DEFINE_DQUOT_EVENT(xfs_dqput_wait);
752DEFINE_DQUOT_EVENT(xfs_dqput_free);
753DEFINE_DQUOT_EVENT(xfs_dqrele);
754DEFINE_DQUOT_EVENT(xfs_dqflush);
755DEFINE_DQUOT_EVENT(xfs_dqflush_force);
756DEFINE_DQUOT_EVENT(xfs_dqflush_done);
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000757
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000758DECLARE_EVENT_CLASS(xfs_loggrant_class,
759 TP_PROTO(struct log *log, struct xlog_ticket *tic),
760 TP_ARGS(log, tic),
761 TP_STRUCT__entry(
762 __field(dev_t, dev)
763 __field(unsigned, trans_type)
764 __field(char, ocnt)
765 __field(char, cnt)
766 __field(int, curr_res)
767 __field(int, unit_res)
768 __field(unsigned int, flags)
Dave Chinner10547942010-12-21 12:02:25 +1100769 __field(int, reserveq)
770 __field(int, writeq)
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000771 __field(int, grant_reserve_cycle)
772 __field(int, grant_reserve_bytes)
773 __field(int, grant_write_cycle)
774 __field(int, grant_write_bytes)
775 __field(int, curr_cycle)
776 __field(int, curr_block)
777 __field(xfs_lsn_t, tail_lsn)
778 ),
779 TP_fast_assign(
780 __entry->dev = log->l_mp->m_super->s_dev;
781 __entry->trans_type = tic->t_trans_type;
782 __entry->ocnt = tic->t_ocnt;
783 __entry->cnt = tic->t_cnt;
784 __entry->curr_res = tic->t_curr_res;
785 __entry->unit_res = tic->t_unit_res;
786 __entry->flags = tic->t_flags;
Dave Chinner10547942010-12-21 12:02:25 +1100787 __entry->reserveq = list_empty(&log->l_reserveq);
788 __entry->writeq = list_empty(&log->l_writeq);
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000789 __entry->grant_reserve_cycle = log->l_grant_reserve_cycle;
790 __entry->grant_reserve_bytes = log->l_grant_reserve_bytes;
791 __entry->grant_write_cycle = log->l_grant_write_cycle;
792 __entry->grant_write_bytes = log->l_grant_write_bytes;
793 __entry->curr_cycle = log->l_curr_cycle;
794 __entry->curr_block = log->l_curr_block;
795 __entry->tail_lsn = log->l_tail_lsn;
796 ),
797 TP_printk("dev %d:%d type %s t_ocnt %u t_cnt %u t_curr_res %u "
Dave Chinner10547942010-12-21 12:02:25 +1100798 "t_unit_res %u t_flags %s reserveq %s "
799 "writeq %s grant_reserve_cycle %d "
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000800 "grant_reserve_bytes %d grant_write_cycle %d "
801 "grant_write_bytes %d curr_cycle %d curr_block %d "
802 "tail_cycle %d tail_block %d",
803 MAJOR(__entry->dev), MINOR(__entry->dev),
804 __print_symbolic(__entry->trans_type, XFS_TRANS_TYPES),
805 __entry->ocnt,
806 __entry->cnt,
807 __entry->curr_res,
808 __entry->unit_res,
809 __print_flags(__entry->flags, "|", XLOG_TIC_FLAGS),
Dave Chinner10547942010-12-21 12:02:25 +1100810 __entry->reserveq ? "empty" : "active",
811 __entry->writeq ? "empty" : "active",
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000812 __entry->grant_reserve_cycle,
813 __entry->grant_reserve_bytes,
814 __entry->grant_write_cycle,
815 __entry->grant_write_bytes,
816 __entry->curr_cycle,
817 __entry->curr_block,
818 CYCLE_LSN(__entry->tail_lsn),
819 BLOCK_LSN(__entry->tail_lsn)
820 )
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000821)
Christoph Hellwigea9a4882009-12-21 14:03:03 +0000822
823#define DEFINE_LOGGRANT_EVENT(name) \
824DEFINE_EVENT(xfs_loggrant_class, name, \
825 TP_PROTO(struct log *log, struct xlog_ticket *tic), \
826 TP_ARGS(log, tic))
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000827DEFINE_LOGGRANT_EVENT(xfs_log_done_nonperm);
828DEFINE_LOGGRANT_EVENT(xfs_log_done_perm);
829DEFINE_LOGGRANT_EVENT(xfs_log_reserve);
830DEFINE_LOGGRANT_EVENT(xfs_log_umount_write);
831DEFINE_LOGGRANT_EVENT(xfs_log_grant_enter);
832DEFINE_LOGGRANT_EVENT(xfs_log_grant_exit);
833DEFINE_LOGGRANT_EVENT(xfs_log_grant_error);
834DEFINE_LOGGRANT_EVENT(xfs_log_grant_sleep1);
835DEFINE_LOGGRANT_EVENT(xfs_log_grant_wake1);
836DEFINE_LOGGRANT_EVENT(xfs_log_grant_sleep2);
837DEFINE_LOGGRANT_EVENT(xfs_log_grant_wake2);
838DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_enter);
839DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_exit);
840DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_error);
841DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_sleep1);
842DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_wake1);
843DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_sleep2);
844DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_wake2);
845DEFINE_LOGGRANT_EVENT(xfs_log_regrant_reserve_enter);
846DEFINE_LOGGRANT_EVENT(xfs_log_regrant_reserve_exit);
847DEFINE_LOGGRANT_EVENT(xfs_log_regrant_reserve_sub);
848DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_enter);
849DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_exit);
850DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_sub);
851
Li Zefanf8adb4d2010-05-24 08:25:57 +0000852DECLARE_EVENT_CLASS(xfs_file_class,
853 TP_PROTO(struct xfs_inode *ip, size_t count, loff_t offset, int flags),
854 TP_ARGS(ip, count, offset, flags),
855 TP_STRUCT__entry(
856 __field(dev_t, dev)
857 __field(xfs_ino_t, ino)
858 __field(xfs_fsize_t, size)
859 __field(xfs_fsize_t, new_size)
860 __field(loff_t, offset)
861 __field(size_t, count)
862 __field(int, flags)
863 ),
864 TP_fast_assign(
865 __entry->dev = VFS_I(ip)->i_sb->s_dev;
866 __entry->ino = ip->i_ino;
867 __entry->size = ip->i_d.di_size;
868 __entry->new_size = ip->i_new_size;
869 __entry->offset = offset;
870 __entry->count = count;
871 __entry->flags = flags;
872 ),
873 TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx "
874 "offset 0x%llx count 0x%zx ioflags %s",
875 MAJOR(__entry->dev), MINOR(__entry->dev),
876 __entry->ino,
877 __entry->size,
878 __entry->new_size,
879 __entry->offset,
880 __entry->count,
881 __print_flags(__entry->flags, "|", XFS_IO_FLAGS))
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000882)
Li Zefanf8adb4d2010-05-24 08:25:57 +0000883
884#define DEFINE_RW_EVENT(name) \
885DEFINE_EVENT(xfs_file_class, name, \
886 TP_PROTO(struct xfs_inode *ip, size_t count, loff_t offset, int flags), \
887 TP_ARGS(ip, count, offset, flags))
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000888DEFINE_RW_EVENT(xfs_file_read);
889DEFINE_RW_EVENT(xfs_file_buffered_write);
890DEFINE_RW_EVENT(xfs_file_direct_write);
891DEFINE_RW_EVENT(xfs_file_splice_read);
892DEFINE_RW_EVENT(xfs_file_splice_write);
893
Li Zefanf8adb4d2010-05-24 08:25:57 +0000894DECLARE_EVENT_CLASS(xfs_page_class,
895 TP_PROTO(struct inode *inode, struct page *page, unsigned long off),
896 TP_ARGS(inode, page, off),
897 TP_STRUCT__entry(
898 __field(dev_t, dev)
899 __field(xfs_ino_t, ino)
900 __field(pgoff_t, pgoff)
901 __field(loff_t, size)
902 __field(unsigned long, offset)
903 __field(int, delalloc)
Li Zefanf8adb4d2010-05-24 08:25:57 +0000904 __field(int, unwritten)
905 ),
906 TP_fast_assign(
Christoph Hellwig20cb52e2010-06-24 09:46:01 +1000907 int delalloc = -1, unwritten = -1;
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000908
Li Zefanf8adb4d2010-05-24 08:25:57 +0000909 if (page_has_buffers(page))
Christoph Hellwig20cb52e2010-06-24 09:46:01 +1000910 xfs_count_page_state(page, &delalloc, &unwritten);
Li Zefanf8adb4d2010-05-24 08:25:57 +0000911 __entry->dev = inode->i_sb->s_dev;
912 __entry->ino = XFS_I(inode)->i_ino;
913 __entry->pgoff = page_offset(page);
914 __entry->size = i_size_read(inode);
915 __entry->offset = off;
916 __entry->delalloc = delalloc;
Li Zefanf8adb4d2010-05-24 08:25:57 +0000917 __entry->unwritten = unwritten;
918 ),
919 TP_printk("dev %d:%d ino 0x%llx pgoff 0x%lx size 0x%llx offset %lx "
Christoph Hellwig20cb52e2010-06-24 09:46:01 +1000920 "delalloc %d unwritten %d",
Li Zefanf8adb4d2010-05-24 08:25:57 +0000921 MAJOR(__entry->dev), MINOR(__entry->dev),
922 __entry->ino,
923 __entry->pgoff,
924 __entry->size,
925 __entry->offset,
926 __entry->delalloc,
Li Zefanf8adb4d2010-05-24 08:25:57 +0000927 __entry->unwritten)
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000928)
Li Zefanf8adb4d2010-05-24 08:25:57 +0000929
930#define DEFINE_PAGE_EVENT(name) \
931DEFINE_EVENT(xfs_page_class, name, \
932 TP_PROTO(struct inode *inode, struct page *page, unsigned long off), \
933 TP_ARGS(inode, page, off))
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000934DEFINE_PAGE_EVENT(xfs_writepage);
935DEFINE_PAGE_EVENT(xfs_releasepage);
936DEFINE_PAGE_EVENT(xfs_invalidatepage);
937
Christoph Hellwiga206c812010-12-10 08:42:20 +0000938DECLARE_EVENT_CLASS(xfs_imap_class,
Li Zefanf8adb4d2010-05-24 08:25:57 +0000939 TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count,
Christoph Hellwiga206c812010-12-10 08:42:20 +0000940 int type, struct xfs_bmbt_irec *irec),
941 TP_ARGS(ip, offset, count, type, irec),
Li Zefanf8adb4d2010-05-24 08:25:57 +0000942 TP_STRUCT__entry(
943 __field(dev_t, dev)
944 __field(xfs_ino_t, ino)
945 __field(loff_t, size)
946 __field(loff_t, new_size)
947 __field(loff_t, offset)
948 __field(size_t, count)
Christoph Hellwiga206c812010-12-10 08:42:20 +0000949 __field(int, type)
Li Zefanf8adb4d2010-05-24 08:25:57 +0000950 __field(xfs_fileoff_t, startoff)
951 __field(xfs_fsblock_t, startblock)
952 __field(xfs_filblks_t, blockcount)
953 ),
954 TP_fast_assign(
955 __entry->dev = VFS_I(ip)->i_sb->s_dev;
956 __entry->ino = ip->i_ino;
957 __entry->size = ip->i_d.di_size;
958 __entry->new_size = ip->i_new_size;
959 __entry->offset = offset;
960 __entry->count = count;
Christoph Hellwiga206c812010-12-10 08:42:20 +0000961 __entry->type = type;
Li Zefanf8adb4d2010-05-24 08:25:57 +0000962 __entry->startoff = irec ? irec->br_startoff : 0;
963 __entry->startblock = irec ? irec->br_startblock : 0;
964 __entry->blockcount = irec ? irec->br_blockcount : 0;
965 ),
966 TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx "
Christoph Hellwiga206c812010-12-10 08:42:20 +0000967 "offset 0x%llx count %zd type %s "
Li Zefanf8adb4d2010-05-24 08:25:57 +0000968 "startoff 0x%llx startblock %lld blockcount 0x%llx",
969 MAJOR(__entry->dev), MINOR(__entry->dev),
970 __entry->ino,
971 __entry->size,
972 __entry->new_size,
973 __entry->offset,
974 __entry->count,
Christoph Hellwiga206c812010-12-10 08:42:20 +0000975 __print_symbolic(__entry->type, XFS_IO_TYPES),
Li Zefanf8adb4d2010-05-24 08:25:57 +0000976 __entry->startoff,
977 (__int64_t)__entry->startblock,
978 __entry->blockcount)
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000979)
Li Zefanf8adb4d2010-05-24 08:25:57 +0000980
981#define DEFINE_IOMAP_EVENT(name) \
Christoph Hellwiga206c812010-12-10 08:42:20 +0000982DEFINE_EVENT(xfs_imap_class, name, \
Li Zefanf8adb4d2010-05-24 08:25:57 +0000983 TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count, \
Christoph Hellwiga206c812010-12-10 08:42:20 +0000984 int type, struct xfs_bmbt_irec *irec), \
985 TP_ARGS(ip, offset, count, type, irec))
986DEFINE_IOMAP_EVENT(xfs_map_blocks_found);
987DEFINE_IOMAP_EVENT(xfs_map_blocks_alloc);
988DEFINE_IOMAP_EVENT(xfs_get_blocks_found);
989DEFINE_IOMAP_EVENT(xfs_get_blocks_alloc);
Christoph Hellwig0b1b2132009-12-14 23:14:59 +0000990
Li Zefanf8adb4d2010-05-24 08:25:57 +0000991DECLARE_EVENT_CLASS(xfs_simple_io_class,
992 TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count),
993 TP_ARGS(ip, offset, count),
994 TP_STRUCT__entry(
995 __field(dev_t, dev)
996 __field(xfs_ino_t, ino)
997 __field(loff_t, size)
998 __field(loff_t, new_size)
999 __field(loff_t, offset)
1000 __field(size_t, count)
1001 ),
1002 TP_fast_assign(
1003 __entry->dev = VFS_I(ip)->i_sb->s_dev;
1004 __entry->ino = ip->i_ino;
1005 __entry->size = ip->i_d.di_size;
1006 __entry->new_size = ip->i_new_size;
1007 __entry->offset = offset;
1008 __entry->count = count;
1009 ),
1010 TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx "
1011 "offset 0x%llx count %zd",
1012 MAJOR(__entry->dev), MINOR(__entry->dev),
1013 __entry->ino,
1014 __entry->size,
1015 __entry->new_size,
1016 __entry->offset,
1017 __entry->count)
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001018);
Li Zefanf8adb4d2010-05-24 08:25:57 +00001019
1020#define DEFINE_SIMPLE_IO_EVENT(name) \
1021DEFINE_EVENT(xfs_simple_io_class, name, \
1022 TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count), \
1023 TP_ARGS(ip, offset, count))
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001024DEFINE_SIMPLE_IO_EVENT(xfs_delalloc_enospc);
1025DEFINE_SIMPLE_IO_EVENT(xfs_unwritten_convert);
Christoph Hellwiga206c812010-12-10 08:42:20 +00001026DEFINE_SIMPLE_IO_EVENT(xfs_get_blocks_notfound);
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001027
1028
1029TRACE_EVENT(xfs_itruncate_start,
1030 TP_PROTO(struct xfs_inode *ip, xfs_fsize_t new_size, int flag,
1031 xfs_off_t toss_start, xfs_off_t toss_finish),
1032 TP_ARGS(ip, new_size, flag, toss_start, toss_finish),
1033 TP_STRUCT__entry(
1034 __field(dev_t, dev)
1035 __field(xfs_ino_t, ino)
1036 __field(xfs_fsize_t, size)
1037 __field(xfs_fsize_t, new_size)
1038 __field(xfs_off_t, toss_start)
1039 __field(xfs_off_t, toss_finish)
1040 __field(int, flag)
1041 ),
1042 TP_fast_assign(
1043 __entry->dev = VFS_I(ip)->i_sb->s_dev;
1044 __entry->ino = ip->i_ino;
1045 __entry->size = ip->i_d.di_size;
1046 __entry->new_size = new_size;
1047 __entry->toss_start = toss_start;
1048 __entry->toss_finish = toss_finish;
1049 __entry->flag = flag;
1050 ),
1051 TP_printk("dev %d:%d ino 0x%llx %s size 0x%llx new_size 0x%llx "
1052 "toss start 0x%llx toss finish 0x%llx",
1053 MAJOR(__entry->dev), MINOR(__entry->dev),
1054 __entry->ino,
1055 __print_flags(__entry->flag, "|", XFS_ITRUNC_FLAGS),
1056 __entry->size,
1057 __entry->new_size,
1058 __entry->toss_start,
1059 __entry->toss_finish)
1060);
1061
Christoph Hellwigea9a4882009-12-21 14:03:03 +00001062DECLARE_EVENT_CLASS(xfs_itrunc_class,
1063 TP_PROTO(struct xfs_inode *ip, xfs_fsize_t new_size),
1064 TP_ARGS(ip, new_size),
1065 TP_STRUCT__entry(
1066 __field(dev_t, dev)
1067 __field(xfs_ino_t, ino)
1068 __field(xfs_fsize_t, size)
1069 __field(xfs_fsize_t, new_size)
1070 ),
1071 TP_fast_assign(
1072 __entry->dev = VFS_I(ip)->i_sb->s_dev;
1073 __entry->ino = ip->i_ino;
1074 __entry->size = ip->i_d.di_size;
1075 __entry->new_size = new_size;
1076 ),
1077 TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx",
1078 MAJOR(__entry->dev), MINOR(__entry->dev),
1079 __entry->ino,
1080 __entry->size,
1081 __entry->new_size)
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001082)
Christoph Hellwigea9a4882009-12-21 14:03:03 +00001083
1084#define DEFINE_ITRUNC_EVENT(name) \
1085DEFINE_EVENT(xfs_itrunc_class, name, \
1086 TP_PROTO(struct xfs_inode *ip, xfs_fsize_t new_size), \
1087 TP_ARGS(ip, new_size))
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001088DEFINE_ITRUNC_EVENT(xfs_itruncate_finish_start);
1089DEFINE_ITRUNC_EVENT(xfs_itruncate_finish_end);
1090
1091TRACE_EVENT(xfs_pagecache_inval,
1092 TP_PROTO(struct xfs_inode *ip, xfs_off_t start, xfs_off_t finish),
1093 TP_ARGS(ip, start, finish),
1094 TP_STRUCT__entry(
1095 __field(dev_t, dev)
1096 __field(xfs_ino_t, ino)
1097 __field(xfs_fsize_t, size)
1098 __field(xfs_off_t, start)
1099 __field(xfs_off_t, finish)
1100 ),
1101 TP_fast_assign(
1102 __entry->dev = VFS_I(ip)->i_sb->s_dev;
1103 __entry->ino = ip->i_ino;
1104 __entry->size = ip->i_d.di_size;
1105 __entry->start = start;
1106 __entry->finish = finish;
1107 ),
1108 TP_printk("dev %d:%d ino 0x%llx size 0x%llx start 0x%llx finish 0x%llx",
1109 MAJOR(__entry->dev), MINOR(__entry->dev),
1110 __entry->ino,
1111 __entry->size,
1112 __entry->start,
1113 __entry->finish)
1114);
1115
1116TRACE_EVENT(xfs_bunmap,
1117 TP_PROTO(struct xfs_inode *ip, xfs_fileoff_t bno, xfs_filblks_t len,
1118 int flags, unsigned long caller_ip),
1119 TP_ARGS(ip, bno, len, flags, caller_ip),
1120 TP_STRUCT__entry(
1121 __field(dev_t, dev)
1122 __field(xfs_ino_t, ino)
1123 __field(xfs_fsize_t, size)
1124 __field(xfs_fileoff_t, bno)
1125 __field(xfs_filblks_t, len)
1126 __field(unsigned long, caller_ip)
1127 __field(int, flags)
1128 ),
1129 TP_fast_assign(
1130 __entry->dev = VFS_I(ip)->i_sb->s_dev;
1131 __entry->ino = ip->i_ino;
1132 __entry->size = ip->i_d.di_size;
1133 __entry->bno = bno;
1134 __entry->len = len;
1135 __entry->caller_ip = caller_ip;
1136 __entry->flags = flags;
1137 ),
1138 TP_printk("dev %d:%d ino 0x%llx size 0x%llx bno 0x%llx len 0x%llx"
1139 "flags %s caller %pf",
1140 MAJOR(__entry->dev), MINOR(__entry->dev),
1141 __entry->ino,
1142 __entry->size,
1143 __entry->bno,
1144 __entry->len,
1145 __print_flags(__entry->flags, "|", XFS_BMAPI_FLAGS),
1146 (void *)__entry->caller_ip)
1147
1148);
1149
Dave Chinnered3b4d62010-05-21 12:07:08 +10001150#define XFS_BUSY_SYNC \
1151 { 0, "async" }, \
1152 { 1, "sync" }
1153
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001154TRACE_EVENT(xfs_alloc_busy,
Dave Chinnered3b4d62010-05-21 12:07:08 +10001155 TP_PROTO(struct xfs_trans *trans, xfs_agnumber_t agno,
1156 xfs_agblock_t agbno, xfs_extlen_t len, int sync),
1157 TP_ARGS(trans, agno, agbno, len, sync),
1158 TP_STRUCT__entry(
1159 __field(dev_t, dev)
1160 __field(struct xfs_trans *, tp)
1161 __field(int, tid)
1162 __field(xfs_agnumber_t, agno)
1163 __field(xfs_agblock_t, agbno)
1164 __field(xfs_extlen_t, len)
1165 __field(int, sync)
1166 ),
1167 TP_fast_assign(
1168 __entry->dev = trans->t_mountp->m_super->s_dev;
1169 __entry->tp = trans;
1170 __entry->tid = trans->t_ticket->t_tid;
1171 __entry->agno = agno;
1172 __entry->agbno = agbno;
1173 __entry->len = len;
1174 __entry->sync = sync;
1175 ),
1176 TP_printk("dev %d:%d trans 0x%p tid 0x%x agno %u agbno %u len %u %s",
1177 MAJOR(__entry->dev), MINOR(__entry->dev),
1178 __entry->tp,
1179 __entry->tid,
1180 __entry->agno,
1181 __entry->agbno,
1182 __entry->len,
1183 __print_symbolic(__entry->sync, XFS_BUSY_SYNC))
1184
1185);
1186
1187TRACE_EVENT(xfs_alloc_unbusy,
1188 TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
1189 xfs_agblock_t agbno, xfs_extlen_t len),
1190 TP_ARGS(mp, agno, agbno, len),
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001191 TP_STRUCT__entry(
1192 __field(dev_t, dev)
1193 __field(xfs_agnumber_t, agno)
1194 __field(xfs_agblock_t, agbno)
1195 __field(xfs_extlen_t, len)
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001196 ),
1197 TP_fast_assign(
1198 __entry->dev = mp->m_super->s_dev;
1199 __entry->agno = agno;
1200 __entry->agbno = agbno;
1201 __entry->len = len;
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001202 ),
Dave Chinnered3b4d62010-05-21 12:07:08 +10001203 TP_printk("dev %d:%d agno %u agbno %u len %u",
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001204 MAJOR(__entry->dev), MINOR(__entry->dev),
1205 __entry->agno,
1206 __entry->agbno,
Dave Chinnered3b4d62010-05-21 12:07:08 +10001207 __entry->len)
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001208);
1209
1210#define XFS_BUSY_STATES \
Dave Chinnered3b4d62010-05-21 12:07:08 +10001211 { 0, "missing" }, \
1212 { 1, "found" }
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001213
Dave Chinnered3b4d62010-05-21 12:07:08 +10001214TRACE_EVENT(xfs_alloc_busysearch,
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001215 TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
Dave Chinnered3b4d62010-05-21 12:07:08 +10001216 xfs_agblock_t agbno, xfs_extlen_t len, int found),
1217 TP_ARGS(mp, agno, agbno, len, found),
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001218 TP_STRUCT__entry(
1219 __field(dev_t, dev)
1220 __field(xfs_agnumber_t, agno)
Dave Chinnered3b4d62010-05-21 12:07:08 +10001221 __field(xfs_agblock_t, agbno)
1222 __field(xfs_extlen_t, len)
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001223 __field(int, found)
1224 ),
1225 TP_fast_assign(
1226 __entry->dev = mp->m_super->s_dev;
1227 __entry->agno = agno;
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001228 __entry->agbno = agbno;
1229 __entry->len = len;
Dave Chinnered3b4d62010-05-21 12:07:08 +10001230 __entry->found = found;
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001231 ),
Dave Chinnered3b4d62010-05-21 12:07:08 +10001232 TP_printk("dev %d:%d agno %u agbno %u len %u %s",
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001233 MAJOR(__entry->dev), MINOR(__entry->dev),
1234 __entry->agno,
1235 __entry->agbno,
1236 __entry->len,
Dave Chinnered3b4d62010-05-21 12:07:08 +10001237 __print_symbolic(__entry->found, XFS_BUSY_STATES))
1238);
1239
1240TRACE_EVENT(xfs_trans_commit_lsn,
1241 TP_PROTO(struct xfs_trans *trans),
1242 TP_ARGS(trans),
1243 TP_STRUCT__entry(
1244 __field(dev_t, dev)
1245 __field(struct xfs_trans *, tp)
1246 __field(xfs_lsn_t, lsn)
1247 ),
1248 TP_fast_assign(
1249 __entry->dev = trans->t_mountp->m_super->s_dev;
1250 __entry->tp = trans;
1251 __entry->lsn = trans->t_commit_lsn;
1252 ),
1253 TP_printk("dev %d:%d trans 0x%p commit_lsn 0x%llx",
1254 MAJOR(__entry->dev), MINOR(__entry->dev),
1255 __entry->tp,
Dave Chinnerfd45e4782010-01-02 02:38:56 +00001256 __entry->lsn)
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001257);
1258
1259TRACE_EVENT(xfs_agf,
1260 TP_PROTO(struct xfs_mount *mp, struct xfs_agf *agf, int flags,
1261 unsigned long caller_ip),
1262 TP_ARGS(mp, agf, flags, caller_ip),
1263 TP_STRUCT__entry(
1264 __field(dev_t, dev)
1265 __field(xfs_agnumber_t, agno)
1266 __field(int, flags)
1267 __field(__u32, length)
1268 __field(__u32, bno_root)
1269 __field(__u32, cnt_root)
1270 __field(__u32, bno_level)
1271 __field(__u32, cnt_level)
1272 __field(__u32, flfirst)
1273 __field(__u32, fllast)
1274 __field(__u32, flcount)
1275 __field(__u32, freeblks)
1276 __field(__u32, longest)
1277 __field(unsigned long, caller_ip)
1278 ),
1279 TP_fast_assign(
1280 __entry->dev = mp->m_super->s_dev;
1281 __entry->agno = be32_to_cpu(agf->agf_seqno),
1282 __entry->flags = flags;
1283 __entry->length = be32_to_cpu(agf->agf_length),
1284 __entry->bno_root = be32_to_cpu(agf->agf_roots[XFS_BTNUM_BNO]),
1285 __entry->cnt_root = be32_to_cpu(agf->agf_roots[XFS_BTNUM_CNT]),
1286 __entry->bno_level =
1287 be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNO]),
1288 __entry->cnt_level =
1289 be32_to_cpu(agf->agf_levels[XFS_BTNUM_CNT]),
1290 __entry->flfirst = be32_to_cpu(agf->agf_flfirst),
1291 __entry->fllast = be32_to_cpu(agf->agf_fllast),
1292 __entry->flcount = be32_to_cpu(agf->agf_flcount),
1293 __entry->freeblks = be32_to_cpu(agf->agf_freeblks),
1294 __entry->longest = be32_to_cpu(agf->agf_longest);
1295 __entry->caller_ip = caller_ip;
1296 ),
1297 TP_printk("dev %d:%d agno %u flags %s length %u roots b %u c %u "
1298 "levels b %u c %u flfirst %u fllast %u flcount %u "
1299 "freeblks %u longest %u caller %pf",
1300 MAJOR(__entry->dev), MINOR(__entry->dev),
1301 __entry->agno,
1302 __print_flags(__entry->flags, "|", XFS_AGF_FLAGS),
1303 __entry->length,
1304 __entry->bno_root,
1305 __entry->cnt_root,
1306 __entry->bno_level,
1307 __entry->cnt_level,
1308 __entry->flfirst,
1309 __entry->fllast,
1310 __entry->flcount,
1311 __entry->freeblks,
1312 __entry->longest,
1313 (void *)__entry->caller_ip)
1314);
1315
1316TRACE_EVENT(xfs_free_extent,
1317 TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, xfs_agblock_t agbno,
1318 xfs_extlen_t len, bool isfl, int haveleft, int haveright),
1319 TP_ARGS(mp, agno, agbno, len, isfl, haveleft, haveright),
1320 TP_STRUCT__entry(
1321 __field(dev_t, dev)
1322 __field(xfs_agnumber_t, agno)
1323 __field(xfs_agblock_t, agbno)
1324 __field(xfs_extlen_t, len)
1325 __field(int, isfl)
1326 __field(int, haveleft)
1327 __field(int, haveright)
1328 ),
1329 TP_fast_assign(
1330 __entry->dev = mp->m_super->s_dev;
1331 __entry->agno = agno;
1332 __entry->agbno = agbno;
1333 __entry->len = len;
1334 __entry->isfl = isfl;
1335 __entry->haveleft = haveleft;
1336 __entry->haveright = haveright;
1337 ),
1338 TP_printk("dev %d:%d agno %u agbno %u len %u isfl %d %s",
1339 MAJOR(__entry->dev), MINOR(__entry->dev),
1340 __entry->agno,
1341 __entry->agbno,
1342 __entry->len,
1343 __entry->isfl,
1344 __entry->haveleft ?
1345 (__entry->haveright ? "both" : "left") :
1346 (__entry->haveright ? "right" : "none"))
1347
1348);
1349
Christoph Hellwigea9a4882009-12-21 14:03:03 +00001350DECLARE_EVENT_CLASS(xfs_alloc_class,
1351 TP_PROTO(struct xfs_alloc_arg *args),
1352 TP_ARGS(args),
1353 TP_STRUCT__entry(
1354 __field(dev_t, dev)
1355 __field(xfs_agnumber_t, agno)
1356 __field(xfs_agblock_t, agbno)
1357 __field(xfs_extlen_t, minlen)
1358 __field(xfs_extlen_t, maxlen)
1359 __field(xfs_extlen_t, mod)
1360 __field(xfs_extlen_t, prod)
1361 __field(xfs_extlen_t, minleft)
1362 __field(xfs_extlen_t, total)
1363 __field(xfs_extlen_t, alignment)
1364 __field(xfs_extlen_t, minalignslop)
1365 __field(xfs_extlen_t, len)
1366 __field(short, type)
1367 __field(short, otype)
1368 __field(char, wasdel)
1369 __field(char, wasfromfl)
1370 __field(char, isfl)
1371 __field(char, userdata)
1372 __field(xfs_fsblock_t, firstblock)
1373 ),
1374 TP_fast_assign(
1375 __entry->dev = args->mp->m_super->s_dev;
1376 __entry->agno = args->agno;
1377 __entry->agbno = args->agbno;
1378 __entry->minlen = args->minlen;
1379 __entry->maxlen = args->maxlen;
1380 __entry->mod = args->mod;
1381 __entry->prod = args->prod;
1382 __entry->minleft = args->minleft;
1383 __entry->total = args->total;
1384 __entry->alignment = args->alignment;
1385 __entry->minalignslop = args->minalignslop;
1386 __entry->len = args->len;
1387 __entry->type = args->type;
1388 __entry->otype = args->otype;
1389 __entry->wasdel = args->wasdel;
1390 __entry->wasfromfl = args->wasfromfl;
1391 __entry->isfl = args->isfl;
1392 __entry->userdata = args->userdata;
1393 __entry->firstblock = args->firstblock;
1394 ),
1395 TP_printk("dev %d:%d agno %u agbno %u minlen %u maxlen %u mod %u "
1396 "prod %u minleft %u total %u alignment %u minalignslop %u "
1397 "len %u type %s otype %s wasdel %d wasfromfl %d isfl %d "
1398 "userdata %d firstblock 0x%llx",
1399 MAJOR(__entry->dev), MINOR(__entry->dev),
1400 __entry->agno,
1401 __entry->agbno,
1402 __entry->minlen,
1403 __entry->maxlen,
1404 __entry->mod,
1405 __entry->prod,
1406 __entry->minleft,
1407 __entry->total,
1408 __entry->alignment,
1409 __entry->minalignslop,
1410 __entry->len,
1411 __print_symbolic(__entry->type, XFS_ALLOC_TYPES),
1412 __print_symbolic(__entry->otype, XFS_ALLOC_TYPES),
1413 __entry->wasdel,
1414 __entry->wasfromfl,
1415 __entry->isfl,
1416 __entry->userdata,
1417 __entry->firstblock)
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001418)
1419
Christoph Hellwigea9a4882009-12-21 14:03:03 +00001420#define DEFINE_ALLOC_EVENT(name) \
1421DEFINE_EVENT(xfs_alloc_class, name, \
1422 TP_PROTO(struct xfs_alloc_arg *args), \
1423 TP_ARGS(args))
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001424DEFINE_ALLOC_EVENT(xfs_alloc_exact_done);
Christoph Hellwig9f9baab2010-12-10 15:03:57 +00001425DEFINE_ALLOC_EVENT(xfs_alloc_exact_notfound);
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001426DEFINE_ALLOC_EVENT(xfs_alloc_exact_error);
1427DEFINE_ALLOC_EVENT(xfs_alloc_near_nominleft);
1428DEFINE_ALLOC_EVENT(xfs_alloc_near_first);
1429DEFINE_ALLOC_EVENT(xfs_alloc_near_greater);
1430DEFINE_ALLOC_EVENT(xfs_alloc_near_lesser);
1431DEFINE_ALLOC_EVENT(xfs_alloc_near_error);
1432DEFINE_ALLOC_EVENT(xfs_alloc_size_neither);
1433DEFINE_ALLOC_EVENT(xfs_alloc_size_noentry);
1434DEFINE_ALLOC_EVENT(xfs_alloc_size_nominleft);
1435DEFINE_ALLOC_EVENT(xfs_alloc_size_done);
1436DEFINE_ALLOC_EVENT(xfs_alloc_size_error);
1437DEFINE_ALLOC_EVENT(xfs_alloc_small_freelist);
1438DEFINE_ALLOC_EVENT(xfs_alloc_small_notenough);
1439DEFINE_ALLOC_EVENT(xfs_alloc_small_done);
1440DEFINE_ALLOC_EVENT(xfs_alloc_small_error);
1441DEFINE_ALLOC_EVENT(xfs_alloc_vextent_badargs);
1442DEFINE_ALLOC_EVENT(xfs_alloc_vextent_nofix);
1443DEFINE_ALLOC_EVENT(xfs_alloc_vextent_noagbp);
1444DEFINE_ALLOC_EVENT(xfs_alloc_vextent_loopfailed);
1445DEFINE_ALLOC_EVENT(xfs_alloc_vextent_allfailed);
1446
Christoph Hellwigea9a4882009-12-21 14:03:03 +00001447DECLARE_EVENT_CLASS(xfs_dir2_class,
1448 TP_PROTO(struct xfs_da_args *args),
1449 TP_ARGS(args),
1450 TP_STRUCT__entry(
1451 __field(dev_t, dev)
1452 __field(xfs_ino_t, ino)
1453 __dynamic_array(char, name, args->namelen)
1454 __field(int, namelen)
1455 __field(xfs_dahash_t, hashval)
1456 __field(xfs_ino_t, inumber)
1457 __field(int, op_flags)
1458 ),
1459 TP_fast_assign(
1460 __entry->dev = VFS_I(args->dp)->i_sb->s_dev;
1461 __entry->ino = args->dp->i_ino;
1462 if (args->namelen)
1463 memcpy(__get_str(name), args->name, args->namelen);
1464 __entry->namelen = args->namelen;
1465 __entry->hashval = args->hashval;
1466 __entry->inumber = args->inumber;
1467 __entry->op_flags = args->op_flags;
1468 ),
1469 TP_printk("dev %d:%d ino 0x%llx name %.*s namelen %d hashval 0x%x "
1470 "inumber 0x%llx op_flags %s",
1471 MAJOR(__entry->dev), MINOR(__entry->dev),
1472 __entry->ino,
1473 __entry->namelen,
1474 __entry->namelen ? __get_str(name) : NULL,
1475 __entry->namelen,
1476 __entry->hashval,
1477 __entry->inumber,
1478 __print_flags(__entry->op_flags, "|", XFS_DA_OP_FLAGS))
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001479)
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001480
Christoph Hellwigea9a4882009-12-21 14:03:03 +00001481#define DEFINE_DIR2_EVENT(name) \
1482DEFINE_EVENT(xfs_dir2_class, name, \
1483 TP_PROTO(struct xfs_da_args *args), \
1484 TP_ARGS(args))
1485DEFINE_DIR2_EVENT(xfs_dir2_sf_addname);
1486DEFINE_DIR2_EVENT(xfs_dir2_sf_create);
1487DEFINE_DIR2_EVENT(xfs_dir2_sf_lookup);
1488DEFINE_DIR2_EVENT(xfs_dir2_sf_replace);
1489DEFINE_DIR2_EVENT(xfs_dir2_sf_removename);
1490DEFINE_DIR2_EVENT(xfs_dir2_sf_toino4);
1491DEFINE_DIR2_EVENT(xfs_dir2_sf_toino8);
1492DEFINE_DIR2_EVENT(xfs_dir2_sf_to_block);
1493DEFINE_DIR2_EVENT(xfs_dir2_block_addname);
1494DEFINE_DIR2_EVENT(xfs_dir2_block_lookup);
1495DEFINE_DIR2_EVENT(xfs_dir2_block_replace);
1496DEFINE_DIR2_EVENT(xfs_dir2_block_removename);
1497DEFINE_DIR2_EVENT(xfs_dir2_block_to_sf);
1498DEFINE_DIR2_EVENT(xfs_dir2_block_to_leaf);
1499DEFINE_DIR2_EVENT(xfs_dir2_leaf_addname);
1500DEFINE_DIR2_EVENT(xfs_dir2_leaf_lookup);
1501DEFINE_DIR2_EVENT(xfs_dir2_leaf_replace);
1502DEFINE_DIR2_EVENT(xfs_dir2_leaf_removename);
1503DEFINE_DIR2_EVENT(xfs_dir2_leaf_to_block);
1504DEFINE_DIR2_EVENT(xfs_dir2_leaf_to_node);
1505DEFINE_DIR2_EVENT(xfs_dir2_node_addname);
1506DEFINE_DIR2_EVENT(xfs_dir2_node_lookup);
1507DEFINE_DIR2_EVENT(xfs_dir2_node_replace);
1508DEFINE_DIR2_EVENT(xfs_dir2_node_removename);
1509DEFINE_DIR2_EVENT(xfs_dir2_node_to_leaf);
1510
1511DECLARE_EVENT_CLASS(xfs_dir2_space_class,
1512 TP_PROTO(struct xfs_da_args *args, int idx),
1513 TP_ARGS(args, idx),
1514 TP_STRUCT__entry(
1515 __field(dev_t, dev)
1516 __field(xfs_ino_t, ino)
1517 __field(int, op_flags)
1518 __field(int, idx)
1519 ),
1520 TP_fast_assign(
1521 __entry->dev = VFS_I(args->dp)->i_sb->s_dev;
1522 __entry->ino = args->dp->i_ino;
1523 __entry->op_flags = args->op_flags;
1524 __entry->idx = idx;
1525 ),
1526 TP_printk("dev %d:%d ino 0x%llx op_flags %s index %d",
1527 MAJOR(__entry->dev), MINOR(__entry->dev),
1528 __entry->ino,
1529 __print_flags(__entry->op_flags, "|", XFS_DA_OP_FLAGS),
1530 __entry->idx)
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001531)
Christoph Hellwigea9a4882009-12-21 14:03:03 +00001532
1533#define DEFINE_DIR2_SPACE_EVENT(name) \
1534DEFINE_EVENT(xfs_dir2_space_class, name, \
1535 TP_PROTO(struct xfs_da_args *args, int idx), \
1536 TP_ARGS(args, idx))
1537DEFINE_DIR2_SPACE_EVENT(xfs_dir2_leafn_add);
1538DEFINE_DIR2_SPACE_EVENT(xfs_dir2_leafn_remove);
1539DEFINE_DIR2_SPACE_EVENT(xfs_dir2_grow_inode);
1540DEFINE_DIR2_SPACE_EVENT(xfs_dir2_shrink_inode);
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001541
1542TRACE_EVENT(xfs_dir2_leafn_moveents,
1543 TP_PROTO(struct xfs_da_args *args, int src_idx, int dst_idx, int count),
1544 TP_ARGS(args, src_idx, dst_idx, count),
1545 TP_STRUCT__entry(
1546 __field(dev_t, dev)
1547 __field(xfs_ino_t, ino)
1548 __field(int, op_flags)
1549 __field(int, src_idx)
1550 __field(int, dst_idx)
1551 __field(int, count)
1552 ),
1553 TP_fast_assign(
1554 __entry->dev = VFS_I(args->dp)->i_sb->s_dev;
1555 __entry->ino = args->dp->i_ino;
1556 __entry->op_flags = args->op_flags;
1557 __entry->src_idx = src_idx;
1558 __entry->dst_idx = dst_idx;
1559 __entry->count = count;
1560 ),
1561 TP_printk("dev %d:%d ino 0x%llx op_flags %s "
1562 "src_idx %d dst_idx %d count %d",
1563 MAJOR(__entry->dev), MINOR(__entry->dev),
1564 __entry->ino,
1565 __print_flags(__entry->op_flags, "|", XFS_DA_OP_FLAGS),
1566 __entry->src_idx,
1567 __entry->dst_idx,
1568 __entry->count)
1569);
1570
Dave Chinner3a85cd92010-01-14 01:33:55 +00001571#define XFS_SWAPEXT_INODES \
1572 { 0, "target" }, \
1573 { 1, "temp" }
1574
1575#define XFS_INODE_FORMAT_STR \
1576 { 0, "invalid" }, \
1577 { 1, "local" }, \
1578 { 2, "extent" }, \
1579 { 3, "btree" }
1580
1581DECLARE_EVENT_CLASS(xfs_swap_extent_class,
1582 TP_PROTO(struct xfs_inode *ip, int which),
1583 TP_ARGS(ip, which),
1584 TP_STRUCT__entry(
1585 __field(dev_t, dev)
1586 __field(int, which)
1587 __field(xfs_ino_t, ino)
1588 __field(int, format)
1589 __field(int, nex)
1590 __field(int, max_nex)
1591 __field(int, broot_size)
1592 __field(int, fork_off)
1593 ),
1594 TP_fast_assign(
1595 __entry->dev = VFS_I(ip)->i_sb->s_dev;
1596 __entry->which = which;
1597 __entry->ino = ip->i_ino;
1598 __entry->format = ip->i_d.di_format;
1599 __entry->nex = ip->i_d.di_nextents;
1600 __entry->max_nex = ip->i_df.if_ext_max;
1601 __entry->broot_size = ip->i_df.if_broot_bytes;
1602 __entry->fork_off = XFS_IFORK_BOFF(ip);
1603 ),
1604 TP_printk("dev %d:%d ino 0x%llx (%s), %s format, num_extents %d, "
1605 "Max in-fork extents %d, broot size %d, fork offset %d",
1606 MAJOR(__entry->dev), MINOR(__entry->dev),
1607 __entry->ino,
1608 __print_symbolic(__entry->which, XFS_SWAPEXT_INODES),
1609 __print_symbolic(__entry->format, XFS_INODE_FORMAT_STR),
1610 __entry->nex,
1611 __entry->max_nex,
1612 __entry->broot_size,
1613 __entry->fork_off)
1614)
1615
1616#define DEFINE_SWAPEXT_EVENT(name) \
1617DEFINE_EVENT(xfs_swap_extent_class, name, \
1618 TP_PROTO(struct xfs_inode *ip, int which), \
1619 TP_ARGS(ip, which))
1620
1621DEFINE_SWAPEXT_EVENT(xfs_swap_extent_before);
1622DEFINE_SWAPEXT_EVENT(xfs_swap_extent_after);
1623
Dave Chinner9abbc532010-04-13 15:06:46 +10001624DECLARE_EVENT_CLASS(xfs_log_recover_item_class,
1625 TP_PROTO(struct log *log, struct xlog_recover *trans,
1626 struct xlog_recover_item *item, int pass),
1627 TP_ARGS(log, trans, item, pass),
1628 TP_STRUCT__entry(
1629 __field(dev_t, dev)
1630 __field(unsigned long, item)
1631 __field(xlog_tid_t, tid)
1632 __field(int, type)
1633 __field(int, pass)
1634 __field(int, count)
1635 __field(int, total)
1636 ),
1637 TP_fast_assign(
1638 __entry->dev = log->l_mp->m_super->s_dev;
1639 __entry->item = (unsigned long)item;
1640 __entry->tid = trans->r_log_tid;
1641 __entry->type = ITEM_TYPE(item);
1642 __entry->pass = pass;
1643 __entry->count = item->ri_cnt;
1644 __entry->total = item->ri_total;
1645 ),
1646 TP_printk("dev %d:%d trans 0x%x, pass %d, item 0x%p, item type %s "
1647 "item region count/total %d/%d",
1648 MAJOR(__entry->dev), MINOR(__entry->dev),
1649 __entry->tid,
1650 __entry->pass,
1651 (void *)__entry->item,
1652 __print_symbolic(__entry->type, XFS_LI_TYPE_DESC),
1653 __entry->count,
1654 __entry->total)
1655)
1656
1657#define DEFINE_LOG_RECOVER_ITEM(name) \
1658DEFINE_EVENT(xfs_log_recover_item_class, name, \
1659 TP_PROTO(struct log *log, struct xlog_recover *trans, \
1660 struct xlog_recover_item *item, int pass), \
1661 TP_ARGS(log, trans, item, pass))
1662
1663DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_add);
1664DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_add_cont);
1665DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_reorder_head);
1666DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_reorder_tail);
1667DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_recover);
1668
1669DECLARE_EVENT_CLASS(xfs_log_recover_buf_item_class,
1670 TP_PROTO(struct log *log, struct xfs_buf_log_format *buf_f),
1671 TP_ARGS(log, buf_f),
1672 TP_STRUCT__entry(
1673 __field(dev_t, dev)
1674 __field(__int64_t, blkno)
1675 __field(unsigned short, len)
1676 __field(unsigned short, flags)
1677 __field(unsigned short, size)
1678 __field(unsigned int, map_size)
1679 ),
1680 TP_fast_assign(
1681 __entry->dev = log->l_mp->m_super->s_dev;
1682 __entry->blkno = buf_f->blf_blkno;
1683 __entry->len = buf_f->blf_len;
1684 __entry->flags = buf_f->blf_flags;
1685 __entry->size = buf_f->blf_size;
1686 __entry->map_size = buf_f->blf_map_size;
1687 ),
1688 TP_printk("dev %d:%d blkno 0x%llx, len %u, flags 0x%x, size %d, "
1689 "map_size %d",
1690 MAJOR(__entry->dev), MINOR(__entry->dev),
1691 __entry->blkno,
1692 __entry->len,
1693 __entry->flags,
1694 __entry->size,
1695 __entry->map_size)
1696)
1697
1698#define DEFINE_LOG_RECOVER_BUF_ITEM(name) \
1699DEFINE_EVENT(xfs_log_recover_buf_item_class, name, \
1700 TP_PROTO(struct log *log, struct xfs_buf_log_format *buf_f), \
1701 TP_ARGS(log, buf_f))
1702
1703DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_not_cancel);
1704DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel);
1705DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel_add);
1706DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel_ref_inc);
1707DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_recover);
1708DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_inode_buf);
1709DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_reg_buf);
1710DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_dquot_buf);
1711
1712DECLARE_EVENT_CLASS(xfs_log_recover_ino_item_class,
1713 TP_PROTO(struct log *log, struct xfs_inode_log_format *in_f),
1714 TP_ARGS(log, in_f),
1715 TP_STRUCT__entry(
1716 __field(dev_t, dev)
1717 __field(xfs_ino_t, ino)
1718 __field(unsigned short, size)
1719 __field(int, fields)
1720 __field(unsigned short, asize)
1721 __field(unsigned short, dsize)
1722 __field(__int64_t, blkno)
1723 __field(int, len)
1724 __field(int, boffset)
1725 ),
1726 TP_fast_assign(
1727 __entry->dev = log->l_mp->m_super->s_dev;
1728 __entry->ino = in_f->ilf_ino;
1729 __entry->size = in_f->ilf_size;
1730 __entry->fields = in_f->ilf_fields;
1731 __entry->asize = in_f->ilf_asize;
1732 __entry->dsize = in_f->ilf_dsize;
1733 __entry->blkno = in_f->ilf_blkno;
1734 __entry->len = in_f->ilf_len;
1735 __entry->boffset = in_f->ilf_boffset;
1736 ),
1737 TP_printk("dev %d:%d ino 0x%llx, size %u, fields 0x%x, asize %d, "
1738 "dsize %d, blkno 0x%llx, len %d, boffset %d",
1739 MAJOR(__entry->dev), MINOR(__entry->dev),
1740 __entry->ino,
1741 __entry->size,
1742 __entry->fields,
1743 __entry->asize,
1744 __entry->dsize,
1745 __entry->blkno,
1746 __entry->len,
1747 __entry->boffset)
1748)
1749#define DEFINE_LOG_RECOVER_INO_ITEM(name) \
1750DEFINE_EVENT(xfs_log_recover_ino_item_class, name, \
1751 TP_PROTO(struct log *log, struct xfs_inode_log_format *in_f), \
1752 TP_ARGS(log, in_f))
1753
1754DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_recover);
1755DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_cancel);
1756DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_skip);
1757
Christoph Hellwig0b1b2132009-12-14 23:14:59 +00001758#endif /* _TRACE_XFS_H */
1759
1760#undef TRACE_INCLUDE_PATH
1761#define TRACE_INCLUDE_PATH .
1762#define TRACE_INCLUDE_FILE xfs_trace
1763#include <trace/define_trace.h>