Commit | Line | Data |
---|---|---|
b87700e3 AG |
1 | #undef TRACE_SYSTEM |
2 | #define TRACE_SYSTEM ext4 | |
3 | ||
3bc29f0a MD |
4 | #if !defined(LTTNG_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ) |
5 | #define LTTNG_TRACE_EXT4_H | |
b87700e3 | 6 | |
3bc29f0a | 7 | #include "../../../probes/lttng-tracepoint-event.h" |
b87700e3 | 8 | #include <linux/writeback.h> |
b87700e3 AG |
9 | #include <linux/version.h> |
10 | ||
11 | #ifndef _TRACE_EXT4_DEF_ | |
12 | #define _TRACE_EXT4_DEF_ | |
13 | struct ext4_allocation_context; | |
14 | struct ext4_allocation_request; | |
15 | struct ext4_prealloc_space; | |
16 | struct ext4_inode_info; | |
17 | struct mpage_da_data; | |
18 | struct ext4_map_blocks; | |
19 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) | |
20 | struct ext4_extent; | |
21 | #endif | |
22 | #endif | |
23 | ||
24 | #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode)) | |
25 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) | |
26 | #define TP_MODE_T __u16 | |
27 | #else | |
28 | #define TP_MODE_T umode_t | |
29 | #endif | |
30 | ||
3bc29f0a | 31 | LTTNG_TRACEPOINT_EVENT(ext4_free_inode, |
b87700e3 AG |
32 | TP_PROTO(struct inode *inode), |
33 | ||
34 | TP_ARGS(inode), | |
35 | ||
f127e61e MD |
36 | TP_FIELDS( |
37 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
38 | ctf_integer(ino_t, ino, inode->i_ino) | |
b87700e3 | 39 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) |
f127e61e MD |
40 | ctf_integer(uid_t, uid, i_uid_read(inode)) |
41 | ctf_integer(gid_t, gid, i_gid_read(inode)) | |
b87700e3 | 42 | #else |
f127e61e MD |
43 | ctf_integer(uid_t, uid, inode->i_uid) |
44 | ctf_integer(gid_t, gid, inode->i_gid) | |
b87700e3 | 45 | #endif |
f127e61e MD |
46 | ctf_integer(__u64, blocks, inode->i_blocks) |
47 | ctf_integer(TP_MODE_T, mode, inode->i_mode) | |
48 | ) | |
b87700e3 AG |
49 | ) |
50 | ||
3bc29f0a | 51 | LTTNG_TRACEPOINT_EVENT(ext4_request_inode, |
b87700e3 AG |
52 | TP_PROTO(struct inode *dir, int mode), |
53 | ||
54 | TP_ARGS(dir, mode), | |
55 | ||
f127e61e MD |
56 | TP_FIELDS( |
57 | ctf_integer(dev_t, dev, dir->i_sb->s_dev) | |
58 | ctf_integer(ino_t, dir, dir->i_ino) | |
59 | ctf_integer(TP_MODE_T, mode, mode) | |
60 | ) | |
b87700e3 AG |
61 | ) |
62 | ||
3bc29f0a | 63 | LTTNG_TRACEPOINT_EVENT(ext4_allocate_inode, |
b87700e3 AG |
64 | TP_PROTO(struct inode *inode, struct inode *dir, int mode), |
65 | ||
66 | TP_ARGS(inode, dir, mode), | |
67 | ||
f127e61e MD |
68 | TP_FIELDS( |
69 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
70 | ctf_integer(ino_t, ino, inode->i_ino) | |
71 | ctf_integer(ino_t, dir, dir->i_ino) | |
72 | ctf_integer(TP_MODE_T, mode, mode) | |
73 | ) | |
b87700e3 AG |
74 | ) |
75 | ||
76 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) | |
3bc29f0a | 77 | LTTNG_TRACEPOINT_EVENT(ext4_evict_inode, |
b87700e3 AG |
78 | TP_PROTO(struct inode *inode), |
79 | ||
80 | TP_ARGS(inode), | |
81 | ||
f127e61e MD |
82 | TP_FIELDS( |
83 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
84 | ctf_integer(ino_t, ino, inode->i_ino) | |
85 | ctf_integer(int, nlink, inode->i_nlink) | |
86 | ) | |
b87700e3 AG |
87 | ) |
88 | ||
3bc29f0a | 89 | LTTNG_TRACEPOINT_EVENT(ext4_drop_inode, |
b87700e3 AG |
90 | TP_PROTO(struct inode *inode, int drop), |
91 | ||
92 | TP_ARGS(inode, drop), | |
93 | ||
f127e61e MD |
94 | TP_FIELDS( |
95 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
96 | ctf_integer(ino_t, ino, inode->i_ino) | |
97 | ctf_integer(int, drop, drop) | |
98 | ) | |
b87700e3 AG |
99 | ) |
100 | ||
3bc29f0a | 101 | LTTNG_TRACEPOINT_EVENT(ext4_mark_inode_dirty, |
b87700e3 AG |
102 | TP_PROTO(struct inode *inode, unsigned long IP), |
103 | ||
104 | TP_ARGS(inode, IP), | |
105 | ||
f127e61e MD |
106 | TP_FIELDS( |
107 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
108 | ctf_integer(ino_t, ino, inode->i_ino) | |
109 | ctf_integer(unsigned long, ip, IP) | |
110 | ) | |
b87700e3 AG |
111 | ) |
112 | ||
3bc29f0a | 113 | LTTNG_TRACEPOINT_EVENT(ext4_begin_ordered_truncate, |
b87700e3 AG |
114 | TP_PROTO(struct inode *inode, loff_t new_size), |
115 | ||
116 | TP_ARGS(inode, new_size), | |
117 | ||
f127e61e MD |
118 | TP_FIELDS( |
119 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
120 | ctf_integer(ino_t, ino, inode->i_ino) | |
121 | ctf_integer(loff_t, new_size, new_size) | |
122 | ) | |
b87700e3 AG |
123 | ) |
124 | #endif | |
125 | ||
3bc29f0a | 126 | LTTNG_TRACEPOINT_EVENT_CLASS(ext4__write_begin, |
b87700e3 AG |
127 | |
128 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | |
129 | unsigned int flags), | |
130 | ||
131 | TP_ARGS(inode, pos, len, flags), | |
132 | ||
f127e61e MD |
133 | TP_FIELDS( |
134 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
135 | ctf_integer(ino_t, ino, inode->i_ino) | |
136 | ctf_integer(loff_t, pos, pos) | |
137 | ctf_integer(unsigned int, len, len) | |
138 | ctf_integer(unsigned int, flags, flags) | |
139 | ) | |
b87700e3 AG |
140 | ) |
141 | ||
3bc29f0a | 142 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_begin, ext4_write_begin, |
b87700e3 AG |
143 | |
144 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | |
145 | unsigned int flags), | |
146 | ||
147 | TP_ARGS(inode, pos, len, flags) | |
148 | ) | |
149 | ||
3bc29f0a | 150 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_begin, ext4_da_write_begin, |
b87700e3 AG |
151 | |
152 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | |
153 | unsigned int flags), | |
154 | ||
155 | TP_ARGS(inode, pos, len, flags) | |
156 | ) | |
157 | ||
3bc29f0a | 158 | LTTNG_TRACEPOINT_EVENT_CLASS(ext4__write_end, |
b87700e3 AG |
159 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
160 | unsigned int copied), | |
161 | ||
162 | TP_ARGS(inode, pos, len, copied), | |
163 | ||
f127e61e MD |
164 | TP_FIELDS( |
165 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
166 | ctf_integer(ino_t, ino, inode->i_ino) | |
167 | ctf_integer(loff_t, pos, pos) | |
168 | ctf_integer(unsigned int, len, len) | |
169 | ctf_integer(unsigned int, copied, copied) | |
170 | ) | |
b87700e3 AG |
171 | ) |
172 | ||
3bc29f0a | 173 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_end, ext4_ordered_write_end, |
b87700e3 AG |
174 | |
175 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | |
176 | unsigned int copied), | |
177 | ||
178 | TP_ARGS(inode, pos, len, copied) | |
179 | ) | |
180 | ||
3bc29f0a | 181 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_end, ext4_writeback_write_end, |
b87700e3 AG |
182 | |
183 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | |
184 | unsigned int copied), | |
185 | ||
186 | TP_ARGS(inode, pos, len, copied) | |
187 | ) | |
188 | ||
3bc29f0a | 189 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_end, ext4_journalled_write_end, |
b87700e3 AG |
190 | |
191 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | |
192 | unsigned int copied), | |
193 | ||
194 | TP_ARGS(inode, pos, len, copied) | |
195 | ) | |
196 | ||
3bc29f0a | 197 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_end, ext4_da_write_end, |
b87700e3 AG |
198 | |
199 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | |
200 | unsigned int copied), | |
201 | ||
202 | TP_ARGS(inode, pos, len, copied) | |
203 | ) | |
204 | ||
c6403de3 | 205 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40)) |
3bc29f0a | 206 | LTTNG_TRACEPOINT_EVENT(ext4_writepage, |
b87700e3 AG |
207 | TP_PROTO(struct inode *inode, struct page *page), |
208 | ||
209 | TP_ARGS(inode, page), | |
210 | ||
f127e61e MD |
211 | TP_FIELDS( |
212 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
213 | ctf_integer(ino_t, ino, inode->i_ino) | |
214 | ctf_integer(pgoff_t, index, page->index) | |
215 | ) | |
b87700e3 AG |
216 | ) |
217 | #endif | |
218 | ||
3bc29f0a | 219 | LTTNG_TRACEPOINT_EVENT(ext4_da_writepages, |
b87700e3 AG |
220 | TP_PROTO(struct inode *inode, struct writeback_control *wbc), |
221 | ||
222 | TP_ARGS(inode, wbc), | |
223 | ||
f127e61e MD |
224 | TP_FIELDS( |
225 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
226 | ctf_integer(ino_t, ino, inode->i_ino) | |
227 | ctf_integer(long, nr_to_write, wbc->nr_to_write) | |
228 | ctf_integer(long, pages_skipped, wbc->pages_skipped) | |
229 | ctf_integer(loff_t, range_start, wbc->range_start) | |
230 | ctf_integer(loff_t, range_end, wbc->range_end) | |
231 | ctf_integer(pgoff_t, writeback_index, inode->i_mapping->writeback_index) | |
b87700e3 | 232 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) |
f127e61e | 233 | ctf_integer(int, sync_mode, wbc->sync_mode) |
b87700e3 AG |
234 | #endif |
235 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)) | |
f127e61e | 236 | ctf_integer(char, nonblocking, wbc->nonblocking) |
b87700e3 | 237 | #endif |
f127e61e | 238 | ctf_integer(char, for_kupdate, wbc->for_kupdate) |
b87700e3 | 239 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) |
f127e61e | 240 | ctf_integer(char, for_reclaim, wbc->for_reclaim) |
b87700e3 | 241 | #endif |
f127e61e MD |
242 | ctf_integer(char, range_cyclic, wbc->range_cyclic) |
243 | ) | |
b87700e3 AG |
244 | ) |
245 | ||
00be8842 MD |
246 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) |
247 | ||
3bc29f0a | 248 | LTTNG_TRACEPOINT_EVENT(ext4_da_write_pages, |
00be8842 MD |
249 | TP_PROTO(struct inode *inode, pgoff_t first_page, |
250 | struct writeback_control *wbc), | |
251 | ||
252 | TP_ARGS(inode, first_page, wbc), | |
253 | ||
f127e61e MD |
254 | TP_FIELDS( |
255 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
256 | ctf_integer(ino_t, ino, inode->i_ino) | |
257 | ctf_integer(pgoff_t, first_page, first_page) | |
258 | ctf_integer(long, nr_to_write, wbc->nr_to_write) | |
259 | ctf_integer(int, sync_mode, wbc->sync_mode) | |
260 | ) | |
00be8842 MD |
261 | ) |
262 | ||
263 | #else | |
264 | ||
3bc29f0a | 265 | LTTNG_TRACEPOINT_EVENT(ext4_da_write_pages, |
b87700e3 AG |
266 | TP_PROTO(struct inode *inode, struct mpage_da_data *mpd), |
267 | ||
268 | TP_ARGS(inode, mpd), | |
269 | ||
f127e61e MD |
270 | TP_FIELDS( |
271 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
272 | ctf_integer(ino_t, ino, inode->i_ino) | |
273 | ctf_integer(__u64, b_blocknr, mpd->b_blocknr) | |
274 | ctf_integer(__u32, b_size, mpd->b_size) | |
275 | ctf_integer(__u32, b_state, mpd->b_state) | |
276 | ctf_integer(unsigned long, first_page, mpd->first_page) | |
277 | ctf_integer(int, io_done, mpd->io_done) | |
278 | ctf_integer(int, pages_written, mpd->pages_written) | |
b87700e3 | 279 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) |
7e626201 | 280 | ctf_integer(int, sync_mode, mpd->wbc->sync_mode) |
b87700e3 | 281 | #endif |
f127e61e | 282 | ) |
b87700e3 AG |
283 | ) |
284 | ||
00be8842 MD |
285 | #endif |
286 | ||
c1b29b59 MD |
287 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) |
288 | ||
3bc29f0a | 289 | LTTNG_TRACEPOINT_EVENT(ext4_da_write_pages_extent, |
c1b29b59 MD |
290 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map), |
291 | ||
292 | TP_ARGS(inode, map), | |
293 | ||
f127e61e MD |
294 | TP_FIELDS( |
295 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
296 | ctf_integer(ino_t, ino, inode->i_ino) | |
297 | ctf_integer(__u64, lblk, map->m_lblk) | |
298 | ctf_integer(__u32, len, map->m_len) | |
299 | ctf_integer(__u32, flags, map->m_flags) | |
300 | ) | |
c1b29b59 MD |
301 | ) |
302 | ||
303 | #endif | |
304 | ||
3bc29f0a | 305 | LTTNG_TRACEPOINT_EVENT(ext4_da_writepages_result, |
b87700e3 AG |
306 | TP_PROTO(struct inode *inode, struct writeback_control *wbc, |
307 | int ret, int pages_written), | |
308 | ||
309 | TP_ARGS(inode, wbc, ret, pages_written), | |
310 | ||
f127e61e MD |
311 | TP_FIELDS( |
312 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
313 | ctf_integer(ino_t, ino, inode->i_ino) | |
314 | ctf_integer(int, ret, ret) | |
315 | ctf_integer(int, pages_written, pages_written) | |
316 | ctf_integer(long, pages_skipped, wbc->pages_skipped) | |
317 | ctf_integer(pgoff_t, writeback_index, inode->i_mapping->writeback_index) | |
b87700e3 | 318 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) |
f127e61e | 319 | ctf_integer(int, sync_mode, wbc->sync_mode) |
b87700e3 AG |
320 | #endif |
321 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) | |
f127e61e | 322 | ctf_integer(char, encountered_congestion, wbc->encountered_congestion) |
b87700e3 AG |
323 | #endif |
324 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)) | |
f127e61e | 325 | ctf_integer(char, more_io, wbc->more_io) |
b87700e3 AG |
326 | #endif |
327 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) | |
f127e61e | 328 | ctf_integer(char, no_nrwrite_index_update, wbc->no_nrwrite_index_update) |
b87700e3 | 329 | #endif |
f127e61e | 330 | ) |
b87700e3 AG |
331 | ) |
332 | ||
333 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) | |
3bc29f0a | 334 | LTTNG_TRACEPOINT_EVENT_CLASS(ext4__page_op, |
b87700e3 AG |
335 | TP_PROTO(struct page *page), |
336 | ||
337 | TP_ARGS(page), | |
338 | ||
f127e61e MD |
339 | TP_FIELDS( |
340 | ctf_integer(dev_t, dev, page->mapping->host->i_sb->s_dev) | |
341 | ctf_integer(ino_t, ino, page->mapping->host->i_ino) | |
342 | ctf_integer(pgoff_t, index, page->index) | |
343 | ) | |
b87700e3 AG |
344 | ) |
345 | ||
c6403de3 | 346 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40)) |
3bc29f0a | 347 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__page_op, ext4_writepage, |
b87700e3 AG |
348 | |
349 | TP_PROTO(struct page *page), | |
350 | ||
351 | TP_ARGS(page) | |
352 | ) | |
353 | #endif | |
354 | ||
3bc29f0a | 355 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__page_op, ext4_readpage, |
b87700e3 AG |
356 | |
357 | TP_PROTO(struct page *page), | |
358 | ||
359 | TP_ARGS(page) | |
360 | ) | |
361 | ||
3bc29f0a | 362 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__page_op, ext4_releasepage, |
b87700e3 AG |
363 | |
364 | TP_PROTO(struct page *page), | |
365 | ||
366 | TP_ARGS(page) | |
367 | ) | |
368 | ||
00be8842 MD |
369 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) |
370 | ||
3bc29f0a | 371 | LTTNG_TRACEPOINT_EVENT_CLASS(ext4_invalidatepage_op, |
00be8842 MD |
372 | TP_PROTO(struct page *page, unsigned int offset, unsigned int length), |
373 | ||
374 | TP_ARGS(page, offset, length), | |
375 | ||
f127e61e MD |
376 | TP_FIELDS( |
377 | ctf_integer(dev_t, dev, page->mapping->host->i_sb->s_dev) | |
378 | ctf_integer(ino_t, ino, page->mapping->host->i_ino) | |
379 | ctf_integer(pgoff_t, index, page->index) | |
380 | ctf_integer(unsigned int, offset, offset) | |
381 | ctf_integer(unsigned int, length, length) | |
382 | ) | |
00be8842 MD |
383 | ) |
384 | ||
3bc29f0a | 385 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4_invalidatepage_op, ext4_invalidatepage, |
00be8842 MD |
386 | TP_PROTO(struct page *page, unsigned int offset, unsigned int length), |
387 | ||
388 | TP_ARGS(page, offset, length) | |
389 | ) | |
390 | ||
3bc29f0a | 391 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4_invalidatepage_op, ext4_journalled_invalidatepage, |
00be8842 MD |
392 | TP_PROTO(struct page *page, unsigned int offset, unsigned int length), |
393 | ||
394 | TP_ARGS(page, offset, length) | |
395 | ) | |
396 | ||
397 | #else | |
398 | ||
3bc29f0a | 399 | LTTNG_TRACEPOINT_EVENT(ext4_invalidatepage, |
b87700e3 AG |
400 | TP_PROTO(struct page *page, unsigned long offset), |
401 | ||
402 | TP_ARGS(page, offset), | |
403 | ||
f127e61e MD |
404 | TP_FIELDS( |
405 | ctf_integer(dev_t, dev, page->mapping->host->i_sb->s_dev) | |
406 | ctf_integer(ino_t, ino, page->mapping->host->i_ino) | |
407 | ctf_integer(pgoff_t, index, page->index) | |
408 | ctf_integer(unsigned long, offset, offset) | |
b87700e3 | 409 | |
f127e61e | 410 | ) |
b87700e3 | 411 | ) |
00be8842 MD |
412 | |
413 | #endif | |
414 | ||
b87700e3 AG |
415 | #endif |
416 | ||
3bc29f0a | 417 | LTTNG_TRACEPOINT_EVENT(ext4_discard_blocks, |
b87700e3 AG |
418 | TP_PROTO(struct super_block *sb, unsigned long long blk, |
419 | unsigned long long count), | |
420 | ||
421 | TP_ARGS(sb, blk, count), | |
422 | ||
f127e61e MD |
423 | TP_FIELDS( |
424 | ctf_integer(dev_t, dev, sb->s_dev) | |
425 | ctf_integer(__u64, blk, blk) | |
426 | ctf_integer(__u64, count, count) | |
427 | ) | |
b87700e3 AG |
428 | ) |
429 | ||
3bc29f0a | 430 | LTTNG_TRACEPOINT_EVENT_CLASS(ext4__mb_new_pa, |
b87700e3 AG |
431 | TP_PROTO(struct ext4_allocation_context *ac, |
432 | struct ext4_prealloc_space *pa), | |
433 | ||
434 | TP_ARGS(ac, pa), | |
435 | ||
f127e61e MD |
436 | TP_FIELDS( |
437 | ctf_integer(dev_t, dev, ac->ac_sb->s_dev) | |
438 | ctf_integer(ino_t, ino, ac->ac_inode->i_ino) | |
439 | ctf_integer(__u64, pa_pstart, pa->pa_pstart) | |
440 | ctf_integer(__u64, pa_lstart, pa->pa_lstart) | |
441 | ctf_integer(__u32, pa_len, pa->pa_len) | |
442 | ) | |
b87700e3 AG |
443 | ) |
444 | ||
3bc29f0a | 445 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mb_new_pa, ext4_mb_new_inode_pa, |
b87700e3 AG |
446 | |
447 | TP_PROTO(struct ext4_allocation_context *ac, | |
448 | struct ext4_prealloc_space *pa), | |
449 | ||
450 | TP_ARGS(ac, pa) | |
451 | ) | |
452 | ||
3bc29f0a | 453 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mb_new_pa, ext4_mb_new_group_pa, |
b87700e3 AG |
454 | |
455 | TP_PROTO(struct ext4_allocation_context *ac, | |
456 | struct ext4_prealloc_space *pa), | |
457 | ||
458 | TP_ARGS(ac, pa) | |
459 | ) | |
460 | ||
3bc29f0a | 461 | LTTNG_TRACEPOINT_EVENT(ext4_mb_release_inode_pa, |
b87700e3 | 462 | TP_PROTO( |
c6403de3 | 463 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40)) |
b87700e3 AG |
464 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) |
465 | struct super_block *sb, | |
466 | struct inode *inode, | |
467 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) | |
468 | struct super_block *sb, | |
469 | struct ext4_allocation_context *ac, | |
470 | #else | |
471 | struct ext4_allocation_context *ac, | |
472 | #endif | |
473 | #endif | |
474 | struct ext4_prealloc_space *pa, | |
475 | unsigned long long block, unsigned int count), | |
476 | ||
c6403de3 | 477 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40)) |
b87700e3 AG |
478 | TP_ARGS(pa, block, count), |
479 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) | |
480 | TP_ARGS(sb, inode, pa, block, count), | |
481 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) | |
482 | TP_ARGS(sb, ac, pa, block, count), | |
483 | #else | |
484 | TP_ARGS(ac, pa, block, count), | |
485 | #endif | |
486 | ||
f127e61e | 487 | TP_FIELDS( |
c6403de3 | 488 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40)) |
f127e61e MD |
489 | ctf_integer(dev_t, dev, pa->pa_inode->i_sb->s_dev) |
490 | ctf_integer(ino_t, ino, pa->pa_inode->i_ino) | |
b87700e3 AG |
491 | #else |
492 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) | |
f127e61e | 493 | ctf_integer(dev_t, dev, sb->s_dev) |
b87700e3 | 494 | #else |
f127e61e | 495 | ctf_integer(dev_t, dev, ac->ac_sb->s_dev) |
b87700e3 AG |
496 | #endif |
497 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) | |
f127e61e | 498 | ctf_integer(ino_t, ino, inode->i_ino) |
b87700e3 | 499 | #else |
f127e61e MD |
500 | ctf_integer(ino_t, ino, |
501 | (ac && ac->ac_inode) ? ac->ac_inode->i_ino : 0) | |
b87700e3 AG |
502 | #endif |
503 | #endif | |
f127e61e MD |
504 | ctf_integer(__u64, block, block) |
505 | ctf_integer(__u32, count, count) | |
506 | ) | |
b87700e3 AG |
507 | ) |
508 | ||
3bc29f0a | 509 | LTTNG_TRACEPOINT_EVENT(ext4_mb_release_group_pa, |
b87700e3 | 510 | |
c6403de3 | 511 | #if (LTTNG_KERNEL_RANGE(2,6,40, 3,3,0)) |
b87700e3 AG |
512 | TP_PROTO(struct ext4_prealloc_space *pa), |
513 | ||
514 | TP_ARGS(pa), | |
515 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) | |
516 | TP_PROTO(struct super_block *sb, struct ext4_prealloc_space *pa), | |
517 | ||
518 | TP_ARGS(sb, pa), | |
519 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) | |
520 | TP_PROTO(struct super_block *sb, | |
521 | struct ext4_allocation_context *ac, | |
522 | struct ext4_prealloc_space *pa), | |
523 | ||
524 | TP_ARGS(sb, ac, pa), | |
525 | #else | |
526 | TP_PROTO(struct ext4_allocation_context *ac, | |
527 | struct ext4_prealloc_space *pa), | |
528 | ||
529 | TP_ARGS(ac, pa), | |
530 | #endif | |
531 | ||
f127e61e | 532 | TP_FIELDS( |
c6403de3 | 533 | #if (LTTNG_KERNEL_RANGE(2,6,40, 3,3,0)) |
f127e61e | 534 | ctf_integer(dev_t, dev, pa->pa_inode->i_sb->s_dev) |
b87700e3 | 535 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) |
f127e61e | 536 | ctf_integer(dev_t, dev, sb->s_dev) |
b87700e3 | 537 | #else |
f127e61e | 538 | ctf_integer(dev_t, dev, ac->ac_sb->s_dev) |
b87700e3 AG |
539 | #endif |
540 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)) | |
f127e61e MD |
541 | ctf_integer(ino_t, ino, |
542 | (ac && ac->ac_inode) ? ac->ac_inode->i_ino : 0) | |
b87700e3 | 543 | #endif |
f127e61e MD |
544 | ctf_integer(__u64, pa_pstart, pa->pa_pstart) |
545 | ctf_integer(__u32, pa_len, pa->pa_len) | |
546 | ) | |
b87700e3 AG |
547 | ) |
548 | ||
3bc29f0a | 549 | LTTNG_TRACEPOINT_EVENT(ext4_discard_preallocations, |
b87700e3 AG |
550 | TP_PROTO(struct inode *inode), |
551 | ||
552 | TP_ARGS(inode), | |
553 | ||
f127e61e MD |
554 | TP_FIELDS( |
555 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
556 | ctf_integer(ino_t, ino, inode->i_ino) | |
557 | ) | |
b87700e3 AG |
558 | ) |
559 | ||
3bc29f0a | 560 | LTTNG_TRACEPOINT_EVENT(ext4_mb_discard_preallocations, |
b87700e3 AG |
561 | TP_PROTO(struct super_block *sb, int needed), |
562 | ||
563 | TP_ARGS(sb, needed), | |
564 | ||
f127e61e MD |
565 | TP_FIELDS( |
566 | ctf_integer(dev_t, dev, sb->s_dev) | |
567 | ctf_integer(int, needed, needed) | |
568 | ) | |
b87700e3 AG |
569 | ) |
570 | ||
3bc29f0a | 571 | LTTNG_TRACEPOINT_EVENT(ext4_request_blocks, |
b87700e3 AG |
572 | TP_PROTO(struct ext4_allocation_request *ar), |
573 | ||
574 | TP_ARGS(ar), | |
575 | ||
f127e61e MD |
576 | TP_FIELDS( |
577 | ctf_integer(dev_t, dev, ar->inode->i_sb->s_dev) | |
578 | ctf_integer(ino_t, ino, ar->inode->i_ino) | |
579 | ctf_integer(unsigned int, len, ar->len) | |
580 | ctf_integer(__u32, logical, ar->logical) | |
581 | ctf_integer(__u32, lleft, ar->lleft) | |
582 | ctf_integer(__u32, lright, ar->lright) | |
583 | ctf_integer(__u64, goal, ar->goal) | |
584 | ctf_integer(__u64, pleft, ar->pleft) | |
585 | ctf_integer(__u64, pright, ar->pright) | |
586 | ctf_integer(unsigned int, flags, ar->flags) | |
587 | ) | |
b87700e3 AG |
588 | ) |
589 | ||
3bc29f0a | 590 | LTTNG_TRACEPOINT_EVENT(ext4_allocate_blocks, |
b87700e3 AG |
591 | TP_PROTO(struct ext4_allocation_request *ar, unsigned long long block), |
592 | ||
593 | TP_ARGS(ar, block), | |
594 | ||
f127e61e MD |
595 | TP_FIELDS( |
596 | ctf_integer(dev_t, dev, ar->inode->i_sb->s_dev) | |
597 | ctf_integer(ino_t, ino, ar->inode->i_ino) | |
598 | ctf_integer(__u64, block, block) | |
599 | ctf_integer(unsigned int, len, ar->len) | |
600 | ctf_integer(__u32, logical, ar->logical) | |
601 | ctf_integer(__u32, lleft, ar->lleft) | |
602 | ctf_integer(__u32, lright, ar->lright) | |
603 | ctf_integer(__u64, goal, ar->goal) | |
604 | ctf_integer(__u64, pleft, ar->pleft) | |
605 | ctf_integer(__u64, pright, ar->pright) | |
606 | ctf_integer(unsigned int, flags, ar->flags) | |
607 | ) | |
b87700e3 AG |
608 | ) |
609 | ||
3bc29f0a | 610 | LTTNG_TRACEPOINT_EVENT(ext4_free_blocks, |
b87700e3 AG |
611 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) |
612 | TP_PROTO(struct inode *inode, __u64 block, unsigned long count, | |
613 | int flags), | |
614 | ||
615 | TP_ARGS(inode, block, count, flags), | |
616 | #else | |
617 | TP_PROTO(struct inode *inode, __u64 block, unsigned long count, | |
618 | int metadata), | |
619 | ||
620 | TP_ARGS(inode, block, count, metadata), | |
621 | #endif | |
622 | ||
f127e61e MD |
623 | TP_FIELDS( |
624 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
625 | ctf_integer(ino_t, ino, inode->i_ino) | |
626 | ctf_integer(__u64, block, block) | |
627 | ctf_integer(unsigned long, count, count) | |
b87700e3 | 628 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) |
f127e61e MD |
629 | ctf_integer(int, flags, flags) |
630 | ctf_integer(TP_MODE_T, mode, inode->i_mode) | |
b87700e3 | 631 | #else |
f127e61e | 632 | ctf_integer(int, metadata, metadata) |
b87700e3 | 633 | #endif |
f127e61e | 634 | ) |
b87700e3 AG |
635 | ) |
636 | ||
637 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) | |
3bc29f0a | 638 | LTTNG_TRACEPOINT_EVENT(ext4_sync_file_enter, |
b87700e3 | 639 | #else |
3bc29f0a | 640 | LTTNG_TRACEPOINT_EVENT(ext4_sync_file, |
b87700e3 AG |
641 | #endif |
642 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) | |
643 | TP_PROTO(struct file *file, int datasync), | |
644 | ||
645 | TP_ARGS(file, datasync), | |
646 | #else | |
647 | TP_PROTO(struct file *file, struct dentry *dentry, int datasync), | |
648 | ||
649 | TP_ARGS(file, dentry, datasync), | |
650 | #endif | |
651 | ||
f127e61e | 652 | TP_FIELDS( |
b87700e3 | 653 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) |
f127e61e MD |
654 | ctf_integer(dev_t, dev, file->f_path.dentry->d_inode->i_sb->s_dev) |
655 | ctf_integer(ino_t, ino, file->f_path.dentry->d_inode->i_ino) | |
656 | ctf_integer(ino_t, parent, file->f_path.dentry->d_parent->d_inode->i_ino) | |
b87700e3 | 657 | #else |
f127e61e MD |
658 | ctf_integer(dev_t, dev, dentry->d_inode->i_sb->s_dev) |
659 | ctf_integer(ino_t, ino, dentry->d_inode->i_ino) | |
660 | ctf_integer(ino_t, parent, dentry->d_parent->d_inode->i_ino) | |
b87700e3 | 661 | #endif |
f127e61e MD |
662 | ctf_integer(int, datasync, datasync) |
663 | ) | |
b87700e3 AG |
664 | ) |
665 | ||
666 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) | |
3bc29f0a | 667 | LTTNG_TRACEPOINT_EVENT(ext4_sync_file_exit, |
b87700e3 AG |
668 | TP_PROTO(struct inode *inode, int ret), |
669 | ||
670 | TP_ARGS(inode, ret), | |
671 | ||
f127e61e MD |
672 | TP_FIELDS( |
673 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
674 | ctf_integer(ino_t, ino, inode->i_ino) | |
675 | ctf_integer(int, ret, ret) | |
676 | ) | |
b87700e3 AG |
677 | ) |
678 | #endif | |
679 | ||
3bc29f0a | 680 | LTTNG_TRACEPOINT_EVENT(ext4_sync_fs, |
b87700e3 AG |
681 | TP_PROTO(struct super_block *sb, int wait), |
682 | ||
683 | TP_ARGS(sb, wait), | |
684 | ||
f127e61e MD |
685 | TP_FIELDS( |
686 | ctf_integer(dev_t, dev, sb->s_dev) | |
687 | ctf_integer(int, wait, wait) | |
b87700e3 | 688 | |
f127e61e | 689 | ) |
b87700e3 AG |
690 | ) |
691 | ||
3bc29f0a | 692 | LTTNG_TRACEPOINT_EVENT(ext4_alloc_da_blocks, |
b87700e3 AG |
693 | TP_PROTO(struct inode *inode), |
694 | ||
695 | TP_ARGS(inode), | |
696 | ||
f127e61e MD |
697 | TP_FIELDS( |
698 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
699 | ctf_integer(ino_t, ino, inode->i_ino) | |
700 | ctf_integer(unsigned int, data_blocks, EXT4_I(inode)->i_reserved_data_blocks) | |
701 | ctf_integer(unsigned int, meta_blocks, EXT4_I(inode)->i_reserved_meta_blocks) | |
702 | ) | |
b87700e3 AG |
703 | ) |
704 | ||
3bc29f0a | 705 | LTTNG_TRACEPOINT_EVENT(ext4_mballoc_alloc, |
b87700e3 AG |
706 | TP_PROTO(struct ext4_allocation_context *ac), |
707 | ||
708 | TP_ARGS(ac), | |
709 | ||
f127e61e MD |
710 | TP_FIELDS( |
711 | ctf_integer(dev_t, dev, ac->ac_inode->i_sb->s_dev) | |
712 | ctf_integer(ino_t, ino, ac->ac_inode->i_ino) | |
713 | ctf_integer(__u32, orig_logical, ac->ac_o_ex.fe_logical) | |
714 | ctf_integer(int, orig_start, ac->ac_o_ex.fe_start) | |
715 | ctf_integer(__u32, orig_group, ac->ac_o_ex.fe_group) | |
716 | ctf_integer(int, orig_len, ac->ac_o_ex.fe_len) | |
717 | ctf_integer(__u32, goal_logical, ac->ac_g_ex.fe_logical) | |
718 | ctf_integer(int, goal_start, ac->ac_g_ex.fe_start) | |
719 | ctf_integer(__u32, goal_group, ac->ac_g_ex.fe_group) | |
720 | ctf_integer(int, goal_len, ac->ac_g_ex.fe_len) | |
721 | ctf_integer(__u32, result_logical, ac->ac_f_ex.fe_logical) | |
722 | ctf_integer(int, result_start, ac->ac_f_ex.fe_start) | |
723 | ctf_integer(__u32, result_group, ac->ac_f_ex.fe_group) | |
724 | ctf_integer(int, result_len, ac->ac_f_ex.fe_len) | |
725 | ctf_integer(__u16, found, ac->ac_found) | |
726 | ctf_integer(__u16, groups, ac->ac_groups_scanned) | |
727 | ctf_integer(__u16, buddy, ac->ac_buddy) | |
728 | ctf_integer(__u16, flags, ac->ac_flags) | |
729 | ctf_integer(__u16, tail, ac->ac_tail) | |
730 | ctf_integer(__u8, cr, ac->ac_criteria) | |
731 | ) | |
b87700e3 AG |
732 | ) |
733 | ||
3bc29f0a | 734 | LTTNG_TRACEPOINT_EVENT(ext4_mballoc_prealloc, |
b87700e3 AG |
735 | TP_PROTO(struct ext4_allocation_context *ac), |
736 | ||
737 | TP_ARGS(ac), | |
738 | ||
f127e61e MD |
739 | TP_FIELDS( |
740 | ctf_integer(dev_t, dev, ac->ac_inode->i_sb->s_dev) | |
741 | ctf_integer(ino_t, ino, ac->ac_inode->i_ino) | |
742 | ctf_integer(__u32, orig_logical, ac->ac_o_ex.fe_logical) | |
743 | ctf_integer(int, orig_start, ac->ac_o_ex.fe_start) | |
744 | ctf_integer(__u32, orig_group, ac->ac_o_ex.fe_group) | |
745 | ctf_integer(int, orig_len, ac->ac_o_ex.fe_len) | |
746 | ctf_integer(__u32, result_logical, ac->ac_b_ex.fe_logical) | |
747 | ctf_integer(int, result_start, ac->ac_b_ex.fe_start) | |
748 | ctf_integer(__u32, result_group, ac->ac_b_ex.fe_group) | |
749 | ctf_integer(int, result_len, ac->ac_b_ex.fe_len) | |
750 | ) | |
b87700e3 AG |
751 | ) |
752 | ||
3bc29f0a | 753 | LTTNG_TRACEPOINT_EVENT_CLASS(ext4__mballoc, |
b87700e3 AG |
754 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) |
755 | TP_PROTO(struct super_block *sb, | |
756 | struct inode *inode, | |
757 | ext4_group_t group, | |
758 | ext4_grpblk_t start, | |
759 | ext4_grpblk_t len), | |
760 | ||
761 | TP_ARGS(sb, inode, group, start, len), | |
762 | #else | |
763 | TP_PROTO(struct ext4_allocation_context *ac), | |
764 | ||
765 | TP_ARGS(ac), | |
766 | #endif | |
767 | ||
f127e61e | 768 | TP_FIELDS( |
b87700e3 | 769 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) |
f127e61e MD |
770 | ctf_integer(dev_t, dev, sb->s_dev) |
771 | ctf_integer(ino_t, ino, inode ? inode->i_ino : 0) | |
772 | ctf_integer(int, result_start, start) | |
773 | ctf_integer(__u32, result_group, group) | |
774 | ctf_integer(int, result_len, len) | |
b87700e3 | 775 | #else |
f127e61e MD |
776 | ctf_integer(dev_t, dev, ac->ac_sb->s_dev) |
777 | ctf_integer(ino_t, ino, ac->ac_inode ? ac->ac_inode->i_ino : 0) | |
778 | ctf_integer(__u32, result_logical, ac->ac_b_ex.fe_logical) | |
779 | ctf_integer(int, result_start, ac->ac_b_ex.fe_start) | |
780 | ctf_integer(__u32, result_group, ac->ac_b_ex.fe_group) | |
781 | ctf_integer(int, result_len, ac->ac_b_ex.fe_len) | |
b87700e3 AG |
782 | #endif |
783 | ) | |
784 | ) | |
785 | ||
3bc29f0a | 786 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mballoc, ext4_mballoc_discard, |
b87700e3 AG |
787 | |
788 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) | |
789 | TP_PROTO(struct super_block *sb, | |
790 | struct inode *inode, | |
791 | ext4_group_t group, | |
792 | ext4_grpblk_t start, | |
793 | ext4_grpblk_t len), | |
794 | ||
795 | TP_ARGS(sb, inode, group, start, len) | |
796 | #else | |
797 | TP_PROTO(struct ext4_allocation_context *ac), | |
798 | ||
799 | TP_ARGS(ac) | |
800 | #endif | |
801 | ) | |
802 | ||
3bc29f0a | 803 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mballoc, ext4_mballoc_free, |
b87700e3 AG |
804 | |
805 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) | |
806 | TP_PROTO(struct super_block *sb, | |
807 | struct inode *inode, | |
808 | ext4_group_t group, | |
809 | ext4_grpblk_t start, | |
810 | ext4_grpblk_t len), | |
811 | ||
812 | TP_ARGS(sb, inode, group, start, len) | |
813 | #else | |
814 | TP_PROTO(struct ext4_allocation_context *ac), | |
815 | ||
816 | TP_ARGS(ac) | |
817 | #endif | |
818 | ) | |
819 | ||
820 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) | |
3bc29f0a | 821 | LTTNG_TRACEPOINT_EVENT(ext4_forget, |
b87700e3 AG |
822 | TP_PROTO(struct inode *inode, int is_metadata, __u64 block), |
823 | ||
824 | TP_ARGS(inode, is_metadata, block), | |
825 | ||
f127e61e MD |
826 | TP_FIELDS( |
827 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
828 | ctf_integer(ino_t, ino, inode->i_ino) | |
829 | ctf_integer(__u64, block, block) | |
830 | ctf_integer(int, is_metadata, is_metadata) | |
831 | ctf_integer(TP_MODE_T, mode, inode->i_mode) | |
832 | ) | |
b87700e3 AG |
833 | ) |
834 | #endif | |
835 | ||
836 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) | |
3bc29f0a | 837 | LTTNG_TRACEPOINT_EVENT(ext4_da_update_reserve_space, |
b87700e3 AG |
838 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) |
839 | TP_PROTO(struct inode *inode, int used_blocks, int quota_claim), | |
840 | ||
841 | TP_ARGS(inode, used_blocks, quota_claim), | |
842 | #else | |
843 | TP_PROTO(struct inode *inode, int used_blocks), | |
844 | ||
845 | TP_ARGS(inode, used_blocks), | |
846 | #endif | |
847 | ||
f127e61e MD |
848 | TP_FIELDS( |
849 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
850 | ctf_integer(ino_t, ino, inode->i_ino) | |
851 | ctf_integer(__u64, i_blocks, inode->i_blocks) | |
852 | ctf_integer(int, used_blocks, used_blocks) | |
853 | ctf_integer(int, reserved_data_blocks, | |
b87700e3 | 854 | EXT4_I(inode)->i_reserved_data_blocks) |
f127e61e | 855 | ctf_integer(int, reserved_meta_blocks, |
b87700e3 | 856 | EXT4_I(inode)->i_reserved_meta_blocks) |
f127e61e | 857 | ctf_integer(int, allocated_meta_blocks, |
b87700e3 AG |
858 | EXT4_I(inode)->i_allocated_meta_blocks) |
859 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) | |
f127e61e | 860 | ctf_integer(int, quota_claim, quota_claim) |
b87700e3 | 861 | #endif |
f127e61e MD |
862 | ctf_integer(TP_MODE_T, mode, inode->i_mode) |
863 | ) | |
b87700e3 AG |
864 | ) |
865 | ||
43d4aa96 MD |
866 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)) |
867 | LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space, | |
868 | TP_PROTO(struct inode *inode), | |
869 | ||
870 | TP_ARGS(inode), | |
871 | ||
872 | TP_FIELDS( | |
873 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
874 | ctf_integer(ino_t, ino, inode->i_ino) | |
875 | ctf_integer(__u64, i_blocks, inode->i_blocks) | |
876 | ctf_integer(int, reserved_data_blocks, | |
877 | EXT4_I(inode)->i_reserved_data_blocks) | |
878 | ctf_integer(int, reserved_meta_blocks, | |
879 | EXT4_I(inode)->i_reserved_meta_blocks) | |
880 | ctf_integer(TP_MODE_T, mode, inode->i_mode) | |
881 | ) | |
882 | ) | |
883 | #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)) */ | |
3bc29f0a | 884 | LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space, |
b87700e3 AG |
885 | TP_PROTO(struct inode *inode, int md_needed), |
886 | ||
887 | TP_ARGS(inode, md_needed), | |
888 | ||
f127e61e MD |
889 | TP_FIELDS( |
890 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
891 | ctf_integer(ino_t, ino, inode->i_ino) | |
892 | ctf_integer(__u64, i_blocks, inode->i_blocks) | |
893 | ctf_integer(int, md_needed, md_needed) | |
894 | ctf_integer(int, reserved_data_blocks, | |
b87700e3 | 895 | EXT4_I(inode)->i_reserved_data_blocks) |
f127e61e | 896 | ctf_integer(int, reserved_meta_blocks, |
b87700e3 | 897 | EXT4_I(inode)->i_reserved_meta_blocks) |
f127e61e MD |
898 | ctf_integer(TP_MODE_T, mode, inode->i_mode) |
899 | ) | |
b87700e3 | 900 | ) |
43d4aa96 | 901 | #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)) */ |
b87700e3 | 902 | |
3bc29f0a | 903 | LTTNG_TRACEPOINT_EVENT(ext4_da_release_space, |
b87700e3 AG |
904 | TP_PROTO(struct inode *inode, int freed_blocks), |
905 | ||
906 | TP_ARGS(inode, freed_blocks), | |
907 | ||
f127e61e MD |
908 | TP_FIELDS( |
909 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
910 | ctf_integer(ino_t, ino, inode->i_ino) | |
911 | ctf_integer(__u64, i_blocks, inode->i_blocks) | |
912 | ctf_integer(int, freed_blocks, freed_blocks) | |
913 | ctf_integer(int, reserved_data_blocks, | |
b87700e3 | 914 | EXT4_I(inode)->i_reserved_data_blocks) |
f127e61e | 915 | ctf_integer(int, reserved_meta_blocks, |
b87700e3 | 916 | EXT4_I(inode)->i_reserved_meta_blocks) |
f127e61e | 917 | ctf_integer(int, allocated_meta_blocks, |
b87700e3 | 918 | EXT4_I(inode)->i_allocated_meta_blocks) |
f127e61e MD |
919 | ctf_integer(TP_MODE_T, mode, inode->i_mode) |
920 | ) | |
b87700e3 AG |
921 | ) |
922 | #endif | |
923 | ||
924 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) | |
3bc29f0a | 925 | LTTNG_TRACEPOINT_EVENT_CLASS(ext4__bitmap_load, |
b87700e3 AG |
926 | TP_PROTO(struct super_block *sb, unsigned long group), |
927 | ||
928 | TP_ARGS(sb, group), | |
929 | ||
f127e61e MD |
930 | TP_FIELDS( |
931 | ctf_integer(dev_t, dev, sb->s_dev) | |
932 | ctf_integer(__u32, group, group) | |
933 | ) | |
b87700e3 AG |
934 | ) |
935 | ||
3bc29f0a | 936 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load, ext4_mb_bitmap_load, |
b87700e3 AG |
937 | |
938 | TP_PROTO(struct super_block *sb, unsigned long group), | |
939 | ||
940 | TP_ARGS(sb, group) | |
941 | ) | |
942 | ||
3bc29f0a | 943 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load, ext4_mb_buddy_bitmap_load, |
b87700e3 AG |
944 | |
945 | TP_PROTO(struct super_block *sb, unsigned long group), | |
946 | ||
947 | TP_ARGS(sb, group) | |
948 | ) | |
949 | #endif | |
950 | ||
951 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) | |
3bc29f0a | 952 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load, ext4_read_block_bitmap_load, |
b87700e3 AG |
953 | |
954 | TP_PROTO(struct super_block *sb, unsigned long group), | |
955 | ||
956 | TP_ARGS(sb, group) | |
957 | ) | |
958 | ||
3bc29f0a | 959 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load, ext4_load_inode_bitmap, |
b87700e3 AG |
960 | |
961 | TP_PROTO(struct super_block *sb, unsigned long group), | |
962 | ||
963 | TP_ARGS(sb, group) | |
964 | ) | |
965 | ||
3bc29f0a | 966 | LTTNG_TRACEPOINT_EVENT(ext4_direct_IO_enter, |
b87700e3 AG |
967 | TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw), |
968 | ||
969 | TP_ARGS(inode, offset, len, rw), | |
970 | ||
f127e61e MD |
971 | TP_FIELDS( |
972 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
973 | ctf_integer(ino_t, ino, inode->i_ino) | |
974 | ctf_integer(loff_t, pos, offset) | |
975 | ctf_integer(unsigned long, len, len) | |
976 | ctf_integer(int, rw, rw) | |
977 | ) | |
b87700e3 AG |
978 | ) |
979 | ||
3bc29f0a | 980 | LTTNG_TRACEPOINT_EVENT(ext4_direct_IO_exit, |
b87700e3 AG |
981 | TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, |
982 | int rw, int ret), | |
983 | ||
984 | TP_ARGS(inode, offset, len, rw, ret), | |
985 | ||
f127e61e MD |
986 | TP_FIELDS( |
987 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
988 | ctf_integer(ino_t, ino, inode->i_ino) | |
989 | ctf_integer(loff_t, pos, offset) | |
990 | ctf_integer(unsigned long, len, len) | |
991 | ctf_integer(int, rw, rw) | |
992 | ctf_integer(int, ret, ret) | |
993 | ) | |
b87700e3 AG |
994 | ) |
995 | ||
3bc29f0a | 996 | LTTNG_TRACEPOINT_EVENT(ext4_fallocate_exit, |
11af8f55 MD |
997 | TP_PROTO(struct inode *inode, loff_t offset, |
998 | unsigned int max_blocks, int ret), | |
999 | ||
1000 | TP_ARGS(inode, offset, max_blocks, ret), | |
1001 | ||
f127e61e MD |
1002 | TP_FIELDS( |
1003 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1004 | ctf_integer(ino_t, ino, inode->i_ino) | |
1005 | ctf_integer(loff_t, pos, offset) | |
1006 | ctf_integer(unsigned int, blocks, max_blocks) | |
1007 | ctf_integer(int, ret, ret) | |
1008 | ) | |
11af8f55 MD |
1009 | ) |
1010 | ||
1011 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) | |
1012 | ||
3bc29f0a | 1013 | LTTNG_TRACEPOINT_EVENT_CLASS(ext4__fallocate_mode, |
b87700e3 AG |
1014 | TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode), |
1015 | ||
1016 | TP_ARGS(inode, offset, len, mode), | |
1017 | ||
f127e61e MD |
1018 | TP_FIELDS( |
1019 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1020 | ctf_integer(ino_t, ino, inode->i_ino) | |
1021 | ctf_integer(loff_t, pos, offset) | |
1022 | ctf_integer(loff_t, len, len) | |
1023 | ctf_integer(int, mode, mode) | |
1024 | ) | |
b87700e3 AG |
1025 | ) |
1026 | ||
3bc29f0a | 1027 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__fallocate_mode, ext4_fallocate_enter, |
b87700e3 | 1028 | |
11af8f55 MD |
1029 | TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode), |
1030 | ||
1031 | TP_ARGS(inode, offset, len, mode) | |
1032 | ) | |
1033 | ||
3bc29f0a | 1034 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__fallocate_mode, ext4_punch_hole, |
11af8f55 MD |
1035 | |
1036 | TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode), | |
1037 | ||
1038 | TP_ARGS(inode, offset, len, mode) | |
1039 | ) | |
1040 | ||
3bc29f0a | 1041 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__fallocate_mode, ext4_zero_range, |
11af8f55 MD |
1042 | |
1043 | TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode), | |
1044 | ||
1045 | TP_ARGS(inode, offset, len, mode) | |
1046 | ) | |
1047 | ||
1048 | #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */ | |
1049 | ||
3bc29f0a | 1050 | LTTNG_TRACEPOINT_EVENT(ext4_fallocate_enter, |
11af8f55 MD |
1051 | TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode), |
1052 | ||
1053 | TP_ARGS(inode, offset, len, mode), | |
b87700e3 | 1054 | |
f127e61e MD |
1055 | TP_FIELDS( |
1056 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1057 | ctf_integer(ino_t, ino, inode->i_ino) | |
1058 | ctf_integer(loff_t, pos, offset) | |
1059 | ctf_integer(loff_t, len, len) | |
1060 | ctf_integer(int, mode, mode) | |
1061 | ) | |
b87700e3 AG |
1062 | ) |
1063 | ||
c1b29b59 MD |
1064 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) |
1065 | ||
3bc29f0a | 1066 | LTTNG_TRACEPOINT_EVENT(ext4_punch_hole, |
c1b29b59 MD |
1067 | TP_PROTO(struct inode *inode, loff_t offset, loff_t len), |
1068 | ||
1069 | TP_ARGS(inode, offset, len), | |
1070 | ||
f127e61e MD |
1071 | TP_FIELDS( |
1072 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1073 | ctf_integer(ino_t, ino, inode->i_ino) | |
1074 | ctf_integer(loff_t, pos, offset) | |
1075 | ctf_integer(loff_t, len, len) | |
1076 | ) | |
c1b29b59 MD |
1077 | ) |
1078 | ||
11af8f55 MD |
1079 | #endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) */ |
1080 | ||
1081 | #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */ | |
c1b29b59 | 1082 | |
3bc29f0a | 1083 | LTTNG_TRACEPOINT_EVENT(ext4_unlink_enter, |
b87700e3 AG |
1084 | TP_PROTO(struct inode *parent, struct dentry *dentry), |
1085 | ||
1086 | TP_ARGS(parent, dentry), | |
1087 | ||
f127e61e MD |
1088 | TP_FIELDS( |
1089 | ctf_integer(dev_t, dev, dentry->d_inode->i_sb->s_dev) | |
1090 | ctf_integer(ino_t, ino, dentry->d_inode->i_ino) | |
1091 | ctf_integer(ino_t, parent, parent->i_ino) | |
1092 | ctf_integer(loff_t, size, dentry->d_inode->i_size) | |
1093 | ) | |
b87700e3 AG |
1094 | ) |
1095 | ||
3bc29f0a | 1096 | LTTNG_TRACEPOINT_EVENT(ext4_unlink_exit, |
b87700e3 AG |
1097 | TP_PROTO(struct dentry *dentry, int ret), |
1098 | ||
1099 | TP_ARGS(dentry, ret), | |
1100 | ||
f127e61e MD |
1101 | TP_FIELDS( |
1102 | ctf_integer(dev_t, dev, dentry->d_inode->i_sb->s_dev) | |
1103 | ctf_integer(ino_t, ino, dentry->d_inode->i_ino) | |
1104 | ctf_integer(int, ret, ret) | |
1105 | ) | |
b87700e3 AG |
1106 | ) |
1107 | ||
3bc29f0a | 1108 | LTTNG_TRACEPOINT_EVENT_CLASS(ext4__truncate, |
b87700e3 AG |
1109 | TP_PROTO(struct inode *inode), |
1110 | ||
1111 | TP_ARGS(inode), | |
1112 | ||
f127e61e MD |
1113 | TP_FIELDS( |
1114 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1115 | ctf_integer(ino_t, ino, inode->i_ino) | |
1116 | ctf_integer(unsigned int, blocks, inode->i_blocks) | |
1117 | ) | |
b87700e3 AG |
1118 | ) |
1119 | ||
3bc29f0a | 1120 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__truncate, ext4_truncate_enter, |
b87700e3 AG |
1121 | |
1122 | TP_PROTO(struct inode *inode), | |
1123 | ||
1124 | TP_ARGS(inode) | |
1125 | ) | |
1126 | ||
3bc29f0a | 1127 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__truncate, ext4_truncate_exit, |
b87700e3 AG |
1128 | |
1129 | TP_PROTO(struct inode *inode), | |
1130 | ||
1131 | TP_ARGS(inode) | |
1132 | ) | |
1133 | ||
1134 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) | |
1135 | /* 'ux' is the uninitialized extent. */ | |
3bc29f0a | 1136 | LTTNG_TRACEPOINT_EVENT(ext4_ext_convert_to_initialized_enter, |
b87700e3 AG |
1137 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, |
1138 | struct ext4_extent *ux), | |
1139 | ||
1140 | TP_ARGS(inode, map, ux), | |
1141 | ||
f127e61e MD |
1142 | TP_FIELDS( |
1143 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1144 | ctf_integer(ino_t, ino, inode->i_ino) | |
1145 | ctf_integer(ext4_lblk_t, m_lblk, map->m_lblk) | |
1146 | ctf_integer(unsigned, m_len, map->m_len) | |
1147 | ctf_integer(ext4_lblk_t, u_lblk, le32_to_cpu(ux->ee_block)) | |
1148 | ctf_integer(unsigned, u_len, ext4_ext_get_actual_len(ux)) | |
1149 | ctf_integer(ext4_fsblk_t, u_pblk, ext4_ext_pblock(ux)) | |
1150 | ) | |
b87700e3 AG |
1151 | ) |
1152 | ||
1153 | /* | |
1154 | * 'ux' is the uninitialized extent. | |
1155 | * 'ix' is the initialized extent to which blocks are transferred. | |
1156 | */ | |
3bc29f0a | 1157 | LTTNG_TRACEPOINT_EVENT(ext4_ext_convert_to_initialized_fastpath, |
b87700e3 AG |
1158 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, |
1159 | struct ext4_extent *ux, struct ext4_extent *ix), | |
1160 | ||
1161 | TP_ARGS(inode, map, ux, ix), | |
1162 | ||
f127e61e MD |
1163 | TP_FIELDS( |
1164 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1165 | ctf_integer(ino_t, ino, inode->i_ino) | |
1166 | ctf_integer(ext4_lblk_t, m_lblk, map->m_lblk) | |
1167 | ctf_integer(unsigned, m_len, map->m_len) | |
1168 | ctf_integer(ext4_lblk_t, u_lblk, le32_to_cpu(ux->ee_block)) | |
1169 | ctf_integer(unsigned, u_len, ext4_ext_get_actual_len(ux)) | |
1170 | ctf_integer(ext4_fsblk_t, u_pblk, ext4_ext_pblock(ux)) | |
1171 | ctf_integer(ext4_lblk_t, i_lblk, le32_to_cpu(ix->ee_block)) | |
1172 | ctf_integer(unsigned, i_len, ext4_ext_get_actual_len(ix)) | |
1173 | ctf_integer(ext4_fsblk_t, i_pblk, ext4_ext_pblock(ix)) | |
1174 | ) | |
b87700e3 AG |
1175 | ) |
1176 | #endif | |
1177 | ||
3bc29f0a | 1178 | LTTNG_TRACEPOINT_EVENT_CLASS(ext4__map_blocks_enter, |
b87700e3 AG |
1179 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
1180 | unsigned int len, unsigned int flags), | |
1181 | ||
1182 | TP_ARGS(inode, lblk, len, flags), | |
1183 | ||
f127e61e MD |
1184 | TP_FIELDS( |
1185 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1186 | ctf_integer(ino_t, ino, inode->i_ino) | |
1187 | ctf_integer(ext4_lblk_t, lblk, lblk) | |
1188 | ctf_integer(unsigned int, len, len) | |
1189 | ctf_integer(unsigned int, flags, flags) | |
1190 | ) | |
b87700e3 AG |
1191 | ) |
1192 | ||
3bc29f0a | 1193 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_enter, ext4_ext_map_blocks_enter, |
b87700e3 AG |
1194 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
1195 | unsigned len, unsigned flags), | |
1196 | ||
1197 | TP_ARGS(inode, lblk, len, flags) | |
1198 | ) | |
1199 | ||
3bc29f0a | 1200 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_enter, ext4_ind_map_blocks_enter, |
b87700e3 AG |
1201 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
1202 | unsigned len, unsigned flags), | |
1203 | ||
1204 | TP_ARGS(inode, lblk, len, flags) | |
1205 | ) | |
1206 | ||
00be8842 MD |
1207 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) |
1208 | ||
3bc29f0a | 1209 | LTTNG_TRACEPOINT_EVENT_CLASS(ext4__map_blocks_exit, |
00be8842 MD |
1210 | TP_PROTO(struct inode *inode, unsigned flags, struct ext4_map_blocks *map, |
1211 | int ret), | |
1212 | ||
1213 | TP_ARGS(inode, flags, map, ret), | |
1214 | ||
f127e61e MD |
1215 | TP_FIELDS( |
1216 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1217 | ctf_integer(ino_t, ino, inode->i_ino) | |
1218 | ctf_integer(unsigned int, flags, flags) | |
1219 | ctf_integer(ext4_fsblk_t, pblk, map->m_pblk) | |
1220 | ctf_integer(ext4_lblk_t, lblk, map->m_lblk) | |
1221 | ctf_integer(unsigned int, len, map->m_len) | |
1222 | ctf_integer(unsigned int, mflags, map->m_flags) | |
1223 | ctf_integer(int, ret, ret) | |
1224 | ) | |
00be8842 MD |
1225 | ) |
1226 | ||
3bc29f0a | 1227 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit, ext4_ext_map_blocks_exit, |
00be8842 MD |
1228 | TP_PROTO(struct inode *inode, unsigned flags, |
1229 | struct ext4_map_blocks *map, int ret), | |
1230 | ||
1231 | TP_ARGS(inode, flags, map, ret) | |
1232 | ) | |
1233 | ||
3bc29f0a | 1234 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit, ext4_ind_map_blocks_exit, |
00be8842 MD |
1235 | TP_PROTO(struct inode *inode, unsigned flags, |
1236 | struct ext4_map_blocks *map, int ret), | |
1237 | ||
1238 | TP_ARGS(inode, flags, map, ret) | |
1239 | ) | |
1240 | ||
1241 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) | |
162774b4 | 1242 | |
3bc29f0a | 1243 | LTTNG_TRACEPOINT_EVENT_CLASS(ext4__map_blocks_exit, |
162774b4 MD |
1244 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret), |
1245 | ||
1246 | TP_ARGS(inode, map, ret), | |
1247 | ||
f127e61e MD |
1248 | TP_FIELDS( |
1249 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1250 | ctf_integer(ino_t, ino, inode->i_ino) | |
f127e61e MD |
1251 | ctf_integer(ext4_fsblk_t, pblk, map->m_pblk) |
1252 | ctf_integer(ext4_lblk_t, lblk, map->m_lblk) | |
1253 | ctf_integer(unsigned int, len, map->m_len) | |
1254 | ctf_integer(unsigned int, mflags, map->m_flags) | |
1255 | ctf_integer(int, ret, ret) | |
1256 | ) | |
162774b4 MD |
1257 | ) |
1258 | ||
3bc29f0a | 1259 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit, ext4_ext_map_blocks_exit, |
162774b4 MD |
1260 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret), |
1261 | ||
1262 | TP_ARGS(inode, map, ret) | |
1263 | ) | |
1264 | ||
3bc29f0a | 1265 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit, ext4_ind_map_blocks_exit, |
162774b4 MD |
1266 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret), |
1267 | ||
1268 | TP_ARGS(inode, map, ret) | |
1269 | ) | |
1270 | ||
1271 | #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */ | |
1272 | ||
3bc29f0a | 1273 | LTTNG_TRACEPOINT_EVENT_CLASS(ext4__map_blocks_exit, |
b87700e3 AG |
1274 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
1275 | ext4_fsblk_t pblk, unsigned int len, int ret), | |
1276 | ||
1277 | TP_ARGS(inode, lblk, pblk, len, ret), | |
1278 | ||
f127e61e MD |
1279 | TP_FIELDS( |
1280 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1281 | ctf_integer(ino_t, ino, inode->i_ino) | |
1282 | ctf_integer(ext4_fsblk_t, pblk, pblk) | |
1283 | ctf_integer(ext4_lblk_t, lblk, lblk) | |
1284 | ctf_integer(unsigned int, len, len) | |
1285 | ctf_integer(int, ret, ret) | |
1286 | ) | |
b87700e3 AG |
1287 | ) |
1288 | ||
3bc29f0a | 1289 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit, ext4_ext_map_blocks_exit, |
b87700e3 AG |
1290 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
1291 | ext4_fsblk_t pblk, unsigned len, int ret), | |
1292 | ||
1293 | TP_ARGS(inode, lblk, pblk, len, ret) | |
1294 | ) | |
1295 | ||
3bc29f0a | 1296 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit, ext4_ind_map_blocks_exit, |
b87700e3 AG |
1297 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
1298 | ext4_fsblk_t pblk, unsigned len, int ret), | |
1299 | ||
1300 | TP_ARGS(inode, lblk, pblk, len, ret) | |
1301 | ) | |
1302 | ||
162774b4 MD |
1303 | #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */ |
1304 | ||
3bc29f0a | 1305 | LTTNG_TRACEPOINT_EVENT(ext4_ext_load_extent, |
b87700e3 AG |
1306 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk), |
1307 | ||
1308 | TP_ARGS(inode, lblk, pblk), | |
1309 | ||
f127e61e MD |
1310 | TP_FIELDS( |
1311 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1312 | ctf_integer(ino_t, ino, inode->i_ino) | |
1313 | ctf_integer(ext4_fsblk_t, pblk, pblk) | |
1314 | ctf_integer(ext4_lblk_t, lblk, lblk) | |
1315 | ) | |
b87700e3 AG |
1316 | ) |
1317 | ||
3bc29f0a | 1318 | LTTNG_TRACEPOINT_EVENT(ext4_load_inode, |
b87700e3 AG |
1319 | TP_PROTO(struct inode *inode), |
1320 | ||
1321 | TP_ARGS(inode), | |
1322 | ||
f127e61e MD |
1323 | TP_FIELDS( |
1324 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1325 | ctf_integer(ino_t, ino, inode->i_ino) | |
1326 | ) | |
b87700e3 AG |
1327 | ) |
1328 | #endif | |
1329 | ||
00be8842 MD |
1330 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) |
1331 | ||
3bc29f0a | 1332 | LTTNG_TRACEPOINT_EVENT(ext4_journal_start, |
00be8842 MD |
1333 | TP_PROTO(struct super_block *sb, int blocks, int rsv_blocks, |
1334 | unsigned long IP), | |
1335 | ||
1336 | TP_ARGS(sb, blocks, rsv_blocks, IP), | |
1337 | ||
f127e61e MD |
1338 | TP_FIELDS( |
1339 | ctf_integer(dev_t, dev, sb->s_dev) | |
1340 | ctf_integer(unsigned long, ip, IP) | |
1341 | ctf_integer(int, blocks, blocks) | |
1342 | ctf_integer(int, rsv_blocks, rsv_blocks) | |
1343 | ) | |
00be8842 MD |
1344 | ) |
1345 | ||
3bc29f0a | 1346 | LTTNG_TRACEPOINT_EVENT(ext4_journal_start_reserved, |
00be8842 MD |
1347 | TP_PROTO(struct super_block *sb, int blocks, unsigned long IP), |
1348 | ||
1349 | TP_ARGS(sb, blocks, IP), | |
1350 | ||
f127e61e MD |
1351 | TP_FIELDS( |
1352 | ctf_integer(dev_t, dev, sb->s_dev) | |
1353 | ctf_integer(unsigned long, ip, IP) | |
1354 | ctf_integer(int, blocks, blocks) | |
1355 | ) | |
00be8842 MD |
1356 | ) |
1357 | ||
1358 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) | |
1359 | ||
3bc29f0a | 1360 | LTTNG_TRACEPOINT_EVENT(ext4_journal_start, |
b87700e3 AG |
1361 | TP_PROTO(struct super_block *sb, int nblocks, unsigned long IP), |
1362 | ||
1363 | TP_ARGS(sb, nblocks, IP), | |
1364 | ||
f127e61e MD |
1365 | TP_FIELDS( |
1366 | ctf_integer(dev_t, dev, sb->s_dev) | |
1367 | ctf_integer(unsigned long, ip, IP) | |
1368 | ctf_integer(int, nblocks, nblocks) | |
1369 | ) | |
b87700e3 AG |
1370 | ) |
1371 | ||
3bc29f0a | 1372 | LTTNG_TRACEPOINT_EVENT_CLASS(ext4__trim, |
b87700e3 AG |
1373 | TP_PROTO(struct super_block *sb, |
1374 | ext4_group_t group, | |
1375 | ext4_grpblk_t start, | |
1376 | ext4_grpblk_t len), | |
1377 | ||
1378 | TP_ARGS(sb, group, start, len), | |
1379 | ||
f127e61e MD |
1380 | TP_FIELDS( |
1381 | ctf_integer(int, dev_major, MAJOR(sb->s_dev)) | |
1382 | ctf_integer(int, dev_minor, MINOR(sb->s_dev)) | |
1383 | ctf_integer(__u32, group, group) | |
1384 | ctf_integer(int, start, start) | |
1385 | ctf_integer(int, len, len) | |
1386 | ) | |
b87700e3 AG |
1387 | ) |
1388 | ||
3bc29f0a | 1389 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__trim, ext4_trim_extent, |
b87700e3 AG |
1390 | |
1391 | TP_PROTO(struct super_block *sb, | |
1392 | ext4_group_t group, | |
1393 | ext4_grpblk_t start, | |
1394 | ext4_grpblk_t len), | |
1395 | ||
1396 | TP_ARGS(sb, group, start, len) | |
1397 | ) | |
1398 | ||
3bc29f0a | 1399 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__trim, ext4_trim_all_free, |
b87700e3 AG |
1400 | |
1401 | TP_PROTO(struct super_block *sb, | |
1402 | ext4_group_t group, | |
1403 | ext4_grpblk_t start, | |
1404 | ext4_grpblk_t len), | |
1405 | ||
1406 | TP_ARGS(sb, group, start, len) | |
1407 | ) | |
1408 | #endif | |
1409 | ||
1410 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) | |
162774b4 | 1411 | |
3bc29f0a | 1412 | LTTNG_TRACEPOINT_EVENT(ext4_ext_handle_uninitialized_extents, |
162774b4 MD |
1413 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) |
1414 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int flags, | |
1415 | unsigned int allocated, ext4_fsblk_t newblock), | |
1416 | ||
1417 | TP_ARGS(inode, map, flags, allocated, newblock), | |
1418 | #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */ | |
b87700e3 AG |
1419 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, |
1420 | unsigned int allocated, ext4_fsblk_t newblock), | |
1421 | ||
1422 | TP_ARGS(inode, map, allocated, newblock), | |
162774b4 | 1423 | #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */ |
b87700e3 | 1424 | |
f127e61e MD |
1425 | TP_FIELDS( |
1426 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1427 | ctf_integer(ino_t, ino, inode->i_ino) | |
162774b4 | 1428 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) |
f127e61e | 1429 | ctf_integer(int, flags, flags) |
162774b4 | 1430 | #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */ |
f127e61e | 1431 | ctf_integer(int, flags, map->m_flags) |
162774b4 | 1432 | #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */ |
f127e61e MD |
1433 | ctf_integer(ext4_lblk_t, lblk, map->m_lblk) |
1434 | ctf_integer(ext4_fsblk_t, pblk, map->m_pblk) | |
1435 | ctf_integer(unsigned int, len, map->m_len) | |
1436 | ctf_integer(unsigned int, allocated, allocated) | |
1437 | ctf_integer(ext4_fsblk_t, newblk, newblock) | |
1438 | ) | |
b87700e3 AG |
1439 | ) |
1440 | ||
3bc29f0a | 1441 | LTTNG_TRACEPOINT_EVENT(ext4_get_implied_cluster_alloc_exit, |
b87700e3 AG |
1442 | TP_PROTO(struct super_block *sb, struct ext4_map_blocks *map, int ret), |
1443 | ||
1444 | TP_ARGS(sb, map, ret), | |
1445 | ||
f127e61e MD |
1446 | TP_FIELDS( |
1447 | ctf_integer(dev_t, dev, sb->s_dev) | |
1448 | ctf_integer(unsigned int, flags, map->m_flags) | |
1449 | ctf_integer(ext4_lblk_t, lblk, map->m_lblk) | |
1450 | ctf_integer(ext4_fsblk_t, pblk, map->m_pblk) | |
1451 | ctf_integer(unsigned int, len, map->m_len) | |
1452 | ctf_integer(int, ret, ret) | |
1453 | ) | |
b87700e3 AG |
1454 | ) |
1455 | ||
3bc29f0a | 1456 | LTTNG_TRACEPOINT_EVENT(ext4_ext_put_in_cache, |
b87700e3 AG |
1457 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len, |
1458 | ext4_fsblk_t start), | |
1459 | ||
1460 | TP_ARGS(inode, lblk, len, start), | |
1461 | ||
f127e61e MD |
1462 | TP_FIELDS( |
1463 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1464 | ctf_integer(ino_t, ino, inode->i_ino) | |
1465 | ctf_integer(ext4_lblk_t, lblk, lblk) | |
1466 | ctf_integer(unsigned int, len, len) | |
1467 | ctf_integer(ext4_fsblk_t, start, start) | |
1468 | ) | |
b87700e3 AG |
1469 | ) |
1470 | ||
3bc29f0a | 1471 | LTTNG_TRACEPOINT_EVENT(ext4_ext_in_cache, |
b87700e3 AG |
1472 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, int ret), |
1473 | ||
1474 | TP_ARGS(inode, lblk, ret), | |
1475 | ||
f127e61e MD |
1476 | TP_FIELDS( |
1477 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1478 | ctf_integer(ino_t, ino, inode->i_ino) | |
1479 | ctf_integer(ext4_lblk_t, lblk, lblk) | |
1480 | ctf_integer(int, ret, ret) | |
1481 | ) | |
b87700e3 AG |
1482 | ) |
1483 | ||
3bc29f0a | 1484 | LTTNG_TRACEPOINT_EVENT(ext4_find_delalloc_range, |
b87700e3 AG |
1485 | TP_PROTO(struct inode *inode, ext4_lblk_t from, ext4_lblk_t to, |
1486 | int reverse, int found, ext4_lblk_t found_blk), | |
1487 | ||
1488 | TP_ARGS(inode, from, to, reverse, found, found_blk), | |
1489 | ||
f127e61e MD |
1490 | TP_FIELDS( |
1491 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1492 | ctf_integer(ino_t, ino, inode->i_ino) | |
1493 | ctf_integer(ext4_lblk_t, from, from) | |
1494 | ctf_integer(ext4_lblk_t, to, to) | |
1495 | ctf_integer(int, reverse, reverse) | |
1496 | ctf_integer(int, found, found) | |
1497 | ctf_integer(ext4_lblk_t, found_blk, found_blk) | |
1498 | ) | |
b87700e3 AG |
1499 | ) |
1500 | ||
3bc29f0a | 1501 | LTTNG_TRACEPOINT_EVENT(ext4_get_reserved_cluster_alloc, |
b87700e3 AG |
1502 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len), |
1503 | ||
1504 | TP_ARGS(inode, lblk, len), | |
1505 | ||
f127e61e MD |
1506 | TP_FIELDS( |
1507 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1508 | ctf_integer(ino_t, ino, inode->i_ino) | |
1509 | ctf_integer(ext4_lblk_t, lblk, lblk) | |
1510 | ctf_integer(unsigned int, len, len) | |
1511 | ) | |
b87700e3 AG |
1512 | ) |
1513 | ||
3bc29f0a | 1514 | LTTNG_TRACEPOINT_EVENT(ext4_ext_show_extent, |
b87700e3 AG |
1515 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk, |
1516 | unsigned short len), | |
1517 | ||
1518 | TP_ARGS(inode, lblk, pblk, len), | |
1519 | ||
f127e61e MD |
1520 | TP_FIELDS( |
1521 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1522 | ctf_integer(ino_t, ino, inode->i_ino) | |
1523 | ctf_integer(ext4_fsblk_t, pblk, pblk) | |
1524 | ctf_integer(ext4_lblk_t, lblk, lblk) | |
1525 | ctf_integer(unsigned short, len, len) | |
1526 | ) | |
b87700e3 AG |
1527 | ) |
1528 | ||
00be8842 MD |
1529 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) |
1530 | ||
3bc29f0a | 1531 | LTTNG_TRACEPOINT_EVENT(ext4_remove_blocks, |
00be8842 MD |
1532 | TP_PROTO(struct inode *inode, struct ext4_extent *ex, |
1533 | ext4_lblk_t from, ext4_fsblk_t to, | |
1534 | long long partial_cluster), | |
1535 | ||
1536 | TP_ARGS(inode, ex, from, to, partial_cluster), | |
1537 | ||
f127e61e MD |
1538 | TP_FIELDS( |
1539 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1540 | ctf_integer(ino_t, ino, inode->i_ino) | |
1541 | ctf_integer(ext4_lblk_t, from, from) | |
1542 | ctf_integer(ext4_lblk_t, to, to) | |
1543 | ctf_integer(long long, partial, partial_cluster) | |
1544 | ctf_integer(ext4_fsblk_t, ee_pblk, ext4_ext_pblock(ex)) | |
1545 | ctf_integer(ext4_lblk_t, ee_lblk, le32_to_cpu(ex->ee_block)) | |
1546 | ctf_integer(unsigned short, ee_len, ext4_ext_get_actual_len(ex)) | |
1547 | ) | |
00be8842 MD |
1548 | ) |
1549 | ||
1550 | #else | |
1551 | ||
3bc29f0a | 1552 | LTTNG_TRACEPOINT_EVENT(ext4_remove_blocks, |
b87700e3 AG |
1553 | TP_PROTO(struct inode *inode, struct ext4_extent *ex, |
1554 | ext4_lblk_t from, ext4_fsblk_t to, | |
1555 | ext4_fsblk_t partial_cluster), | |
1556 | ||
1557 | TP_ARGS(inode, ex, from, to, partial_cluster), | |
1558 | ||
f127e61e MD |
1559 | TP_FIELDS( |
1560 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1561 | ctf_integer(ino_t, ino, inode->i_ino) | |
1562 | ctf_integer(ext4_lblk_t, from, from) | |
1563 | ctf_integer(ext4_lblk_t, to, to) | |
1564 | ctf_integer(ext4_fsblk_t, partial, partial_cluster) | |
1565 | ctf_integer(ext4_fsblk_t, ee_pblk, ext4_ext_pblock(ex)) | |
1566 | ctf_integer(ext4_lblk_t, ee_lblk, le32_to_cpu(ex->ee_block)) | |
1567 | ctf_integer(unsigned short, ee_len, ext4_ext_get_actual_len(ex)) | |
1568 | ) | |
b87700e3 AG |
1569 | ) |
1570 | ||
00be8842 MD |
1571 | #endif |
1572 | ||
1573 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) | |
1574 | ||
3bc29f0a | 1575 | LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_leaf, |
00be8842 MD |
1576 | TP_PROTO(struct inode *inode, ext4_lblk_t start, |
1577 | struct ext4_extent *ex, | |
1578 | long long partial_cluster), | |
1579 | ||
1580 | TP_ARGS(inode, start, ex, partial_cluster), | |
1581 | ||
f127e61e MD |
1582 | TP_FIELDS( |
1583 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1584 | ctf_integer(ino_t, ino, inode->i_ino) | |
1585 | ctf_integer(long long, partial, partial_cluster) | |
1586 | ctf_integer(ext4_lblk_t, start, start) | |
1587 | ctf_integer(ext4_lblk_t, ee_lblk, le32_to_cpu(ex->ee_block)) | |
1588 | ctf_integer(ext4_fsblk_t, ee_pblk, ext4_ext_pblock(ex)) | |
1589 | ctf_integer(short, ee_len, ext4_ext_get_actual_len(ex)) | |
1590 | ) | |
00be8842 MD |
1591 | ) |
1592 | ||
1593 | #else | |
1594 | ||
3bc29f0a | 1595 | LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_leaf, |
b87700e3 AG |
1596 | TP_PROTO(struct inode *inode, ext4_lblk_t start, |
1597 | struct ext4_extent *ex, ext4_fsblk_t partial_cluster), | |
1598 | ||
1599 | TP_ARGS(inode, start, ex, partial_cluster), | |
1600 | ||
f127e61e MD |
1601 | TP_FIELDS( |
1602 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1603 | ctf_integer(ino_t, ino, inode->i_ino) | |
1604 | ctf_integer(long long, partial, partial_cluster) | |
1605 | ctf_integer(ext4_lblk_t, start, start) | |
1606 | ctf_integer(ext4_lblk_t, ee_lblk, le32_to_cpu(ex->ee_block)) | |
1607 | ctf_integer(ext4_fsblk_t, ee_pblk, ext4_ext_pblock(ex)) | |
1608 | ctf_integer(short, ee_len, ext4_ext_get_actual_len(ex)) | |
1609 | ) | |
b87700e3 AG |
1610 | ) |
1611 | ||
00be8842 MD |
1612 | #endif |
1613 | ||
3bc29f0a | 1614 | LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_idx, |
b87700e3 AG |
1615 | TP_PROTO(struct inode *inode, ext4_fsblk_t pblk), |
1616 | ||
1617 | TP_ARGS(inode, pblk), | |
1618 | ||
f127e61e MD |
1619 | TP_FIELDS( |
1620 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1621 | ctf_integer(ino_t, ino, inode->i_ino) | |
1622 | ctf_integer(ext4_fsblk_t, pblk, pblk) | |
1623 | ) | |
b87700e3 AG |
1624 | ) |
1625 | ||
00be8842 MD |
1626 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) |
1627 | ||
3bc29f0a | 1628 | LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space, |
00be8842 MD |
1629 | TP_PROTO(struct inode *inode, ext4_lblk_t start, |
1630 | ext4_lblk_t end, int depth), | |
1631 | ||
1632 | TP_ARGS(inode, start, end, depth), | |
1633 | ||
f127e61e MD |
1634 | TP_FIELDS( |
1635 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1636 | ctf_integer(ino_t, ino, inode->i_ino) | |
1637 | ctf_integer(ext4_lblk_t, start, start) | |
1638 | ctf_integer(ext4_lblk_t, end, end) | |
1639 | ctf_integer(int, depth, depth) | |
1640 | ) | |
00be8842 MD |
1641 | ) |
1642 | ||
1643 | #else | |
1644 | ||
3bc29f0a | 1645 | LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space, |
b87700e3 AG |
1646 | TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth), |
1647 | ||
1648 | TP_ARGS(inode, start, depth), | |
1649 | ||
f127e61e MD |
1650 | TP_FIELDS( |
1651 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1652 | ctf_integer(ino_t, ino, inode->i_ino) | |
1653 | ctf_integer(ext4_lblk_t, start, start) | |
1654 | ctf_integer(int, depth, depth) | |
1655 | ) | |
b87700e3 AG |
1656 | ) |
1657 | ||
00be8842 MD |
1658 | #endif |
1659 | ||
1660 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) | |
1661 | ||
3bc29f0a | 1662 | LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space_done, |
00be8842 MD |
1663 | TP_PROTO(struct inode *inode, ext4_lblk_t start, ext4_lblk_t end, |
1664 | int depth, long long partial, __le16 eh_entries), | |
1665 | ||
1666 | TP_ARGS(inode, start, end, depth, partial, eh_entries), | |
1667 | ||
f127e61e MD |
1668 | TP_FIELDS( |
1669 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1670 | ctf_integer(ino_t, ino, inode->i_ino) | |
1671 | ctf_integer(ext4_lblk_t, start, start) | |
1672 | ctf_integer(ext4_lblk_t, end, end) | |
1673 | ctf_integer(int, depth, depth) | |
1674 | ctf_integer(long long, partial, partial) | |
1675 | ctf_integer(unsigned short, eh_entries, le16_to_cpu(eh_entries)) | |
1676 | ) | |
00be8842 MD |
1677 | ) |
1678 | ||
1679 | #else | |
1680 | ||
3bc29f0a | 1681 | LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space_done, |
b87700e3 AG |
1682 | TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth, |
1683 | ext4_lblk_t partial, unsigned short eh_entries), | |
1684 | ||
1685 | TP_ARGS(inode, start, depth, partial, eh_entries), | |
1686 | ||
f127e61e MD |
1687 | TP_FIELDS( |
1688 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1689 | ctf_integer(ino_t, ino, inode->i_ino) | |
1690 | ctf_integer(ext4_lblk_t, start, start) | |
1691 | ctf_integer(int, depth, depth) | |
1692 | ctf_integer(ext4_lblk_t, partial, partial) | |
1693 | ctf_integer(unsigned short, eh_entries, eh_entries) | |
1694 | ) | |
b87700e3 | 1695 | ) |
00be8842 MD |
1696 | |
1697 | #endif | |
1698 | ||
1699 | #endif | |
1700 | ||
39aee4a0 MD |
1701 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) |
1702 | ||
3bc29f0a | 1703 | LTTNG_TRACEPOINT_EVENT_CLASS(ext4__es_extent, |
39aee4a0 MD |
1704 | TP_PROTO(struct inode *inode, struct extent_status *es), |
1705 | ||
1706 | TP_ARGS(inode, es), | |
1707 | ||
f127e61e MD |
1708 | TP_FIELDS( |
1709 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1710 | ctf_integer(ino_t, ino, inode->i_ino) | |
1711 | ctf_integer(ext4_lblk_t, lblk, es->es_lblk) | |
1712 | ctf_integer(ext4_lblk_t, len, es->es_len) | |
1713 | ctf_integer(ext4_fsblk_t, pblk, ext4_es_pblock(es)) | |
1714 | ctf_integer(char, status, ext4_es_status(es)) | |
1715 | ) | |
39aee4a0 MD |
1716 | ) |
1717 | ||
3bc29f0a | 1718 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__es_extent, ext4_es_insert_extent, |
39aee4a0 MD |
1719 | TP_PROTO(struct inode *inode, struct extent_status *es), |
1720 | ||
1721 | TP_ARGS(inode, es) | |
1722 | ) | |
1723 | ||
3bc29f0a | 1724 | LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__es_extent, ext4_es_cache_extent, |
39aee4a0 MD |
1725 | TP_PROTO(struct inode *inode, struct extent_status *es), |
1726 | ||
1727 | TP_ARGS(inode, es) | |
1728 | ) | |
1729 | ||
1730 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) | |
00be8842 | 1731 | |
3bc29f0a | 1732 | LTTNG_TRACEPOINT_EVENT(ext4_es_insert_extent, |
00be8842 MD |
1733 | TP_PROTO(struct inode *inode, struct extent_status *es), |
1734 | ||
1735 | TP_ARGS(inode, es), | |
1736 | ||
f127e61e MD |
1737 | TP_FIELDS( |
1738 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1739 | ctf_integer(ino_t, ino, inode->i_ino) | |
1740 | ctf_integer(ext4_lblk_t, lblk, es->es_lblk) | |
1741 | ctf_integer(ext4_lblk_t, len, es->es_len) | |
1742 | ctf_integer(ext4_fsblk_t, pblk, ext4_es_pblock(es)) | |
1743 | ctf_integer(char, status, ext4_es_status(es) >> 60) | |
1744 | ) | |
00be8842 MD |
1745 | ) |
1746 | ||
3bc29f0a | 1747 | LTTNG_TRACEPOINT_EVENT(ext4_es_remove_extent, |
00be8842 MD |
1748 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_lblk_t len), |
1749 | ||
1750 | TP_ARGS(inode, lblk, len), | |
1751 | ||
f127e61e MD |
1752 | TP_FIELDS( |
1753 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1754 | ctf_integer(ino_t, ino, inode->i_ino) | |
1755 | ctf_integer(loff_t, lblk, lblk) | |
1756 | ctf_integer(loff_t, len, len) | |
1757 | ) | |
00be8842 MD |
1758 | ) |
1759 | ||
3bc29f0a | 1760 | LTTNG_TRACEPOINT_EVENT(ext4_es_find_delayed_extent_range_enter, |
00be8842 MD |
1761 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk), |
1762 | ||
1763 | TP_ARGS(inode, lblk), | |
1764 | ||
f127e61e MD |
1765 | TP_FIELDS( |
1766 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1767 | ctf_integer(ino_t, ino, inode->i_ino) | |
1768 | ctf_integer(ext4_lblk_t, lblk, lblk) | |
1769 | ) | |
00be8842 MD |
1770 | ) |
1771 | ||
3bc29f0a | 1772 | LTTNG_TRACEPOINT_EVENT(ext4_es_find_delayed_extent_range_exit, |
00be8842 MD |
1773 | TP_PROTO(struct inode *inode, struct extent_status *es), |
1774 | ||
1775 | TP_ARGS(inode, es), | |
1776 | ||
f127e61e MD |
1777 | TP_FIELDS( |
1778 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1779 | ctf_integer(ino_t, ino, inode->i_ino) | |
1780 | ctf_integer(ext4_lblk_t, lblk, es->es_lblk) | |
1781 | ctf_integer(ext4_lblk_t, len, es->es_len) | |
1782 | ctf_integer(ext4_fsblk_t, pblk, ext4_es_pblock(es)) | |
1783 | ctf_integer(char, status, ext4_es_status(es) >> 60) | |
1784 | ) | |
00be8842 MD |
1785 | ) |
1786 | ||
3bc29f0a | 1787 | LTTNG_TRACEPOINT_EVENT(ext4_es_lookup_extent_enter, |
00be8842 MD |
1788 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk), |
1789 | ||
1790 | TP_ARGS(inode, lblk), | |
1791 | ||
f127e61e MD |
1792 | TP_FIELDS( |
1793 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1794 | ctf_integer(ino_t, ino, inode->i_ino) | |
1795 | ctf_integer(ext4_lblk_t, lblk, lblk) | |
1796 | ) | |
00be8842 MD |
1797 | ) |
1798 | ||
3bc29f0a | 1799 | LTTNG_TRACEPOINT_EVENT(ext4_es_lookup_extent_exit, |
00be8842 MD |
1800 | TP_PROTO(struct inode *inode, struct extent_status *es, |
1801 | int found), | |
1802 | ||
1803 | TP_ARGS(inode, es, found), | |
1804 | ||
f127e61e MD |
1805 | TP_FIELDS( |
1806 | ctf_integer(dev_t, dev, inode->i_sb->s_dev) | |
1807 | ctf_integer(ino_t, ino, inode->i_ino) | |
1808 | ctf_integer(ext4_lblk_t, lblk, es->es_lblk) | |
1809 | ctf_integer(ext4_lblk_t, len, es->es_len) | |
1810 | ctf_integer(ext4_fsblk_t, pblk, ext4_es_pblock(es)) | |
1811 | ctf_integer(char, status, ext4_es_status(es) >> 60) | |
1812 | ctf_integer(int, found, found) | |
1813 | ) | |
00be8842 MD |
1814 | ) |
1815 | ||
3bc29f0a | 1816 | LTTNG_TRACEPOINT_EVENT(ext4_es_shrink_enter, |
00be8842 MD |
1817 | TP_PROTO(struct super_block *sb, int nr_to_scan, int cache_cnt), |
1818 | ||
1819 | TP_ARGS(sb, nr_to_scan, cache_cnt), | |
1820 | ||
f127e61e MD |
1821 | TP_FIELDS( |
1822 | ctf_integer(dev_t, dev, sb->s_dev) | |
1823 | ctf_integer(int, nr_to_scan, nr_to_scan) | |
1824 | ctf_integer(int, cache_cnt, cache_cnt) | |
1825 | ) | |
00be8842 MD |
1826 | ) |
1827 | ||
3bc29f0a | 1828 | LTTNG_TRACEPOINT_EVENT(ext4_es_shrink_exit, |
00be8842 MD |
1829 | TP_PROTO(struct super_block *sb, int shrunk_nr, int cache_cnt), |
1830 | ||
1831 | TP_ARGS(sb, shrunk_nr, cache_cnt), | |
1832 | ||
f127e61e MD |
1833 | TP_FIELDS( |
1834 | ctf_integer(dev_t, dev, sb->s_dev) | |
1835 | ctf_integer(int, shrunk_nr, shrunk_nr) | |
1836 | ctf_integer(int, cache_cnt, cache_cnt) | |
1837 | ) | |
00be8842 MD |
1838 | ) |
1839 | ||
b87700e3 AG |
1840 | #endif |
1841 | ||
3bc29f0a | 1842 | #endif /* LTTNG_TRACE_EXT4_H */ |
b87700e3 AG |
1843 | |
1844 | /* This part must be outside protection */ | |
1845 | #include "../../../probes/define_trace.h" |