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