Linux Audio

Check our new training course

Loading...
v6.13.7
  1/* SPDX-License-Identifier: GPL-2.0 */
  2#undef TRACE_SYSTEM
  3#define TRACE_SYSTEM nilfs2
  4
  5#if !defined(_TRACE_NILFS2_H) || defined(TRACE_HEADER_MULTI_READ)
  6#define _TRACE_NILFS2_H
  7
  8#include <linux/tracepoint.h>
  9
 10struct nilfs_sc_info;
 11
 12#define show_collection_stage(type)					\
 13	__print_symbolic(type,						\
 14	{ NILFS_ST_INIT, "ST_INIT" },					\
 15	{ NILFS_ST_GC, "ST_GC" },					\
 16	{ NILFS_ST_FILE, "ST_FILE" },					\
 17	{ NILFS_ST_IFILE, "ST_IFILE" },					\
 18	{ NILFS_ST_CPFILE, "ST_CPFILE" },				\
 19	{ NILFS_ST_SUFILE, "ST_SUFILE" },				\
 20	{ NILFS_ST_DAT, "ST_DAT" },					\
 21	{ NILFS_ST_SR, "ST_SR" },					\
 22	{ NILFS_ST_DSYNC, "ST_DSYNC" },					\
 23	{ NILFS_ST_DONE, "ST_DONE"})
 24
 25TRACE_EVENT(nilfs2_collection_stage_transition,
 26
 27	    TP_PROTO(struct nilfs_sc_info *sci),
 28
 29	    TP_ARGS(sci),
 30
 31	    TP_STRUCT__entry(
 32		    __field(void *, sci)
 33		    __field(int, stage)
 34	    ),
 35
 36	    TP_fast_assign(
 37			__entry->sci = sci;
 38			__entry->stage = sci->sc_stage.scnt;
 39		    ),
 40
 41	    TP_printk("sci = %p stage = %s",
 42		      __entry->sci,
 43		      show_collection_stage(__entry->stage))
 44);
 45
 46#ifndef TRACE_HEADER_MULTI_READ
 47enum nilfs2_transaction_transition_state {
 48	TRACE_NILFS2_TRANSACTION_BEGIN,
 49	TRACE_NILFS2_TRANSACTION_COMMIT,
 50	TRACE_NILFS2_TRANSACTION_ABORT,
 51	TRACE_NILFS2_TRANSACTION_TRYLOCK,
 52	TRACE_NILFS2_TRANSACTION_LOCK,
 53	TRACE_NILFS2_TRANSACTION_UNLOCK,
 54};
 55#endif
 56
 57#define show_transaction_state(type)					\
 58	__print_symbolic(type,						\
 59			 { TRACE_NILFS2_TRANSACTION_BEGIN, "BEGIN" },	\
 60			 { TRACE_NILFS2_TRANSACTION_COMMIT, "COMMIT" },	\
 61			 { TRACE_NILFS2_TRANSACTION_ABORT, "ABORT" },	\
 62			 { TRACE_NILFS2_TRANSACTION_TRYLOCK, "TRYLOCK" }, \
 63			 { TRACE_NILFS2_TRANSACTION_LOCK, "LOCK" },	\
 64			 { TRACE_NILFS2_TRANSACTION_UNLOCK, "UNLOCK" })
 65
 66TRACE_EVENT(nilfs2_transaction_transition,
 67	    TP_PROTO(struct super_block *sb,
 68		     struct nilfs_transaction_info *ti,
 69		     int count,
 70		     unsigned int flags,
 71		     enum nilfs2_transaction_transition_state state),
 72
 73	    TP_ARGS(sb, ti, count, flags, state),
 74
 75	    TP_STRUCT__entry(
 76		    __field(void *, sb)
 77		    __field(void *, ti)
 78		    __field(int, count)
 79		    __field(unsigned int, flags)
 80		    __field(int, state)
 81	    ),
 82
 83	    TP_fast_assign(
 84		    __entry->sb = sb;
 85		    __entry->ti = ti;
 86		    __entry->count = count;
 87		    __entry->flags = flags;
 88		    __entry->state = state;
 89		    ),
 90
 91	    TP_printk("sb = %p ti = %p count = %d flags = %x state = %s",
 92		      __entry->sb,
 93		      __entry->ti,
 94		      __entry->count,
 95		      __entry->flags,
 96		      show_transaction_state(__entry->state))
 97);
 98
 99TRACE_EVENT(nilfs2_segment_usage_check,
100	    TP_PROTO(struct inode *sufile,
101		     __u64 segnum,
102		     unsigned long cnt),
103
104	    TP_ARGS(sufile, segnum, cnt),
105
106	    TP_STRUCT__entry(
107		    __field(struct inode *, sufile)
108		    __field(__u64, segnum)
109		    __field(unsigned long, cnt)
110	    ),
111
112	    TP_fast_assign(
113		    __entry->sufile = sufile;
114		    __entry->segnum = segnum;
115		    __entry->cnt = cnt;
116		    ),
117
118	    TP_printk("sufile = %p segnum = %llu cnt = %lu",
119		      __entry->sufile,
120		      __entry->segnum,
121		      __entry->cnt)
122);
123
124TRACE_EVENT(nilfs2_segment_usage_allocated,
125	    TP_PROTO(struct inode *sufile,
126		     __u64 segnum),
127
128	    TP_ARGS(sufile, segnum),
129
130	    TP_STRUCT__entry(
131		    __field(struct inode *, sufile)
132		    __field(__u64, segnum)
133	    ),
134
135	    TP_fast_assign(
136		    __entry->sufile = sufile;
137		    __entry->segnum = segnum;
138		    ),
139
140	    TP_printk("sufile = %p segnum = %llu",
141		      __entry->sufile,
142		      __entry->segnum)
143);
144
145TRACE_EVENT(nilfs2_segment_usage_freed,
146	    TP_PROTO(struct inode *sufile,
147		     __u64 segnum),
148
149	    TP_ARGS(sufile, segnum),
150
151	    TP_STRUCT__entry(
152		    __field(struct inode *, sufile)
153		    __field(__u64, segnum)
154	    ),
155
156	    TP_fast_assign(
157		    __entry->sufile = sufile;
158		    __entry->segnum = segnum;
159		    ),
160
161	    TP_printk("sufile = %p segnum = %llu",
162		      __entry->sufile,
163		      __entry->segnum)
164);
165
166TRACE_EVENT(nilfs2_mdt_insert_new_block,
167	    TP_PROTO(struct inode *inode,
168		     unsigned long ino,
169		     unsigned long block),
170
171	    TP_ARGS(inode, ino, block),
172
173	    TP_STRUCT__entry(
174		    __field(struct inode *, inode)
175		    __field(unsigned long, ino)
176		    __field(unsigned long, block)
177	    ),
178
179	    TP_fast_assign(
180		    __entry->inode = inode;
181		    __entry->ino = ino;
182		    __entry->block = block;
183		    ),
184
185	    TP_printk("inode = %p ino = %lu block = %lu",
186		      __entry->inode,
187		      __entry->ino,
188		      __entry->block)
189);
190
191TRACE_EVENT(nilfs2_mdt_submit_block,
192	    TP_PROTO(struct inode *inode,
193		     unsigned long ino,
194		     unsigned long blkoff,
195		     enum req_op mode),
196
197	    TP_ARGS(inode, ino, blkoff, mode),
198
199	    TP_STRUCT__entry(
200		    __field(struct inode *, inode)
201		    __field(unsigned long, ino)
202		    __field(unsigned long, blkoff)
203		    /*
204		     * Use field_struct() to avoid is_signed_type() on the
205		     * bitwise type enum req_op.
206		     */
207		    __field_struct(enum req_op, mode)
208	    ),
209
210	    TP_fast_assign(
211		    __entry->inode = inode;
212		    __entry->ino = ino;
213		    __entry->blkoff = blkoff;
214		    __entry->mode = mode;
215		    ),
216
217	    TP_printk("inode = %p ino = %lu blkoff = %lu mode = %x",
218		      __entry->inode,
219		      __entry->ino,
220		      __entry->blkoff,
221		      __entry->mode)
222);
223
224#endif /* _TRACE_NILFS2_H */
225
226/* This part must be outside protection */
227#undef TRACE_INCLUDE_FILE
228#define TRACE_INCLUDE_FILE nilfs2
229#include <trace/define_trace.h>
v4.10.11
 
  1#undef TRACE_SYSTEM
  2#define TRACE_SYSTEM nilfs2
  3
  4#if !defined(_TRACE_NILFS2_H) || defined(TRACE_HEADER_MULTI_READ)
  5#define _TRACE_NILFS2_H
  6
  7#include <linux/tracepoint.h>
  8
  9struct nilfs_sc_info;
 10
 11#define show_collection_stage(type)					\
 12	__print_symbolic(type,						\
 13	{ NILFS_ST_INIT, "ST_INIT" },					\
 14	{ NILFS_ST_GC, "ST_GC" },					\
 15	{ NILFS_ST_FILE, "ST_FILE" },					\
 16	{ NILFS_ST_IFILE, "ST_IFILE" },					\
 17	{ NILFS_ST_CPFILE, "ST_CPFILE" },				\
 18	{ NILFS_ST_SUFILE, "ST_SUFILE" },				\
 19	{ NILFS_ST_DAT, "ST_DAT" },					\
 20	{ NILFS_ST_SR, "ST_SR" },					\
 21	{ NILFS_ST_DSYNC, "ST_DSYNC" },					\
 22	{ NILFS_ST_DONE, "ST_DONE"})
 23
 24TRACE_EVENT(nilfs2_collection_stage_transition,
 25
 26	    TP_PROTO(struct nilfs_sc_info *sci),
 27
 28	    TP_ARGS(sci),
 29
 30	    TP_STRUCT__entry(
 31		    __field(void *, sci)
 32		    __field(int, stage)
 33	    ),
 34
 35	    TP_fast_assign(
 36			__entry->sci = sci;
 37			__entry->stage = sci->sc_stage.scnt;
 38		    ),
 39
 40	    TP_printk("sci = %p stage = %s",
 41		      __entry->sci,
 42		      show_collection_stage(__entry->stage))
 43);
 44
 45#ifndef TRACE_HEADER_MULTI_READ
 46enum nilfs2_transaction_transition_state {
 47	TRACE_NILFS2_TRANSACTION_BEGIN,
 48	TRACE_NILFS2_TRANSACTION_COMMIT,
 49	TRACE_NILFS2_TRANSACTION_ABORT,
 50	TRACE_NILFS2_TRANSACTION_TRYLOCK,
 51	TRACE_NILFS2_TRANSACTION_LOCK,
 52	TRACE_NILFS2_TRANSACTION_UNLOCK,
 53};
 54#endif
 55
 56#define show_transaction_state(type)					\
 57	__print_symbolic(type,						\
 58			 { TRACE_NILFS2_TRANSACTION_BEGIN, "BEGIN" },	\
 59			 { TRACE_NILFS2_TRANSACTION_COMMIT, "COMMIT" },	\
 60			 { TRACE_NILFS2_TRANSACTION_ABORT, "ABORT" },	\
 61			 { TRACE_NILFS2_TRANSACTION_TRYLOCK, "TRYLOCK" }, \
 62			 { TRACE_NILFS2_TRANSACTION_LOCK, "LOCK" },	\
 63			 { TRACE_NILFS2_TRANSACTION_UNLOCK, "UNLOCK" })
 64
 65TRACE_EVENT(nilfs2_transaction_transition,
 66	    TP_PROTO(struct super_block *sb,
 67		     struct nilfs_transaction_info *ti,
 68		     int count,
 69		     unsigned int flags,
 70		     enum nilfs2_transaction_transition_state state),
 71
 72	    TP_ARGS(sb, ti, count, flags, state),
 73
 74	    TP_STRUCT__entry(
 75		    __field(void *, sb)
 76		    __field(void *, ti)
 77		    __field(int, count)
 78		    __field(unsigned int, flags)
 79		    __field(int, state)
 80	    ),
 81
 82	    TP_fast_assign(
 83		    __entry->sb = sb;
 84		    __entry->ti = ti;
 85		    __entry->count = count;
 86		    __entry->flags = flags;
 87		    __entry->state = state;
 88		    ),
 89
 90	    TP_printk("sb = %p ti = %p count = %d flags = %x state = %s",
 91		      __entry->sb,
 92		      __entry->ti,
 93		      __entry->count,
 94		      __entry->flags,
 95		      show_transaction_state(__entry->state))
 96);
 97
 98TRACE_EVENT(nilfs2_segment_usage_check,
 99	    TP_PROTO(struct inode *sufile,
100		     __u64 segnum,
101		     unsigned long cnt),
102
103	    TP_ARGS(sufile, segnum, cnt),
104
105	    TP_STRUCT__entry(
106		    __field(struct inode *, sufile)
107		    __field(__u64, segnum)
108		    __field(unsigned long, cnt)
109	    ),
110
111	    TP_fast_assign(
112		    __entry->sufile = sufile;
113		    __entry->segnum = segnum;
114		    __entry->cnt = cnt;
115		    ),
116
117	    TP_printk("sufile = %p segnum = %llu cnt = %lu",
118		      __entry->sufile,
119		      __entry->segnum,
120		      __entry->cnt)
121);
122
123TRACE_EVENT(nilfs2_segment_usage_allocated,
124	    TP_PROTO(struct inode *sufile,
125		     __u64 segnum),
126
127	    TP_ARGS(sufile, segnum),
128
129	    TP_STRUCT__entry(
130		    __field(struct inode *, sufile)
131		    __field(__u64, segnum)
132	    ),
133
134	    TP_fast_assign(
135		    __entry->sufile = sufile;
136		    __entry->segnum = segnum;
137		    ),
138
139	    TP_printk("sufile = %p segnum = %llu",
140		      __entry->sufile,
141		      __entry->segnum)
142);
143
144TRACE_EVENT(nilfs2_segment_usage_freed,
145	    TP_PROTO(struct inode *sufile,
146		     __u64 segnum),
147
148	    TP_ARGS(sufile, segnum),
149
150	    TP_STRUCT__entry(
151		    __field(struct inode *, sufile)
152		    __field(__u64, segnum)
153	    ),
154
155	    TP_fast_assign(
156		    __entry->sufile = sufile;
157		    __entry->segnum = segnum;
158		    ),
159
160	    TP_printk("sufile = %p segnum = %llu",
161		      __entry->sufile,
162		      __entry->segnum)
163);
164
165TRACE_EVENT(nilfs2_mdt_insert_new_block,
166	    TP_PROTO(struct inode *inode,
167		     unsigned long ino,
168		     unsigned long block),
169
170	    TP_ARGS(inode, ino, block),
171
172	    TP_STRUCT__entry(
173		    __field(struct inode *, inode)
174		    __field(unsigned long, ino)
175		    __field(unsigned long, block)
176	    ),
177
178	    TP_fast_assign(
179		    __entry->inode = inode;
180		    __entry->ino = ino;
181		    __entry->block = block;
182		    ),
183
184	    TP_printk("inode = %p ino = %lu block = %lu",
185		      __entry->inode,
186		      __entry->ino,
187		      __entry->block)
188);
189
190TRACE_EVENT(nilfs2_mdt_submit_block,
191	    TP_PROTO(struct inode *inode,
192		     unsigned long ino,
193		     unsigned long blkoff,
194		     int mode),
195
196	    TP_ARGS(inode, ino, blkoff, mode),
197
198	    TP_STRUCT__entry(
199		    __field(struct inode *, inode)
200		    __field(unsigned long, ino)
201		    __field(unsigned long, blkoff)
202		    __field(int, mode)
 
 
 
 
203	    ),
204
205	    TP_fast_assign(
206		    __entry->inode = inode;
207		    __entry->ino = ino;
208		    __entry->blkoff = blkoff;
209		    __entry->mode = mode;
210		    ),
211
212	    TP_printk("inode = %p ino = %lu blkoff = %lu mode = %x",
213		      __entry->inode,
214		      __entry->ino,
215		      __entry->blkoff,
216		      __entry->mode)
217);
218
219#endif /* _TRACE_NILFS2_H */
220
221/* This part must be outside protection */
222#undef TRACE_INCLUDE_FILE
223#define TRACE_INCLUDE_FILE nilfs2
224#include <trace/define_trace.h>