Fix: update sched instrumentation for kernel 4.12
[lttng-modules.git] / instrumentation / events / lttng-module / ext3.h
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM ext3
3
4 #if !defined(LTTNG_TRACE_EXT3_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define LTTNG_TRACE_EXT3_H
6
7 #include <probes/lttng-tracepoint-event.h>
8 #include <linux/version.h>
9
10 LTTNG_TRACEPOINT_EVENT(ext3_free_inode,
11 TP_PROTO(struct inode *inode),
12
13 TP_ARGS(inode),
14
15 TP_FIELDS(
16 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
17 ctf_integer(ino_t, ino, inode->i_ino)
18 ctf_integer(umode_t, mode, inode->i_mode)
19 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
20 ctf_integer(uid_t, uid, i_uid_read(inode))
21 ctf_integer(gid_t, gid, i_gid_read(inode))
22 #else
23 ctf_integer(uid_t, uid, inode->i_uid)
24 ctf_integer(gid_t, gid, inode->i_gid)
25 #endif
26 ctf_integer(blkcnt_t, blocks, inode->i_blocks)
27 )
28 )
29
30 LTTNG_TRACEPOINT_EVENT(ext3_request_inode,
31 TP_PROTO(struct inode *dir, int mode),
32
33 TP_ARGS(dir, mode),
34
35 TP_FIELDS(
36 ctf_integer(dev_t, dev, dir->i_sb->s_dev)
37 ctf_integer(ino_t, dir, dir->i_ino)
38 ctf_integer(umode_t, mode, mode)
39 )
40 )
41
42 LTTNG_TRACEPOINT_EVENT(ext3_allocate_inode,
43 TP_PROTO(struct inode *inode, struct inode *dir, int mode),
44
45 TP_ARGS(inode, dir, mode),
46
47 TP_FIELDS(
48 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
49 ctf_integer(ino_t, ino, inode->i_ino)
50 ctf_integer(ino_t, dir, dir->i_ino)
51 ctf_integer(umode_t, mode, mode)
52 )
53 )
54
55 LTTNG_TRACEPOINT_EVENT(ext3_evict_inode,
56 TP_PROTO(struct inode *inode),
57
58 TP_ARGS(inode),
59
60 TP_FIELDS(
61 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
62 ctf_integer(ino_t, ino, inode->i_ino)
63 ctf_integer(int, nlink, inode->i_nlink)
64 )
65 )
66
67 LTTNG_TRACEPOINT_EVENT(ext3_drop_inode,
68 TP_PROTO(struct inode *inode, int drop),
69
70 TP_ARGS(inode, drop),
71
72 TP_FIELDS(
73 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
74 ctf_integer(ino_t, ino, inode->i_ino)
75 ctf_integer(int, drop, drop)
76 )
77 )
78
79 LTTNG_TRACEPOINT_EVENT(ext3_mark_inode_dirty,
80 TP_PROTO(struct inode *inode, unsigned long IP),
81
82 TP_ARGS(inode, IP),
83
84 TP_FIELDS(
85 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
86 ctf_integer(ino_t, ino, inode->i_ino)
87 ctf_integer(unsigned long, ip, IP)
88 )
89 )
90
91 LTTNG_TRACEPOINT_EVENT(ext3_write_begin,
92 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
93 unsigned int flags),
94
95 TP_ARGS(inode, pos, len, flags),
96
97 TP_FIELDS(
98 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
99 ctf_integer(ino_t, ino, inode->i_ino)
100 ctf_integer(loff_t, pos, pos)
101 ctf_integer(unsigned int, len, len)
102 ctf_integer(unsigned int, flags, flags)
103 )
104 )
105
106 LTTNG_TRACEPOINT_EVENT_CLASS(ext3__write_end,
107 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
108 unsigned int copied),
109
110 TP_ARGS(inode, pos, len, copied),
111
112 TP_FIELDS(
113 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
114 ctf_integer(ino_t, ino, inode->i_ino)
115 ctf_integer(loff_t, pos, pos)
116 ctf_integer(unsigned int, len, len)
117 ctf_integer(unsigned int, copied, copied)
118 )
119 )
120
121 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__write_end, ext3_ordered_write_end,
122
123 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
124 unsigned int copied),
125
126 TP_ARGS(inode, pos, len, copied)
127 )
128
129 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__write_end, ext3_writeback_write_end,
130
131 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
132 unsigned int copied),
133
134 TP_ARGS(inode, pos, len, copied)
135 )
136
137 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__write_end, ext3_journalled_write_end,
138
139 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
140 unsigned int copied),
141
142 TP_ARGS(inode, pos, len, copied)
143 )
144
145 LTTNG_TRACEPOINT_EVENT_CLASS(ext3__page_op,
146 TP_PROTO(struct page *page),
147
148 TP_ARGS(page),
149
150 TP_FIELDS(
151 ctf_integer(dev_t, dev, page->mapping->host->i_sb->s_dev)
152 ctf_integer(ino_t, ino, page->mapping->host->i_ino)
153 ctf_integer(pgoff_t, index, page->index)
154 )
155 )
156
157 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op, ext3_ordered_writepage,
158
159 TP_PROTO(struct page *page),
160
161 TP_ARGS(page)
162 )
163
164 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op, ext3_writeback_writepage,
165
166 TP_PROTO(struct page *page),
167
168 TP_ARGS(page)
169 )
170
171 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op, ext3_journalled_writepage,
172
173 TP_PROTO(struct page *page),
174
175 TP_ARGS(page)
176 )
177
178 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op, ext3_readpage,
179
180 TP_PROTO(struct page *page),
181
182 TP_ARGS(page)
183 )
184
185 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op, ext3_releasepage,
186
187 TP_PROTO(struct page *page),
188
189 TP_ARGS(page)
190 )
191
192 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
193
194 LTTNG_TRACEPOINT_EVENT(ext3_invalidatepage,
195 TP_PROTO(struct page *page, unsigned int offset, unsigned int length),
196
197 TP_ARGS(page, offset, length),
198
199 TP_FIELDS(
200 ctf_integer(pgoff_t, index, page->index)
201 ctf_integer(unsigned int, offset, offset)
202 ctf_integer(unsigned int, length, length)
203 ctf_integer(ino_t, ino, page->mapping->host->i_ino)
204 ctf_integer(dev_t, dev, page->mapping->host->i_sb->s_dev)
205 )
206 )
207
208 #else
209
210 LTTNG_TRACEPOINT_EVENT(ext3_invalidatepage,
211 TP_PROTO(struct page *page, unsigned long offset),
212
213 TP_ARGS(page, offset),
214
215 TP_FIELDS(
216 ctf_integer(pgoff_t, index, page->index)
217 ctf_integer(unsigned long, offset, offset)
218 ctf_integer(ino_t, ino, page->mapping->host->i_ino)
219 ctf_integer(dev_t, dev, page->mapping->host->i_sb->s_dev)
220 )
221 )
222
223 #endif
224
225 LTTNG_TRACEPOINT_EVENT(ext3_discard_blocks,
226 TP_PROTO(struct super_block *sb, unsigned long blk,
227 unsigned long count),
228
229 TP_ARGS(sb, blk, count),
230
231 TP_FIELDS(
232 ctf_integer(dev_t, dev, sb->s_dev)
233 ctf_integer(unsigned long, blk, blk)
234 ctf_integer(unsigned long, count, count)
235 )
236 )
237
238 LTTNG_TRACEPOINT_EVENT(ext3_request_blocks,
239 TP_PROTO(struct inode *inode, unsigned long goal,
240 unsigned long count),
241
242 TP_ARGS(inode, goal, count),
243
244 TP_FIELDS(
245 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
246 ctf_integer(ino_t, ino, inode->i_ino)
247 ctf_integer(unsigned long, count, count)
248 ctf_integer(unsigned long, goal, goal)
249 )
250 )
251
252 LTTNG_TRACEPOINT_EVENT(ext3_allocate_blocks,
253 TP_PROTO(struct inode *inode, unsigned long goal,
254 unsigned long count, unsigned long block),
255
256 TP_ARGS(inode, goal, count, block),
257
258 TP_FIELDS(
259 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
260 ctf_integer(ino_t, ino, inode->i_ino)
261 ctf_integer(unsigned long, block, block)
262 ctf_integer(unsigned long, count, count)
263 ctf_integer(unsigned long, goal, goal)
264 )
265 )
266
267 LTTNG_TRACEPOINT_EVENT(ext3_free_blocks,
268 TP_PROTO(struct inode *inode, unsigned long block,
269 unsigned long count),
270
271 TP_ARGS(inode, block, count),
272
273 TP_FIELDS(
274 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
275 ctf_integer(ino_t, ino, inode->i_ino)
276 ctf_integer(umode_t, mode, inode->i_mode)
277 ctf_integer(unsigned long, block, block)
278 ctf_integer(unsigned long, count, count)
279 )
280 )
281
282 LTTNG_TRACEPOINT_EVENT(ext3_sync_file_enter,
283 TP_PROTO(struct file *file, int datasync),
284
285 TP_ARGS(file, datasync),
286
287 TP_FIELDS(
288 ctf_integer(dev_t, dev, file->f_path.dentry->d_inode->i_sb->s_dev)
289 ctf_integer(ino_t, ino, file->f_path.dentry->d_inode->i_ino)
290 ctf_integer(ino_t, parent, file->f_path.dentry->d_parent->d_inode->i_ino)
291 ctf_integer(int, datasync, datasync)
292 )
293 )
294
295 LTTNG_TRACEPOINT_EVENT(ext3_sync_file_exit,
296 TP_PROTO(struct inode *inode, int ret),
297
298 TP_ARGS(inode, ret),
299
300 TP_FIELDS(
301 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
302 ctf_integer(ino_t, ino, inode->i_ino)
303 ctf_integer(int, ret, ret)
304 )
305 )
306
307 LTTNG_TRACEPOINT_EVENT(ext3_sync_fs,
308 TP_PROTO(struct super_block *sb, int wait),
309
310 TP_ARGS(sb, wait),
311
312 TP_FIELDS(
313 ctf_integer(dev_t, dev, sb->s_dev)
314 ctf_integer(int, wait, wait)
315 )
316 )
317
318 LTTNG_TRACEPOINT_EVENT(ext3_rsv_window_add,
319 TP_PROTO(struct super_block *sb,
320 struct ext3_reserve_window_node *rsv_node),
321
322 TP_ARGS(sb, rsv_node),
323
324 TP_FIELDS(
325 ctf_integer(unsigned long, start, rsv_node->rsv_window._rsv_start)
326 ctf_integer(unsigned long, end, rsv_node->rsv_window._rsv_end)
327 ctf_integer(dev_t, dev, sb->s_dev)
328 )
329 )
330
331 LTTNG_TRACEPOINT_EVENT(ext3_discard_reservation,
332 TP_PROTO(struct inode *inode,
333 struct ext3_reserve_window_node *rsv_node),
334
335 TP_ARGS(inode, rsv_node),
336
337 TP_FIELDS(
338 ctf_integer(unsigned long, start, rsv_node->rsv_window._rsv_start)
339 ctf_integer(unsigned long, end, rsv_node->rsv_window._rsv_end)
340 ctf_integer(ino_t, ino, inode->i_ino)
341 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
342 )
343 )
344
345 LTTNG_TRACEPOINT_EVENT(ext3_alloc_new_reservation,
346 TP_PROTO(struct super_block *sb, unsigned long goal),
347
348 TP_ARGS(sb, goal),
349
350 TP_FIELDS(
351 ctf_integer(dev_t, dev, sb->s_dev)
352 ctf_integer(unsigned long, goal, goal)
353 )
354 )
355
356 LTTNG_TRACEPOINT_EVENT(ext3_reserved,
357 TP_PROTO(struct super_block *sb, unsigned long block,
358 struct ext3_reserve_window_node *rsv_node),
359
360 TP_ARGS(sb, block, rsv_node),
361
362 TP_FIELDS(
363 ctf_integer(unsigned long, block, block)
364 ctf_integer(unsigned long, start, rsv_node->rsv_window._rsv_start)
365 ctf_integer(unsigned long, end, rsv_node->rsv_window._rsv_end)
366 ctf_integer(dev_t, dev, sb->s_dev)
367 )
368 )
369
370 LTTNG_TRACEPOINT_EVENT(ext3_forget,
371 TP_PROTO(struct inode *inode, int is_metadata, unsigned long block),
372
373 TP_ARGS(inode, is_metadata, block),
374
375 TP_FIELDS(
376 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
377 ctf_integer(ino_t, ino, inode->i_ino)
378 ctf_integer(umode_t, mode, inode->i_mode)
379 ctf_integer(int, is_metadata, is_metadata)
380 ctf_integer(unsigned long, block, block)
381 )
382 )
383
384 LTTNG_TRACEPOINT_EVENT(ext3_read_block_bitmap,
385 TP_PROTO(struct super_block *sb, unsigned int group),
386
387 TP_ARGS(sb, group),
388
389 TP_FIELDS(
390 ctf_integer(dev_t, dev, sb->s_dev)
391 ctf_integer(__u32, group, group)
392 )
393 )
394
395 LTTNG_TRACEPOINT_EVENT(ext3_direct_IO_enter,
396 TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw),
397
398 TP_ARGS(inode, offset, len, rw),
399
400 TP_FIELDS(
401 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
402 ctf_integer(ino_t, ino, inode->i_ino)
403 ctf_integer(loff_t, pos, offset)
404 ctf_integer(unsigned long, len, len)
405 ctf_integer(int, rw, rw)
406 )
407 )
408
409 LTTNG_TRACEPOINT_EVENT(ext3_direct_IO_exit,
410 TP_PROTO(struct inode *inode, loff_t offset, unsigned long len,
411 int rw, int ret),
412
413 TP_ARGS(inode, offset, len, rw, ret),
414
415 TP_FIELDS(
416 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
417 ctf_integer(ino_t, ino, inode->i_ino)
418 ctf_integer(loff_t, pos, offset)
419 ctf_integer(unsigned long, len, len)
420 ctf_integer(int, rw, rw)
421 ctf_integer(int, ret, ret)
422 )
423 )
424
425 LTTNG_TRACEPOINT_EVENT(ext3_unlink_enter,
426 TP_PROTO(struct inode *parent, struct dentry *dentry),
427
428 TP_ARGS(parent, dentry),
429
430 TP_FIELDS(
431 ctf_integer(ino_t, parent, parent->i_ino)
432 ctf_integer(ino_t, ino, dentry->d_inode->i_ino)
433 ctf_integer(loff_t, size, dentry->d_inode->i_size)
434 ctf_integer(dev_t, dev, dentry->d_inode->i_sb->s_dev)
435 )
436 )
437
438 LTTNG_TRACEPOINT_EVENT(ext3_unlink_exit,
439 TP_PROTO(struct dentry *dentry, int ret),
440
441 TP_ARGS(dentry, ret),
442
443 TP_FIELDS(
444 ctf_integer(dev_t, dev, dentry->d_inode->i_sb->s_dev)
445 ctf_integer(ino_t, ino, dentry->d_inode->i_ino)
446 ctf_integer(int, ret, ret)
447 )
448 )
449
450 LTTNG_TRACEPOINT_EVENT_CLASS(ext3__truncate,
451 TP_PROTO(struct inode *inode),
452
453 TP_ARGS(inode),
454
455 TP_FIELDS(
456 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
457 ctf_integer(ino_t, ino, inode->i_ino)
458 ctf_integer(blkcnt_t, blocks, inode->i_blocks)
459 )
460 )
461
462 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__truncate, ext3_truncate_enter,
463
464 TP_PROTO(struct inode *inode),
465
466 TP_ARGS(inode)
467 )
468
469 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__truncate, ext3_truncate_exit,
470
471 TP_PROTO(struct inode *inode),
472
473 TP_ARGS(inode)
474 )
475
476 LTTNG_TRACEPOINT_EVENT(ext3_get_blocks_enter,
477 TP_PROTO(struct inode *inode, unsigned long lblk,
478 unsigned long len, int create),
479
480 TP_ARGS(inode, lblk, len, create),
481
482 TP_FIELDS(
483 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
484 ctf_integer(ino_t, ino, inode->i_ino)
485 ctf_integer(unsigned long, lblk, lblk)
486 ctf_integer(unsigned long, len, len)
487 ctf_integer(int, create, create)
488 )
489 )
490
491 LTTNG_TRACEPOINT_EVENT(ext3_get_blocks_exit,
492 TP_PROTO(struct inode *inode, unsigned long lblk,
493 unsigned long pblk, unsigned long len, int ret),
494
495 TP_ARGS(inode, lblk, pblk, len, ret),
496
497 TP_FIELDS(
498 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
499 ctf_integer(ino_t, ino, inode->i_ino)
500 ctf_integer(unsigned long, lblk, lblk)
501 ctf_integer(unsigned long, pblk, pblk)
502 ctf_integer(unsigned long, len, len)
503 ctf_integer(int, ret, ret)
504 )
505 )
506
507 LTTNG_TRACEPOINT_EVENT(ext3_load_inode,
508 TP_PROTO(struct inode *inode),
509
510 TP_ARGS(inode),
511
512 TP_FIELDS(
513 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
514 ctf_integer(ino_t, ino, inode->i_ino)
515 )
516 )
517
518 #endif /* LTTNG_TRACE_EXT3_H */
519
520 /* This part must be outside protection */
521 #include <probes/define_trace.h>
This page took 0.039988 seconds and 4 git commands to generate.