1 From 80bb26003945e96a8ade9c8788dab9b2e08cbc08 Mon Sep 17 00:00:00 2001
2 From: Michael Jeanson <mjeanson@efficios.com>
3 Date: Wed, 9 Jan 2019 14:59:15 -0500
4 Subject: [PATCH] Fix: Remove 'type' argument from access_ok() function (v5.0)
8 commit 96d4f267e40f9509e8a66e2b39e8b95655617693
9 Author: Linus Torvalds <torvalds@linux-foundation.org>
10 Date: Thu Jan 3 18:57:57 2019 -0800
12 Remove 'type' argument from access_ok() function
14 Nobody has actually used the type (VERIFY_READ vs VERIFY_WRITE) argument
15 of the user address range verification function since we got rid of the
16 old racy i386-only code to walk page tables by hand.
18 It existed because the original 80386 would not honor the write protect
19 bit when in kernel mode, so you had to do COW by hand before doing any
20 user access. But we haven't supported that in a long time, and these
21 days the 'type' argument is a purely historical artifact.
23 A discussion about extending 'user_access_begin()' to do the range
24 checking resulted this patch, because there is no way we're going to
25 move the old VERIFY_xyz interface to that model. And it's best done at
26 the end of the merge window when I've done most of my merges, so let's
27 just get this done once and for all.
29 This patch was mostly done with a sed-script, with manual fix-ups for
30 the cases that weren't of the trivial 'access_ok(VERIFY_xyz' form.
32 There were a couple of notable cases:
34 - csky still had the old "verify_area()" name as an alias.
36 - the iter_iov code had magical hardcoded knowledge of the actual
37 values of VERIFY_{READ,WRITE} (not that they mattered, since nothing
40 - microblaze used the type argument for a debug printout
42 but other than those oddities this should be a total no-op patch.
44 I tried to fix up all architectures, did fairly extensive grepping for
45 access_ok() uses, and the changes are trivial, but I may have missed
46 something. Any missed conversion should be trivially fixable, though.
48 Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
49 Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
51 lib/ringbuffer/backend.h | 8 ++++----
52 lib/ringbuffer/ring_buffer_iterator.c | 3 ++-
53 lttng-filter-interpreter.c | 4 ++--
54 probes/lttng-probe-user.c | 3 ++-
55 wrapper/uaccess.h | 28 +++++++++++++++++++++++++++
56 5 files changed, 38 insertions(+), 8 deletions(-)
57 create mode 100644 wrapper/uaccess.h
59 diff --git a/lib/ringbuffer/backend.h b/lib/ringbuffer/backend.h
60 index 501fad48..da937f29 100644
61 --- a/lib/ringbuffer/backend.h
62 +++ b/lib/ringbuffer/backend.h
64 #include <linux/list.h>
67 -#include <linux/uaccess.h>
68 +#include <wrapper/uaccess.h>
70 /* Internal helpers */
71 #include <wrapper/ringbuffer/backend_internal.h>
72 @@ -289,7 +289,7 @@ void lib_ring_buffer_copy_from_user_inatomic(const struct lib_ring_buffer_config
76 - if (unlikely(!access_ok(VERIFY_READ, src, len)))
77 + if (unlikely(!lttng_access_ok(VERIFY_READ, src, len)))
80 if (likely(pagecpy == len)) {
81 @@ -359,7 +359,7 @@ void lib_ring_buffer_strcpy_from_user_inatomic(const struct lib_ring_buffer_conf
85 - if (unlikely(!access_ok(VERIFY_READ, src, len)))
86 + if (unlikely(!lttng_access_ok(VERIFY_READ, src, len)))
89 if (likely(pagecpy == len)) {
90 @@ -449,7 +449,7 @@ unsigned long lib_ring_buffer_copy_from_user_check_nofault(void *dest,
94 - if (!access_ok(VERIFY_READ, src, len))
95 + if (!lttng_access_ok(VERIFY_READ, src, len))
99 diff --git a/lib/ringbuffer/ring_buffer_iterator.c b/lib/ringbuffer/ring_buffer_iterator.c
100 index 9efe4919..d25db725 100644
101 --- a/lib/ringbuffer/ring_buffer_iterator.c
102 +++ b/lib/ringbuffer/ring_buffer_iterator.c
105 #include <wrapper/ringbuffer/iterator.h>
106 #include <wrapper/file.h>
107 +#include <wrapper/uaccess.h>
108 #include <linux/jiffies.h>
109 #include <linux/delay.h>
110 #include <linux/module.h>
111 @@ -605,7 +606,7 @@ ssize_t channel_ring_buffer_file_read(struct file *filp,
115 - if (!access_ok(VERIFY_WRITE, user_buf, count))
116 + if (!lttng_access_ok(VERIFY_WRITE, user_buf, count))
119 /* Finish copy of previous record */
120 diff --git a/lttng-filter-interpreter.c b/lttng-filter-interpreter.c
121 index bf695497..3dad6cc6 100644
122 --- a/lttng-filter-interpreter.c
123 +++ b/lttng-filter-interpreter.c
125 * Copyright (C) 2010-2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
128 -#include <linux/uaccess.h>
129 +#include <wrapper/uaccess.h>
130 #include <wrapper/frame.h>
131 #include <wrapper/types.h>
132 #include <linux/swab.h>
133 @@ -30,7 +30,7 @@ char get_char(struct estack_entry *reg, size_t offset)
136 /* Handle invalid access as end of string. */
137 - if (unlikely(!access_ok(VERIFY_READ,
138 + if (unlikely(!lttng_access_ok(VERIFY_READ,
139 reg->u.s.user_str + offset,
142 diff --git a/probes/lttng-probe-user.c b/probes/lttng-probe-user.c
143 index 4162a7e4..0d1f95fe 100644
144 --- a/probes/lttng-probe-user.c
145 +++ b/probes/lttng-probe-user.c
148 #include <linux/uaccess.h>
149 #include <linux/module.h>
150 +#include <wrapper/uaccess.h>
151 #include <probes/lttng-probe-user.h>
154 @@ -30,7 +31,7 @@ long lttng_strlen_user_inatomic(const char *addr)
158 - if (unlikely(!access_ok(VERIFY_READ,
159 + if (unlikely(!lttng_access_ok(VERIFY_READ,
160 (__force const char __user *) addr,
163 diff --git a/wrapper/uaccess.h b/wrapper/uaccess.h
165 index 00000000..c56427c5
167 +++ b/wrapper/uaccess.h
169 +/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
171 + * wrapper/uaccess.h
173 + * wrapper around linux/uaccess.h.
175 + * Copyright (C) 2019 Michael Jeanson <mjeanson@efficios.com>
178 +#ifndef _LTTNG_WRAPPER_UACCESS_H
179 +#define _LTTNG_WRAPPER_UACCESS_H
181 +#include <linux/uaccess.h>
182 +#include <lttng-kernel-version.h>
184 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
186 +#define VERIFY_READ 0
187 +#define VERIFY_WRITE 1
188 +#define lttng_access_ok(type, addr, size) access_ok(addr, size)
190 +#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) */
192 +#define lttng_access_ok(type, addr, size) access_ok(type, addr, size)
194 +#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) */
196 +#endif /* _LTTNG_WRAPPER_UACCESS_H */
197 diff --git a/instrumentation/events/lttng-module/btrfs.h b/instrumentation/events/lttng-module/btrfs.h
198 index 4dfbf5b..c548cf2 100644
199 --- a/instrumentation/events/lttng-module/btrfs.h
200 +++ b/instrumentation/events/lttng-module/btrfs.h
202 +/* SPDX-License-Identifier: GPL-2.0 */
204 #define TRACE_SYSTEM btrfs
206 @@ -32,6 +33,12 @@ struct extent_state;
208 #define BTRFS_UUID_SIZE 16
210 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
211 +#define lttng_fs_info_fsid fs_info->fs_devices->fsid
213 +#define lttng_fs_info_fsid fs_info->fsid
216 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
217 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
218 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
219 @@ -279,6 +286,43 @@ LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
221 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
223 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
224 +LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist,
226 + TP_PROTO(struct btrfs_fs_info *fs_info,
227 + const struct extent_map *existing, const struct extent_map *map,
228 + u64 start, u64 len),
230 + TP_ARGS(fs_info, existing, map, start, len),
233 + ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
234 + ctf_integer(u64, e_start, existing->start)
235 + ctf_integer(u64, e_len, existing->len)
236 + ctf_integer(u64, map_start, map->start)
237 + ctf_integer(u64, map_len, map->len)
238 + ctf_integer(u64, start, start)
239 + ctf_integer(u64, len, len)
242 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
243 +LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist,
245 + TP_PROTO(const struct extent_map *existing, const struct extent_map *map, u64 start, u64 len),
247 + TP_ARGS(existing, map, start, len),
250 + ctf_integer(u64, e_start, existing->start)
251 + ctf_integer(u64, e_len, existing->len)
252 + ctf_integer(u64, map_start, map->start)
253 + ctf_integer(u64, map_len, map->len)
254 + ctf_integer(u64, start, start)
255 + ctf_integer(u64, len, len)
260 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
261 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
263 @@ -629,7 +673,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group,
264 TP_ARGS(fs_info, block_group, create),
267 - ctf_array(u8, fsid, fs_info->fsid, BTRFS_UUID_SIZE)
268 + ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
269 ctf_integer(u64, offset, block_group->key.objectid)
270 ctf_integer(u64, size, block_group->key.offset)
271 ctf_integer(u64, flags, block_group->flags)
272 @@ -647,7 +691,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group,
273 TP_ARGS(fs_info, block_group, create),
276 - ctf_array(u8, fsid, fs_info->fsid, BTRFS_UUID_SIZE)
277 + ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
278 ctf_integer(u64, offset, block_group->key.objectid)
279 ctf_integer(u64, size, block_group->key.offset)
280 ctf_integer(u64, flags, block_group->flags)
281 @@ -658,8 +702,15 @@ LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group,
285 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
286 -LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
287 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
288 + LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
289 + LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
290 + LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
291 + LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
292 + LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
293 + LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
294 + LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
295 +LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref,
297 TP_PROTO(const struct btrfs_fs_info *fs_info,
298 const struct btrfs_delayed_ref_node *ref,
299 @@ -669,6 +720,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
300 TP_ARGS(fs_info, ref, full_ref, action),
303 + ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
304 ctf_integer(u64, bytenr, ref->bytenr)
305 ctf_integer(u64, num_bytes, ref->num_bytes)
306 ctf_integer(int, action, action)
307 @@ -679,8 +731,36 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
308 ctf_integer(u64, seq, ref->seq)
312 +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
314 + add_delayed_tree_ref,
316 + btrfs_add_delayed_tree_ref,
318 + TP_PROTO(const struct btrfs_fs_info *fs_info,
319 + const struct btrfs_delayed_ref_node *ref,
320 + const struct btrfs_delayed_tree_ref *full_ref,
323 + TP_ARGS(fs_info, ref, full_ref, action)
326 +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
328 + run_delayed_tree_ref,
330 + btrfs_run_delayed_tree_ref,
332 + TP_PROTO(const struct btrfs_fs_info *fs_info,
333 + const struct btrfs_delayed_ref_node *ref,
334 + const struct btrfs_delayed_tree_ref *full_ref,
337 + TP_ARGS(fs_info, ref, full_ref, action)
339 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
340 -LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
341 +LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref,
343 TP_PROTO(struct btrfs_fs_info *fs_info,
344 struct btrfs_delayed_ref_node *ref,
345 @@ -690,6 +770,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
346 TP_ARGS(fs_info, ref, full_ref, action),
349 + ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
350 ctf_integer(u64, bytenr, ref->bytenr)
351 ctf_integer(u64, num_bytes, ref->num_bytes)
352 ctf_integer(int, action, action)
353 @@ -700,7 +781,127 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
354 ctf_integer(u64, seq, ref->seq)
359 +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
361 + add_delayed_tree_ref,
363 + btrfs_add_delayed_tree_ref,
365 + TP_PROTO(struct btrfs_fs_info *fs_info,
366 + struct btrfs_delayed_ref_node *ref,
367 + struct btrfs_delayed_tree_ref *full_ref,
370 + TP_ARGS(fs_info, ref, full_ref, action)
373 +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
375 + run_delayed_tree_ref,
377 + btrfs_run_delayed_tree_ref,
379 + TP_PROTO(struct btrfs_fs_info *fs_info,
380 + struct btrfs_delayed_ref_node *ref,
381 + struct btrfs_delayed_tree_ref *full_ref,
384 + TP_ARGS(fs_info, ref, full_ref, action)
386 +#elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
387 +LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref,
389 + TP_PROTO(const struct btrfs_delayed_ref_node *ref,
390 + const struct btrfs_delayed_tree_ref *full_ref,
393 + TP_ARGS(ref, full_ref, action),
396 + ctf_integer(u64, bytenr, ref->bytenr)
397 + ctf_integer(u64, num_bytes, ref->num_bytes)
398 + ctf_integer(int, action, action)
399 + ctf_integer(u64, parent, full_ref->parent)
400 + ctf_integer(u64, ref_root, full_ref->root)
401 + ctf_integer(int, level, full_ref->level)
402 + ctf_integer(int, type, ref->type)
403 + ctf_integer(u64, seq, ref->seq)
407 +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
409 + add_delayed_tree_ref,
411 + btrfs_add_delayed_tree_ref,
413 + TP_PROTO(const struct btrfs_delayed_ref_node *ref,
414 + const struct btrfs_delayed_tree_ref *full_ref,
417 + TP_ARGS(ref, full_ref, action)
420 +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
422 + run_delayed_tree_ref,
424 + btrfs_run_delayed_tree_ref,
426 + TP_PROTO(const struct btrfs_delayed_ref_node *ref,
427 + const struct btrfs_delayed_tree_ref *full_ref,
430 + TP_ARGS(ref, full_ref, action)
432 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
433 +LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref,
435 + TP_PROTO(struct btrfs_delayed_ref_node *ref,
436 + struct btrfs_delayed_tree_ref *full_ref,
439 + TP_ARGS(ref, full_ref, action),
442 + ctf_integer(u64, bytenr, ref->bytenr)
443 + ctf_integer(u64, num_bytes, ref->num_bytes)
444 + ctf_integer(int, action, action)
445 + ctf_integer(u64, parent, full_ref->parent)
446 + ctf_integer(u64, ref_root, full_ref->root)
447 + ctf_integer(int, level, full_ref->level)
448 + ctf_integer(int, type, ref->type)
449 + ctf_integer(u64, seq, ref->seq)
453 +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
455 + add_delayed_tree_ref,
457 + btrfs_add_delayed_tree_ref,
459 + TP_PROTO(struct btrfs_delayed_ref_node *ref,
460 + struct btrfs_delayed_tree_ref *full_ref,
463 + TP_ARGS(ref, full_ref, action)
466 +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
468 + run_delayed_tree_ref,
470 + btrfs_run_delayed_tree_ref,
472 + TP_PROTO(struct btrfs_delayed_ref_node *ref,
473 + struct btrfs_delayed_tree_ref *full_ref,
476 + TP_ARGS(ref, full_ref, action)
478 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
479 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
481 TP_PROTO(struct btrfs_delayed_ref_node *ref,
482 @@ -717,13 +918,234 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
483 ctf_integer(u64, ref_root, full_ref->root)
484 ctf_integer(int, level, full_ref->level)
485 ctf_integer(int, type, ref->type)
486 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
487 ctf_integer(u64, seq, ref->seq)
492 +LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
494 + TP_PROTO(struct btrfs_delayed_ref_node *ref,
495 + struct btrfs_delayed_tree_ref *full_ref,
498 + TP_ARGS(ref, full_ref, action),
501 + ctf_integer(u64, bytenr, ref->bytenr)
502 + ctf_integer(u64, num_bytes, ref->num_bytes)
503 + ctf_integer(int, action, action)
504 + ctf_integer(u64, parent, full_ref->parent)
505 + ctf_integer(u64, ref_root, full_ref->root)
506 + ctf_integer(int, level, full_ref->level)
507 + ctf_integer(int, type, ref->type)
512 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
513 + LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
514 + LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
515 + LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
516 + LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
517 + LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
518 + LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
519 + LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
520 +LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref,
522 + TP_PROTO(const struct btrfs_fs_info *fs_info,
523 + const struct btrfs_delayed_ref_node *ref,
524 + const struct btrfs_delayed_data_ref *full_ref,
527 + TP_ARGS(fs_info, ref, full_ref, action),
530 + ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
531 + ctf_integer(u64, bytenr, ref->bytenr)
532 + ctf_integer(u64, num_bytes, ref->num_bytes)
533 + ctf_integer(int, action, action)
534 + ctf_integer(u64, parent, full_ref->parent)
535 + ctf_integer(u64, ref_root, full_ref->root)
536 + ctf_integer(u64, owner, full_ref->objectid)
537 + ctf_integer(u64, offset, full_ref->offset)
538 + ctf_integer(int, type, ref->type)
539 + ctf_integer(u64, seq, ref->seq)
543 +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
545 + add_delayed_data_ref,
547 + btrfs_add_delayed_data_ref,
549 + TP_PROTO(const struct btrfs_fs_info *fs_info,
550 + const struct btrfs_delayed_ref_node *ref,
551 + const struct btrfs_delayed_data_ref *full_ref,
554 + TP_ARGS(fs_info, ref, full_ref, action)
557 +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
559 + run_delayed_data_ref,
561 + btrfs_run_delayed_data_ref,
563 + TP_PROTO(const struct btrfs_fs_info *fs_info,
564 + const struct btrfs_delayed_ref_node *ref,
565 + const struct btrfs_delayed_data_ref *full_ref,
568 + TP_ARGS(fs_info, ref, full_ref, action)
570 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
571 +LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref,
573 + TP_PROTO(struct btrfs_fs_info *fs_info,
574 + struct btrfs_delayed_ref_node *ref,
575 + struct btrfs_delayed_data_ref *full_ref,
578 + TP_ARGS(fs_info, ref, full_ref, action),
581 + ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
582 + ctf_integer(u64, bytenr, ref->bytenr)
583 + ctf_integer(u64, num_bytes, ref->num_bytes)
584 + ctf_integer(int, action, action)
585 + ctf_integer(u64, parent, full_ref->parent)
586 + ctf_integer(u64, ref_root, full_ref->root)
587 + ctf_integer(u64, owner, full_ref->objectid)
588 + ctf_integer(u64, offset, full_ref->offset)
589 + ctf_integer(int, type, ref->type)
590 + ctf_integer(u64, seq, ref->seq)
594 +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
596 + add_delayed_data_ref,
598 + btrfs_add_delayed_data_ref,
600 + TP_PROTO(struct btrfs_fs_info *fs_info,
601 + struct btrfs_delayed_ref_node *ref,
602 + struct btrfs_delayed_data_ref *full_ref,
605 + TP_ARGS(fs_info, ref, full_ref, action)
608 +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
610 + run_delayed_data_ref,
612 + btrfs_run_delayed_data_ref,
614 + TP_PROTO(struct btrfs_fs_info *fs_info,
615 + struct btrfs_delayed_ref_node *ref,
616 + struct btrfs_delayed_data_ref *full_ref,
619 + TP_ARGS(fs_info, ref, full_ref, action)
621 +#elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
622 +LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref,
624 + TP_PROTO(const struct btrfs_delayed_ref_node *ref,
625 + const struct btrfs_delayed_data_ref *full_ref,
628 + TP_ARGS(ref, full_ref, action),
631 + ctf_integer(u64, bytenr, ref->bytenr)
632 + ctf_integer(u64, num_bytes, ref->num_bytes)
633 + ctf_integer(int, action, action)
634 + ctf_integer(u64, parent, full_ref->parent)
635 + ctf_integer(u64, ref_root, full_ref->root)
636 + ctf_integer(u64, owner, full_ref->objectid)
637 + ctf_integer(u64, offset, full_ref->offset)
638 + ctf_integer(int, type, ref->type)
639 + ctf_integer(u64, seq, ref->seq)
643 +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
645 + add_delayed_data_ref,
647 + btrfs_add_delayed_data_ref,
649 + TP_PROTO(const struct btrfs_delayed_ref_node *ref,
650 + const struct btrfs_delayed_data_ref *full_ref,
653 + TP_ARGS(fs_info, ref, full_ref, action)
656 +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
658 + run_delayed_data_ref,
660 + btrfs_run_delayed_data_ref,
662 + TP_PROTO(const struct btrfs_delayed_ref_node *ref,
663 + const struct btrfs_delayed_data_ref *full_ref,
666 + TP_ARGS(fs_info, ref, full_ref, action)
668 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
669 +LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref,
671 + TP_PROTO(struct btrfs_delayed_ref_node *ref,
672 + struct btrfs_delayed_data_ref *full_ref,
675 + TP_ARGS(ref, full_ref, action),
678 + ctf_integer(u64, bytenr, ref->bytenr)
679 + ctf_integer(u64, num_bytes, ref->num_bytes)
680 + ctf_integer(int, action, action)
681 + ctf_integer(u64, parent, full_ref->parent)
682 + ctf_integer(u64, ref_root, full_ref->root)
683 + ctf_integer(u64, owner, full_ref->objectid)
684 + ctf_integer(u64, offset, full_ref->offset)
685 + ctf_integer(int, type, ref->type)
686 + ctf_integer(u64, seq, ref->seq)
690 +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
692 + add_delayed_data_ref,
694 + btrfs_add_delayed_data_ref,
696 + TP_PROTO(struct btrfs_delayed_ref_node *ref,
697 + struct btrfs_delayed_data_ref *full_ref,
700 + TP_ARGS(fs_info, ref, full_ref, action)
703 +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
705 + run_delayed_data_ref,
707 + btrfs_run_delayed_data_ref,
709 + TP_PROTO(struct btrfs_delayed_ref_node *ref,
710 + struct btrfs_delayed_data_ref *full_ref,
713 + TP_ARGS(fs_info, ref, full_ref, action)
715 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
716 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref,
718 TP_PROTO(struct btrfs_delayed_ref_node *ref,
719 @@ -741,11 +1163,30 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref,
720 ctf_integer(u64, owner, full_ref->objectid)
721 ctf_integer(u64, offset, full_ref->offset)
722 ctf_integer(int, type, ref->type)
723 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
724 ctf_integer(u64, seq, ref->seq)
729 +LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref,
731 + TP_PROTO(struct btrfs_delayed_ref_node *ref,
732 + struct btrfs_delayed_data_ref *full_ref,
735 + TP_ARGS(ref, full_ref, action),
738 + ctf_integer(u64, bytenr, ref->bytenr)
739 + ctf_integer(u64, num_bytes, ref->num_bytes)
740 + ctf_integer(int, action, action)
741 + ctf_integer(u64, parent, full_ref->parent)
742 + ctf_integer(u64, ref_root, full_ref->root)
743 + ctf_integer(u64, owner, full_ref->objectid)
744 + ctf_integer(u64, offset, full_ref->offset)
745 + ctf_integer(int, type, ref->type)
750 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
751 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head,
752 @@ -1015,18 +1456,18 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
754 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
756 - TP_PROTO(const struct btrfs_fs_info *info, const struct map_lookup *map,
757 + TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *map,
758 u64 offset, u64 size),
760 - TP_ARGS(info, map, offset, size)
761 + TP_ARGS(fs_info, map, offset, size)
764 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
766 - TP_PROTO(const struct btrfs_fs_info *info, const struct map_lookup *map,
767 + TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *map,
768 u64 offset, u64 size),
770 - TP_ARGS(info, map, offset, size)
771 + TP_ARGS(fs_info, map, offset, size)
774 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
775 @@ -1050,18 +1491,18 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
777 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
779 - TP_PROTO(struct btrfs_fs_info *info, struct map_lookup *map,
780 + TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map,
781 u64 offset, u64 size),
783 - TP_ARGS(info, map, offset, size)
784 + TP_ARGS(fs_info, map, offset, size)
787 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
789 - TP_PROTO(struct btrfs_fs_info *info, struct map_lookup *map,
790 + TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map,
791 u64 offset, u64 size),
793 - TP_ARGS(info, map, offset, size)
794 + TP_ARGS(fs_info, map, offset, size)
797 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
798 @@ -1192,7 +1633,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
799 TP_ARGS(fs_info, type, val, bytes, reserve),
802 - ctf_array(u8, fsid, fs_info->fsid, BTRFS_UUID_SIZE)
803 + ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
804 ctf_string(type, type)
805 ctf_integer(u64, val, val)
806 ctf_integer(u64, bytes, bytes)
807 @@ -1208,7 +1649,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
808 TP_ARGS(fs_info, type, val, bytes, reserve),
811 - ctf_array(u8, fsid, fs_info->fsid, BTRFS_UUID_SIZE)
812 + ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
813 ctf_string(type, type)
814 ctf_integer(u64, val, val)
815 ctf_integer(u64, bytes, bytes)
816 @@ -1221,9 +1662,9 @@ LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
818 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
820 - TP_PROTO(const struct btrfs_fs_info *info, u64 start, u64 len),
821 + TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len),
823 - TP_ARGS(info, start, len),
824 + TP_ARGS(fs_info, start, len),
827 ctf_integer(u64, start, start)
828 @@ -1233,25 +1674,25 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
830 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
832 - TP_PROTO(const struct btrfs_fs_info *info, u64 start, u64 len),
833 + TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len),
835 - TP_ARGS(info, start, len)
836 + TP_ARGS(fs_info, start, len)
839 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
841 - TP_PROTO(const struct btrfs_fs_info *info, u64 start, u64 len),
842 + TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len),
844 - TP_ARGS(info, start, len)
845 + TP_ARGS(fs_info, start, len)
848 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
850 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
852 - TP_PROTO(struct btrfs_fs_info *info, u64 start, u64 len),
853 + TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len),
855 - TP_ARGS(info, start, len),
856 + TP_ARGS(fs_info, start, len),
859 ctf_integer(u64, start, start)
860 @@ -1261,16 +1702,16 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
862 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
864 - TP_PROTO(struct btrfs_fs_info *info, u64 start, u64 len),
865 + TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len),
867 - TP_ARGS(info, start, len)
868 + TP_ARGS(fs_info, start, len)
871 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
873 - TP_PROTO(struct btrfs_fs_info *info, u64 start, u64 len),
874 + TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len),
876 - TP_ARGS(info, start, len)
877 + TP_ARGS(fs_info, start, len)
880 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
881 @@ -1341,13 +1782,13 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
883 btrfs_find_free_extent,
885 - TP_PROTO(const struct btrfs_fs_info *info, u64 num_bytes, u64 empty_size,
886 + TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
889 - TP_ARGS(info, num_bytes, empty_size, data),
890 + TP_ARGS(fs_info, num_bytes, empty_size, data),
893 - ctf_array(u8, fsid, info->fsid, BTRFS_UUID_SIZE)
894 + ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
895 ctf_integer(u64, num_bytes, num_bytes)
896 ctf_integer(u64, empty_size, empty_size)
897 ctf_integer(u64, data, data)
898 @@ -1362,7 +1803,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
899 TP_ARGS(block_group, start, len),
902 - ctf_array(u8, fsid, block_group->fs_info->fsid, BTRFS_UUID_SIZE)
903 + ctf_array(u8, fsid, block_group->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
904 ctf_integer(u64, bg_objectid, block_group->key.objectid)
905 ctf_integer(u64, flags, block_group->flags)
906 ctf_integer(u64, start, start)
907 @@ -1391,13 +1832,13 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
909 btrfs_find_free_extent,
911 - TP_PROTO(const struct btrfs_fs_info *info, u64 num_bytes, u64 empty_size,
912 + TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
915 - TP_ARGS(info, num_bytes, empty_size, data),
916 + TP_ARGS(fs_info, num_bytes, empty_size, data),
919 - ctf_array(u8, fsid, info->fsid, BTRFS_UUID_SIZE)
920 + ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
921 ctf_integer(u64, num_bytes, num_bytes)
922 ctf_integer(u64, empty_size, empty_size)
923 ctf_integer(u64, data, data)
924 @@ -1406,14 +1847,14 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
926 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
928 - TP_PROTO(const struct btrfs_fs_info *info,
929 + TP_PROTO(const struct btrfs_fs_info *fs_info,
930 const struct btrfs_block_group_cache *block_group, u64 start,
933 - TP_ARGS(info, block_group, start, len),
934 + TP_ARGS(fs_info, block_group, start, len),
937 - ctf_array(u8, fsid, info->fsid, BTRFS_UUID_SIZE)
938 + ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
939 ctf_integer(u64, bg_objectid, block_group->key.objectid)
940 ctf_integer(u64, flags, block_group->flags)
941 ctf_integer(u64, start, start)
942 @@ -1423,20 +1864,20 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
944 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
946 - TP_PROTO(const struct btrfs_fs_info *info,
947 + TP_PROTO(const struct btrfs_fs_info *fs_info,
948 const struct btrfs_block_group_cache *block_group, u64 start,
951 - TP_ARGS(info, block_group, start, len)
952 + TP_ARGS(fs_info, block_group, start, len)
955 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
957 - TP_PROTO(const struct btrfs_fs_info *info,
958 + TP_PROTO(const struct btrfs_fs_info *fs_info,
959 const struct btrfs_block_group_cache *block_group, u64 start,
962 - TP_ARGS(info, block_group, start, len)
963 + TP_ARGS(fs_info, block_group, start, len)
966 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
967 @@ -1445,13 +1886,13 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
969 btrfs_find_free_extent,
971 - TP_PROTO(struct btrfs_fs_info *info, u64 num_bytes, u64 empty_size,
972 + TP_PROTO(struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
975 - TP_ARGS(info, num_bytes, empty_size, data),
976 + TP_ARGS(fs_info, num_bytes, empty_size, data),
979 - ctf_array(u8, fsid, info->fsid, BTRFS_UUID_SIZE)
980 + ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
981 ctf_integer(u64, num_bytes, num_bytes)
982 ctf_integer(u64, empty_size, empty_size)
983 ctf_integer(u64, data, data)
984 @@ -1460,11 +1901,11 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
986 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
988 - TP_PROTO(struct btrfs_fs_info *info,
989 + TP_PROTO(struct btrfs_fs_info *fs_info,
990 struct btrfs_block_group_cache *block_group, u64 start,
993 - TP_ARGS(info, block_group, start, len),
994 + TP_ARGS(fs_info, block_group, start, len),
997 ctf_integer(u64, bg_objectid, block_group->key.objectid)
998 @@ -1476,20 +1917,20 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
1000 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
1002 - TP_PROTO(struct btrfs_fs_info *info,
1003 + TP_PROTO(struct btrfs_fs_info *fs_info,
1004 struct btrfs_block_group_cache *block_group, u64 start,
1007 - TP_ARGS(info, block_group, start, len)
1008 + TP_ARGS(fs_info, block_group, start, len)
1011 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
1013 - TP_PROTO(struct btrfs_fs_info *info,
1014 + TP_PROTO(struct btrfs_fs_info *fs_info,
1015 struct btrfs_block_group_cache *block_group, u64 start,
1018 - TP_ARGS(info, block_group, start, len)
1019 + TP_ARGS(fs_info, block_group, start, len)
1021 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1022 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1023 diff --git a/instrumentation/events/lttng-module/rpc.h b/instrumentation/events/lttng-module/rpc.h
1024 index b9e45fe..3798e8e 100644
1025 --- a/instrumentation/events/lttng-module/rpc.h
1026 +++ b/instrumentation/events/lttng-module/rpc.h
1028 +/* SPDX-License-Identifier: GPL-2.0 */
1030 #define TRACE_SYSTEM rpc
1033 #include <linux/sunrpc/sched.h>
1034 #include <linux/sunrpc/clnt.h>
1036 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
1037 +LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status,
1039 + TP_PROTO(const struct rpc_task *task),
1044 + ctf_integer(unsigned int, task_id, task->tk_pid)
1045 + ctf_integer(unsigned int, client_id, task->tk_client->cl_clid)
1046 + ctf_integer(int, status, task->tk_status)
1050 +LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_call_status,
1051 + TP_PROTO(const struct rpc_task *task),
1056 +LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_bind_status,
1057 + TP_PROTO(const struct rpc_task *task),
1061 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
1062 +LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status,
1064 + TP_PROTO(struct rpc_task *task),
1069 + ctf_integer(unsigned int, task_id, task->tk_pid)
1070 + ctf_integer(unsigned int, client_id, task->tk_client->cl_clid)
1071 + ctf_integer(int, status, task->tk_status)
1075 +LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_call_status,
1076 + TP_PROTO(struct rpc_task *task),
1081 +LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_bind_status,
1082 + TP_PROTO(struct rpc_task *task),
1087 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status,
1089 TP_PROTO(struct rpc_task *task),
1090 @@ -32,20 +84,53 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_bind_status,
1096 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
1097 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
1098 +LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_connect_status,
1099 + TP_PROTO(const struct rpc_task *task),
1103 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
1104 LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
1105 TP_PROTO(const struct rpc_task *task),
1110 + ctf_integer(unsigned int, task_id, task->tk_pid)
1111 + ctf_integer(unsigned int, client_id, task->tk_client->cl_clid)
1112 + ctf_integer(int, status, task->tk_status)
1115 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
1116 +LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
1117 + TP_PROTO(struct rpc_task *task, int status),
1119 + TP_ARGS(task, status),
1122 + ctf_integer(unsigned int, task_id, task->tk_pid)
1123 + ctf_integer(unsigned int, client_id, task->tk_client->cl_clid)
1124 + ctf_integer(int, status, status)
1128 +LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
1129 + TP_PROTO(struct rpc_task *task, int status),
1131 + TP_ARGS(task, status),
1134 ctf_integer_hex(const struct rpc_task *, task, task)
1135 ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client)
1136 - ctf_integer(int, status, task->tk_status)
1137 + ctf_integer(int, status, status)
1142 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
1143 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
1145 TP_PROTO(const struct rpc_task *task, const void *action),
1146 @@ -53,8 +138,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
1147 TP_ARGS(task, action),
1150 - ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client)
1151 - ctf_integer_hex(const struct rpc_task *, task, task)
1152 + ctf_integer(unsigned int, task_id, task->tk_pid)
1153 + ctf_integer(unsigned int, client_id, task->tk_client->cl_clid)
1154 ctf_integer_hex(const void *, action, action)
1155 ctf_integer(unsigned long, runstate, task->tk_runstate)
1156 ctf_integer(int, status, task->tk_status)
1157 @@ -90,8 +175,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued,
1161 - ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client)
1162 - ctf_integer_hex(const struct rpc_task *, task, task)
1163 + ctf_integer(unsigned int, task_id, task->tk_pid)
1164 + ctf_integer(unsigned int, client_id, task->tk_client->cl_clid)
1165 ctf_integer(unsigned long, timeout, task->tk_timeout)
1166 ctf_integer(unsigned long, runstate, task->tk_runstate)
1167 ctf_integer(int, status, task->tk_status)
1168 @@ -114,19 +199,76 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_wakeup,
1173 -LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
1174 - TP_PROTO(struct rpc_task *task, int status),
1175 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
1176 +LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
1178 - TP_ARGS(task, status),
1179 + TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
1181 + TP_ARGS(clnt, task, action),
1184 - ctf_integer_hex(const struct rpc_task *, task, task)
1185 - ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client)
1186 - ctf_integer(int, status, status)
1187 + ctf_integer(unsigned int, task_id, task->tk_pid)
1188 + ctf_integer(unsigned int, client_id, task->tk_client->cl_clid)
1189 + ctf_integer_hex(const void *, action, action)
1190 + ctf_integer(unsigned long, runstate, task->tk_runstate)
1191 + ctf_integer(int, status, task->tk_status)
1192 + ctf_integer(unsigned short, flags, task->tk_flags)
1196 +LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_begin,
1198 + TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
1200 + TP_ARGS(clnt, task, action)
1203 +LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_run_action,
1205 + TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
1207 + TP_ARGS(clnt, task, action)
1210 +LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_complete,
1212 + TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
1214 + TP_ARGS(clnt, task, action)
1217 +LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued,
1219 + TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q),
1221 + TP_ARGS(clnt, task, q),
1224 + ctf_integer(unsigned int, task_id, task->tk_pid)
1225 + ctf_integer(unsigned int, client_id, task->tk_client->cl_clid)
1226 + ctf_integer(unsigned long, timeout, task->tk_timeout)
1227 + ctf_integer(unsigned long, runstate, task->tk_runstate)
1228 + ctf_integer(int, status, task->tk_status)
1229 + ctf_integer(unsigned short, flags, task->tk_flags)
1230 + ctf_string(q_name, rpc_qname(q))
1234 +LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_sleep,
1236 + TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q),
1238 + TP_ARGS(clnt, task, q)
1241 +LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_wakeup,
1243 + TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q),
1245 + TP_ARGS(clnt, task, q)
1249 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
1251 TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),