- Update to version 2.10.0.
OBS-URL: https://build.opensuse.org/package/show/devel:tools:lttng/lttng-modules?expand=0&rev=16
This commit is contained in:
committed by
Git OBS Bridge
parent
bf771e77bb
commit
fecb3031b7
@@ -6,12 +6,12 @@ Patch-mainline: not yet, kernel patch not yet upstream
|
||||
Update lttng tp to reflect patches.suse/btrfs-constify-tracepoint-arguments
|
||||
|
||||
---
|
||||
instrumentation/events/lttng-module/btrfs.h | 104 ++++++++++++++--------------
|
||||
1 file changed, 52 insertions(+), 52 deletions(-)
|
||||
instrumentation/events/lttng-module/btrfs.h | 106 ++++++++++++++--------------
|
||||
1 file changed, 53 insertions(+), 53 deletions(-)
|
||||
|
||||
--- a/instrumentation/events/lttng-module/btrfs.h
|
||||
+++ b/instrumentation/events/lttng-module/btrfs.h
|
||||
@@ -35,7 +35,7 @@ struct extent_state;
|
||||
@@ -34,7 +34,7 @@ struct extent_state;
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit,
|
||||
|
||||
@@ -20,7 +20,7 @@ Update lttng tp to reflect patches.suse/btrfs-constify-tracepoint-arguments
|
||||
|
||||
TP_ARGS(root),
|
||||
|
||||
@@ -47,7 +47,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_transaction
|
||||
@@ -46,7 +46,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_transaction
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode,
|
||||
|
||||
@@ -29,7 +29,7 @@ Update lttng tp to reflect patches.suse/btrfs-constify-tracepoint-arguments
|
||||
|
||||
TP_ARGS(inode),
|
||||
|
||||
@@ -65,28 +65,28 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inod
|
||||
@@ -64,21 +64,21 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inod
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_new,
|
||||
|
||||
@@ -54,16 +54,19 @@ Update lttng tp to reflect patches.suse/btrfs-constify-tracepoint-arguments
|
||||
|
||||
TP_ARGS(inode)
|
||||
)
|
||||
@@ -87,8 +87,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__i
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
|
||||
|
||||
- TP_PROTO(struct btrfs_root *root, struct extent_map *map),
|
||||
+ TP_PROTO(const struct btrfs_root *root, const struct extent_map *map),
|
||||
- TP_PROTO(struct btrfs_root *root, struct btrfs_inode *inode,
|
||||
- struct extent_map *map),
|
||||
+ TP_PROTO(const struct btrfs_root *root, const struct btrfs_inode *inode,
|
||||
+ const struct extent_map *map),
|
||||
|
||||
TP_ARGS(root, map),
|
||||
|
||||
@@ -105,7 +105,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
|
||||
TP_ARGS(root, inode, map),
|
||||
|
||||
@@ -178,7 +178,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
|
||||
|
||||
- TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
|
||||
@@ -71,7 +74,7 @@ Update lttng tp to reflect patches.suse/btrfs-constify-tracepoint-arguments
|
||||
|
||||
TP_ARGS(inode, ordered),
|
||||
|
||||
@@ -126,36 +126,36 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__orde
|
||||
@@ -221,36 +221,36 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__orde
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
|
||||
|
||||
@@ -114,7 +117,7 @@ Update lttng tp to reflect patches.suse/btrfs-constify-tracepoint-arguments
|
||||
|
||||
TP_ARGS(page, inode, wbc),
|
||||
|
||||
@@ -185,15 +185,15 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrf
|
||||
@@ -280,15 +280,15 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrf
|
||||
|
||||
btrfs__extent_writepage,
|
||||
|
||||
@@ -133,7 +136,7 @@ Update lttng tp to reflect patches.suse/btrfs-constify-tracepoint-arguments
|
||||
|
||||
TP_ARGS(page, start, end, uptodate),
|
||||
|
||||
@@ -210,7 +210,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_writepage_e
|
||||
@@ -305,7 +305,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_writepage_e
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT(btrfs_sync_file,
|
||||
|
||||
@@ -142,8 +145,8 @@ Update lttng tp to reflect patches.suse/btrfs-constify-tracepoint-arguments
|
||||
|
||||
TP_ARGS(file, datasync),
|
||||
|
||||
@@ -226,7 +226,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_sync_file,
|
||||
#if (defined(CONFIG_SUSE_KERNEL) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
|
||||
@@ -321,7 +321,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_sync_file,
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
|
||||
LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
|
||||
|
||||
- TP_PROTO(struct btrfs_fs_info *fs_info, int wait),
|
||||
@@ -151,7 +154,7 @@ Update lttng tp to reflect patches.suse/btrfs-constify-tracepoint-arguments
|
||||
|
||||
TP_ARGS(fs_info, wait),
|
||||
|
||||
@@ -249,8 +249,8 @@ LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
|
||||
@@ -344,8 +344,8 @@ LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group,
|
||||
|
||||
@@ -162,7 +165,7 @@ Update lttng tp to reflect patches.suse/btrfs-constify-tracepoint-arguments
|
||||
|
||||
TP_ARGS(fs_info, block_group, create),
|
||||
|
||||
@@ -268,9 +268,9 @@ LTTNG_TRACEPOINT_EVENT(btrfs_add_block_g
|
||||
@@ -363,9 +363,9 @@ LTTNG_TRACEPOINT_EVENT(btrfs_add_block_g
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
|
||||
LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
|
||||
|
||||
@@ -175,7 +178,7 @@ Update lttng tp to reflect patches.suse/btrfs-constify-tracepoint-arguments
|
||||
int action),
|
||||
|
||||
TP_ARGS(fs_info, ref, full_ref, action),
|
||||
@@ -312,8 +312,8 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tre
|
||||
@@ -407,8 +407,8 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tre
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref,
|
||||
|
||||
@@ -186,7 +189,7 @@ Update lttng tp to reflect patches.suse/btrfs-constify-tracepoint-arguments
|
||||
int action),
|
||||
|
||||
TP_ARGS(ref, full_ref, action),
|
||||
@@ -336,9 +336,9 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_dat
|
||||
@@ -431,9 +431,9 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_dat
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
|
||||
LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head,
|
||||
|
||||
@@ -199,34 +202,34 @@ Update lttng tp to reflect patches.suse/btrfs-constify-tracepoint-arguments
|
||||
int action),
|
||||
|
||||
TP_ARGS(fs_info, ref, head_ref, action),
|
||||
@@ -371,7 +371,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref
|
||||
@@ -468,7 +468,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
|
||||
|
||||
- TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
|
||||
+ TP_PROTO(const struct btrfs_root *root, const struct map_lookup *map,
|
||||
- TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map,
|
||||
+ TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *map,
|
||||
u64 offset, u64 size),
|
||||
|
||||
TP_ARGS(root, map, offset, size),
|
||||
@@ -388,7 +388,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chun
|
||||
TP_ARGS(fs_info, map, offset, size),
|
||||
@@ -485,7 +485,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chun
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
|
||||
|
||||
- TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
|
||||
+ TP_PROTO(const struct btrfs_root *root, const struct map_lookup *map,
|
||||
- TP_PROTO(struct btrfs_fs_info *info, struct map_lookup *map,
|
||||
+ TP_PROTO(const struct btrfs_fs_info *info, const struct map_lookup *map,
|
||||
u64 offset, u64 size),
|
||||
|
||||
TP_ARGS(root, map, offset, size)
|
||||
@@ -396,7 +396,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__c
|
||||
TP_ARGS(info, map, offset, size)
|
||||
@@ -493,7 +493,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__c
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
|
||||
|
||||
- TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
|
||||
+ TP_PROTO(const struct btrfs_root *root, const struct map_lookup *map,
|
||||
- TP_PROTO(struct btrfs_fs_info *info, struct map_lookup *map,
|
||||
+ TP_PROTO(const struct btrfs_fs_info *info, const struct map_lookup *map,
|
||||
u64 offset, u64 size),
|
||||
|
||||
TP_ARGS(root, map, offset, size)
|
||||
@@ -404,8 +404,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__c
|
||||
TP_ARGS(info, map, offset, size)
|
||||
@@ -538,8 +538,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__c
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT(btrfs_cow_block,
|
||||
|
||||
@@ -237,7 +240,7 @@ Update lttng tp to reflect patches.suse/btrfs-constify-tracepoint-arguments
|
||||
|
||||
TP_ARGS(root, buf, cow),
|
||||
|
||||
@@ -422,7 +422,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_cow_block,
|
||||
@@ -556,7 +556,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_cow_block,
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
|
||||
LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
|
||||
|
||||
@@ -246,75 +249,75 @@ Update lttng tp to reflect patches.suse/btrfs-constify-tracepoint-arguments
|
||||
u64 bytes, int reserve),
|
||||
|
||||
TP_ARGS(fs_info, type, val, bytes, reserve),
|
||||
@@ -439,7 +439,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_space_reser
|
||||
@@ -575,7 +575,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_space_reser
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
|
||||
|
||||
- TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
|
||||
+ TP_PROTO(const struct btrfs_root *root, u64 start, u64 len),
|
||||
- TP_PROTO(struct btrfs_fs_info *info, u64 start, u64 len),
|
||||
+ TP_PROTO(const struct btrfs_fs_info *info, u64 start, u64 len),
|
||||
|
||||
TP_ARGS(root, start, len),
|
||||
TP_ARGS(info, start, len),
|
||||
|
||||
@@ -452,14 +452,14 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__rese
|
||||
@@ -587,14 +587,14 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__rese
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
|
||||
|
||||
- TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
|
||||
+ TP_PROTO(const struct btrfs_root *root, u64 start, u64 len),
|
||||
- TP_PROTO(struct btrfs_fs_info *info, u64 start, u64 len),
|
||||
+ TP_PROTO(const struct btrfs_fs_info *info, u64 start, u64 len),
|
||||
|
||||
TP_ARGS(root, start, len)
|
||||
TP_ARGS(info, start, len)
|
||||
)
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
|
||||
|
||||
- TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
|
||||
+ TP_PROTO(const struct btrfs_root *root, u64 start, u64 len),
|
||||
- TP_PROTO(struct btrfs_fs_info *info, u64 start, u64 len),
|
||||
+ TP_PROTO(const struct btrfs_fs_info *info, u64 start, u64 len),
|
||||
|
||||
TP_ARGS(root, start, len)
|
||||
TP_ARGS(info, start, len)
|
||||
)
|
||||
@@ -469,7 +469,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_ext
|
||||
@@ -638,7 +638,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_ext
|
||||
|
||||
btrfs_find_free_extent,
|
||||
|
||||
- TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size,
|
||||
+ TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
|
||||
- TP_PROTO(struct btrfs_fs_info *info, u64 num_bytes, u64 empty_size,
|
||||
+ TP_PROTO(const struct btrfs_fs_info *info, u64 num_bytes, u64 empty_size,
|
||||
u64 data),
|
||||
|
||||
TP_ARGS(root, num_bytes, empty_size, data),
|
||||
@@ -484,8 +484,8 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_ext
|
||||
TP_ARGS(info, num_bytes, empty_size, data),
|
||||
@@ -652,8 +652,8 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_ext
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
|
||||
|
||||
- TP_PROTO(struct btrfs_root *root,
|
||||
- TP_PROTO(struct btrfs_fs_info *info,
|
||||
- struct btrfs_block_group_cache *block_group, u64 start,
|
||||
+ TP_PROTO(const struct btrfs_root *root,
|
||||
+ TP_PROTO(const struct btrfs_fs_info *info,
|
||||
+ const struct btrfs_block_group_cache *block_group, u64 start,
|
||||
u64 len),
|
||||
|
||||
TP_ARGS(root, block_group, start, len),
|
||||
@@ -501,8 +501,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__rese
|
||||
TP_ARGS(info, block_group, start, len),
|
||||
@@ -668,8 +668,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__rese
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
|
||||
|
||||
- TP_PROTO(struct btrfs_root *root,
|
||||
- TP_PROTO(struct btrfs_fs_info *info,
|
||||
- struct btrfs_block_group_cache *block_group, u64 start,
|
||||
+ TP_PROTO(const struct btrfs_root *root,
|
||||
+ TP_PROTO(const struct btrfs_fs_info *info,
|
||||
+ const struct btrfs_block_group_cache *block_group, u64 start,
|
||||
u64 len),
|
||||
|
||||
TP_ARGS(root, block_group, start, len)
|
||||
@@ -510,8 +510,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__r
|
||||
TP_ARGS(info, block_group, start, len)
|
||||
@@ -677,8 +677,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__r
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
|
||||
|
||||
- TP_PROTO(struct btrfs_root *root,
|
||||
- TP_PROTO(struct btrfs_fs_info *info,
|
||||
- struct btrfs_block_group_cache *block_group, u64 start,
|
||||
+ TP_PROTO(const struct btrfs_root *root,
|
||||
+ TP_PROTO(const struct btrfs_fs_info *info,
|
||||
+ const struct btrfs_block_group_cache *block_group, u64 start,
|
||||
u64 len),
|
||||
|
||||
TP_ARGS(root, block_group, start, len)
|
||||
@@ -519,7 +519,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__r
|
||||
TP_ARGS(info, block_group, start, len)
|
||||
@@ -742,7 +742,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__r
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster,
|
||||
|
||||
@@ -323,7 +326,7 @@ Update lttng tp to reflect patches.suse/btrfs-constify-tracepoint-arguments
|
||||
u64 bytes, u64 empty_size, u64 min_bytes),
|
||||
|
||||
TP_ARGS(block_group, start, bytes, empty_size, min_bytes),
|
||||
@@ -536,7 +536,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_find_cluste
|
||||
@@ -759,7 +759,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_find_cluste
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup,
|
||||
|
||||
@@ -332,7 +335,7 @@ Update lttng tp to reflect patches.suse/btrfs-constify-tracepoint-arguments
|
||||
|
||||
TP_ARGS(block_group),
|
||||
|
||||
@@ -547,8 +547,8 @@ LTTNG_TRACEPOINT_EVENT(btrfs_failed_clus
|
||||
@@ -770,8 +770,8 @@ LTTNG_TRACEPOINT_EVENT(btrfs_failed_clus
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster,
|
||||
|
||||
@@ -343,7 +346,7 @@ Update lttng tp to reflect patches.suse/btrfs-constify-tracepoint-arguments
|
||||
|
||||
TP_ARGS(block_group, cluster, size, bitmap),
|
||||
|
||||
@@ -568,12 +568,12 @@ LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_
|
||||
@@ -791,12 +791,12 @@ LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_
|
||||
|
||||
btrfs_alloc_extent_state,
|
||||
|
||||
@@ -353,12 +356,12 @@ Update lttng tp to reflect patches.suse/btrfs-constify-tracepoint-arguments
|
||||
TP_ARGS(state, mask, IP),
|
||||
|
||||
TP_FIELDS(
|
||||
- ctf_integer(struct extent_state *, state, state)
|
||||
+ ctf_integer(const struct extent_state *, state, state)
|
||||
- ctf_integer_hex(struct extent_state *, state, state)
|
||||
+ ctf_integer_hex(const struct extent_state *, state, state)
|
||||
ctf_integer(gfp_t, mask, mask)
|
||||
ctf_integer(unsigned long, ip, IP)
|
||||
)
|
||||
@@ -583,12 +583,12 @@ LTTNG_TRACEPOINT_EVENT_MAP(free_extent_s
|
||||
@@ -806,12 +806,12 @@ LTTNG_TRACEPOINT_EVENT_MAP(free_extent_s
|
||||
|
||||
btrfs_free_extent_state,
|
||||
|
||||
@@ -368,8 +371,8 @@ Update lttng tp to reflect patches.suse/btrfs-constify-tracepoint-arguments
|
||||
TP_ARGS(state, IP),
|
||||
|
||||
TP_FIELDS(
|
||||
- ctf_integer(struct extent_state *, state, state)
|
||||
+ ctf_integer(const struct extent_state *, state, state)
|
||||
- ctf_integer_hex(struct extent_state *, state, state)
|
||||
+ ctf_integer_hex(const struct extent_state *, state, state)
|
||||
ctf_integer(unsigned long, ip, IP)
|
||||
)
|
||||
)
|
||||
|
@@ -1,225 +0,0 @@
|
||||
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
Date: Tue Jan 19 09:51:55 2016 -0500
|
||||
Subject: CVE-2016-0728 check reference counts for overflow
|
||||
Git-commit: 4ce9f32b8ec6ff1de14d734607a5f4a20fb743e5
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
|
||||
Fix: check reference counts for overflow
|
||||
|
||||
Linux kernel CVE-2016-0728 is a use-after-free based on overflow of the
|
||||
reference counting mechanism.
|
||||
|
||||
Implement a kref wrapper in lttng that validates overflows, and use it
|
||||
instead of kref_get(). Also check explicitly for overflows on file
|
||||
fcount counters.
|
||||
|
||||
This should not be an issue in practice in lttng-modules because the ABI
|
||||
is only exposed to root, but let's err on the safe side.
|
||||
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
|
||||
diff --git a/lib/ringbuffer/ring_buffer_frontend.c b/lib/ringbuffer/ring_buffer_frontend.c
|
||||
index c4b797c..dbe52c1 100644
|
||||
--- a/lib/ringbuffer/ring_buffer_frontend.c
|
||||
+++ b/lib/ringbuffer/ring_buffer_frontend.c
|
||||
@@ -61,6 +61,7 @@
|
||||
#include "../../wrapper/ringbuffer/iterator.h"
|
||||
#include "../../wrapper/ringbuffer/nohz.h"
|
||||
#include "../../wrapper/atomic.h"
|
||||
+#include "../../wrapper/kref.h"
|
||||
#include "../../wrapper/percpu-defs.h"
|
||||
|
||||
/*
|
||||
@@ -793,7 +794,10 @@ int lib_ring_buffer_open_read(struct lib_ring_buffer *buf)
|
||||
|
||||
if (!atomic_long_add_unless(&buf->active_readers, 1, 1))
|
||||
return -EBUSY;
|
||||
- kref_get(&chan->ref);
|
||||
+ if (!lttng_kref_get(&chan->ref)) {
|
||||
+ atomic_long_dec(&buf->active_readers);
|
||||
+ return -EOVERFLOW;
|
||||
+ }
|
||||
lttng_smp_mb__after_atomic();
|
||||
return 0;
|
||||
}
|
||||
diff --git a/lttng-abi.c b/lttng-abi.c
|
||||
index 3572e58..b51434a 100644
|
||||
--- a/lttng-abi.c
|
||||
+++ b/lttng-abi.c
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "wrapper/ringbuffer/frontend.h"
|
||||
#include "wrapper/poll.h"
|
||||
#include "wrapper/file.h"
|
||||
+#include "wrapper/kref.h"
|
||||
#include "lttng-abi.h"
|
||||
#include "lttng-abi-old.h"
|
||||
#include "lttng-events.h"
|
||||
@@ -417,6 +418,10 @@ int lttng_abi_create_channel(struct file *session_file,
|
||||
transport_name = "<unknown>";
|
||||
break;
|
||||
}
|
||||
+ if (atomic_long_add_unless(&session_file->f_count,
|
||||
+ 1, INT_MAX) == INT_MAX) {
|
||||
+ goto refcount_error;
|
||||
+ }
|
||||
/*
|
||||
* We tolerate no failure path after channel creation. It will stay
|
||||
* invariant for the rest of the session.
|
||||
@@ -434,11 +439,12 @@ int lttng_abi_create_channel(struct file *session_file,
|
||||
chan->file = chan_file;
|
||||
chan_file->private_data = chan;
|
||||
fd_install(chan_fd, chan_file);
|
||||
- atomic_long_inc(&session_file->f_count);
|
||||
|
||||
return chan_fd;
|
||||
|
||||
chan_error:
|
||||
+ atomic_long_dec(&session_file->f_count);
|
||||
+refcount_error:
|
||||
fput(chan_file);
|
||||
file_error:
|
||||
put_unused_fd(chan_fd);
|
||||
@@ -927,17 +933,20 @@ int lttng_abi_open_metadata_stream(struct file *channel_file)
|
||||
goto notransport;
|
||||
}
|
||||
|
||||
+ if (!lttng_kref_get(&session->metadata_cache->refcount))
|
||||
+ goto kref_error;
|
||||
ret = lttng_abi_create_stream_fd(channel_file, stream_priv,
|
||||
<tng_metadata_ring_buffer_file_operations);
|
||||
if (ret < 0)
|
||||
goto fd_error;
|
||||
|
||||
- kref_get(&session->metadata_cache->refcount);
|
||||
list_add(&metadata_stream->list,
|
||||
&session->metadata_cache->metadata_stream);
|
||||
return ret;
|
||||
|
||||
fd_error:
|
||||
+ kref_put(&session->metadata_cache->refcount, metadata_cache_destroy);
|
||||
+kref_error:
|
||||
module_put(metadata_stream->transport->owner);
|
||||
notransport:
|
||||
kfree(metadata_stream);
|
||||
@@ -981,6 +990,11 @@ int lttng_abi_create_event(struct file *channel_file,
|
||||
ret = PTR_ERR(event_file);
|
||||
goto file_error;
|
||||
}
|
||||
+ /* The event holds a reference on the channel */
|
||||
+ if (atomic_long_add_unless(&channel_file->f_count,
|
||||
+ 1, INT_MAX) == INT_MAX) {
|
||||
+ goto refcount_error;
|
||||
+ }
|
||||
if (event_param->instrumentation == LTTNG_KERNEL_TRACEPOINT
|
||||
|| event_param->instrumentation == LTTNG_KERNEL_SYSCALL) {
|
||||
struct lttng_enabler *enabler;
|
||||
@@ -1012,11 +1026,11 @@ int lttng_abi_create_event(struct file *channel_file,
|
||||
}
|
||||
event_file->private_data = priv;
|
||||
fd_install(event_fd, event_file);
|
||||
- /* The event holds a reference on the channel */
|
||||
- atomic_long_inc(&channel_file->f_count);
|
||||
return event_fd;
|
||||
|
||||
event_error:
|
||||
+ atomic_long_dec(&channel_file->f_count);
|
||||
+refcount_error:
|
||||
fput(event_file);
|
||||
file_error:
|
||||
put_unused_fd(event_fd);
|
||||
diff --git a/lttng-events.c b/lttng-events.c
|
||||
index 4b76ea0..d0ebb29 100644
|
||||
--- a/lttng-events.c
|
||||
+++ b/lttng-events.c
|
||||
@@ -1043,17 +1043,22 @@ int lttng_session_list_tracker_pids(struct lttng_session *session)
|
||||
ret = PTR_ERR(tracker_pids_list_file);
|
||||
goto file_error;
|
||||
}
|
||||
+ if (atomic_long_add_unless(&session->file->f_count,
|
||||
+ 1, INT_MAX) == INT_MAX) {
|
||||
+ goto refcount_error;
|
||||
+ }
|
||||
ret = lttng_tracker_pids_list_fops.open(NULL, tracker_pids_list_file);
|
||||
if (ret < 0)
|
||||
goto open_error;
|
||||
m = tracker_pids_list_file->private_data;
|
||||
m->private = session;
|
||||
fd_install(file_fd, tracker_pids_list_file);
|
||||
- atomic_long_inc(&session->file->f_count);
|
||||
|
||||
return file_fd;
|
||||
|
||||
open_error:
|
||||
+ atomic_long_dec(&session->file->f_count);
|
||||
+refcount_error:
|
||||
fput(tracker_pids_list_file);
|
||||
file_error:
|
||||
put_unused_fd(file_fd);
|
||||
diff --git a/probes/lttng-kretprobes.c b/probes/lttng-kretprobes.c
|
||||
index 52b3f78..10bb52f 100644
|
||||
--- a/probes/lttng-kretprobes.c
|
||||
+++ b/probes/lttng-kretprobes.c
|
||||
@@ -219,9 +219,9 @@ int lttng_kretprobes_register(const char *name,
|
||||
* unregistered. Same for memory allocation.
|
||||
*/
|
||||
kref_init(<tng_krp->kref_alloc);
|
||||
- kref_get(<tng_krp->kref_alloc); /* inc refcount to 2 */
|
||||
+ kref_get(<tng_krp->kref_alloc); /* inc refcount to 2, no overflow. */
|
||||
kref_init(<tng_krp->kref_register);
|
||||
- kref_get(<tng_krp->kref_register); /* inc refcount to 2 */
|
||||
+ kref_get(<tng_krp->kref_register); /* inc refcount to 2, no overflow. */
|
||||
|
||||
/*
|
||||
* Ensure the memory we just allocated don't trigger page faults.
|
||||
diff --git a/wrapper/kref.h b/wrapper/kref.h
|
||||
new file mode 100644
|
||||
index 0000000..eedefbf
|
||||
--- /dev/null
|
||||
+++ b/wrapper/kref.h
|
||||
@@ -0,0 +1,46 @@
|
||||
+#ifndef _LTTNG_WRAPPER_KREF_H
|
||||
+#define _LTTNG_WRAPPER_KREF_H
|
||||
+
|
||||
+/*
|
||||
+ * wrapper/kref.h
|
||||
+ *
|
||||
+ * wrapper around linux/kref.h.
|
||||
+ *
|
||||
+ * Copyright (C) 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation; only version 2 of the License.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License along
|
||||
+ * with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
+ *
|
||||
+ * This wrapper code is derived from Linux 3.19.2 include/linux/list.h
|
||||
+ * and include/linux/rculist.h, hence the GPLv2 license applied to this
|
||||
+ * file.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/kref.h>
|
||||
+#include <linux/rculist.h>
|
||||
+
|
||||
+/*
|
||||
+ * lttng_kref_get: get reference count, checking for overflow.
|
||||
+ *
|
||||
+ * Return 1 if reference is taken, 0 otherwise (overflow).
|
||||
+ */
|
||||
+static inline int lttng_kref_get(struct kref *kref)
|
||||
+{
|
||||
+ if (atomic_add_unless(&kref->refcount, 1, INT_MAX) != INT_MAX) {
|
||||
+ return 1;
|
||||
+ } else {
|
||||
+ return 0;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+#endif /* _LTTNG_WRAPPER_KREF_H */
|
@@ -1,127 +0,0 @@
|
||||
Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
Date: Tue Aug 30 17:32:35 2016 -0400
|
||||
Subject: Fix: btrfs instrumentation for 4.8 kernel
|
||||
Git-commit fcd0a11cf26fe7517e84989c78b2664bbe34bb63
|
||||
References: bsc#1036276
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
|
||||
Fix: btrfs instrumentation for 4.8 kernel
|
||||
|
||||
Note: there are missing events.
|
||||
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
|
||||
diff --git a/instrumentation/events/lttng-module/btrfs.h b/instrumentation/events/lttng-module/btrfs.h
|
||||
index 38c66c1..ea6710f 100644
|
||||
--- a/instrumentation/events/lttng-module/btrfs.h
|
||||
+++ b/instrumentation/events/lttng-module/btrfs.h
|
||||
@@ -222,6 +222,18 @@ LTTNG_TRACEPOINT_EVENT(btrfs_sync_file,
|
||||
)
|
||||
)
|
||||
|
||||
+#if (defined(CONFIG_SUSE_KERNEL) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
|
||||
+LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
|
||||
+
|
||||
+ TP_PROTO(struct btrfs_fs_info *fs_info, int wait),
|
||||
+
|
||||
+ TP_ARGS(fs_info, wait),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_integer(int, wait, wait)
|
||||
+ )
|
||||
+)
|
||||
+#else
|
||||
LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
|
||||
|
||||
TP_PROTO(int wait),
|
||||
@@ -232,7 +244,48 @@ LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
|
||||
ctf_integer(int, wait, wait)
|
||||
)
|
||||
)
|
||||
+#endif
|
||||
+
|
||||
+LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group,
|
||||
+
|
||||
+ TP_PROTO(struct btrfs_fs_info *fs_info,
|
||||
+ struct btrfs_block_group_cache *block_group, int create),
|
||||
+
|
||||
+ TP_ARGS(fs_info, block_group, create),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_array(u8, fsid, fs_info->fsid, BTRFS_UUID_SIZE)
|
||||
+ ctf_integer(u64, offset, block_group->key.objectid)
|
||||
+ ctf_integer(u64, size, block_group->key.offset)
|
||||
+ ctf_integer(u64, flags, block_group->flags)
|
||||
+ ctf_integer(u64, bytes_used, btrfs_block_group_used(&block_group->item))
|
||||
+ ctf_integer(u64, bytes_super, block_group->bytes_super)
|
||||
+ ctf_integer(int, create, create)
|
||||
+ )
|
||||
+)
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
|
||||
+LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
|
||||
+
|
||||
+ TP_PROTO(struct btrfs_fs_info *fs_info,
|
||||
+ struct btrfs_delayed_ref_node *ref,
|
||||
+ struct btrfs_delayed_tree_ref *full_ref,
|
||||
+ int action),
|
||||
+
|
||||
+ TP_ARGS(fs_info, ref, full_ref, action),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_integer(u64, bytenr, ref->bytenr)
|
||||
+ ctf_integer(u64, num_bytes, ref->num_bytes)
|
||||
+ ctf_integer(int, action, action)
|
||||
+ ctf_integer(u64, parent, full_ref->parent)
|
||||
+ ctf_integer(u64, ref_root, full_ref->root)
|
||||
+ ctf_integer(int, level, full_ref->level)
|
||||
+ ctf_integer(int, type, ref->type)
|
||||
+ ctf_integer(u64, seq, ref->seq)
|
||||
+ )
|
||||
+)
|
||||
+#else
|
||||
LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
|
||||
|
||||
TP_PROTO(struct btrfs_delayed_ref_node *ref,
|
||||
@@ -254,6 +307,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
|
||||
#endif
|
||||
)
|
||||
)
|
||||
+#endif
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref,
|
||||
|
||||
@@ -278,6 +332,25 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref,
|
||||
)
|
||||
)
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
|
||||
+LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head,
|
||||
+
|
||||
+ TP_PROTO(struct btrfs_fs_info *fs_info,
|
||||
+ struct btrfs_delayed_ref_node *ref,
|
||||
+ struct btrfs_delayed_ref_head *head_ref,
|
||||
+ int action),
|
||||
+
|
||||
+ TP_ARGS(fs_info, ref, head_ref, action),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_integer(u64, bytenr, ref->bytenr)
|
||||
+ ctf_integer(u64, num_bytes, ref->num_bytes)
|
||||
+ ctf_integer(int, action, action)
|
||||
+ ctf_integer(int, is_data, head_ref->is_data)
|
||||
+ )
|
||||
+)
|
||||
+
|
||||
+#else
|
||||
LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head,
|
||||
|
||||
TP_PROTO(struct btrfs_delayed_ref_node *ref,
|
||||
@@ -293,6 +366,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head,
|
||||
ctf_integer(int, is_data, head_ref->is_data)
|
||||
)
|
||||
)
|
||||
+#endif
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
|
||||
|
3
lttng-modules-2.10.0.tar.bz2
Normal file
3
lttng-modules-2.10.0.tar.bz2
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ff655d299b8117bd72c2c3ac91de739c3ad9ca8091d6b38c74bffa7f923cf1bf
|
||||
size 298584
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3ce48a0d0fef39d2cc4687ec866de8f2fe49289faad02425b689559d7ddd077f
|
||||
size 297555
|
@@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 31 19:10:19 UTC 2017 - tonyj@suse.com
|
||||
|
||||
- Update to version 3.10 for SLE15 (bsc#1055683)
|
||||
Temp disable RT builds
|
||||
Drop patch: cve-2016-0728-check-reference-counts-for-overflow.patch
|
||||
Drop patch: fix-btrfs-instrumentation-for-4.8-kernel.patch
|
||||
Drop patch: tracepoint-event-add-tp_code_post.patch
|
||||
Drop patch: update-block-instrumentation-to-compile-on-4.8-kernels.patch
|
||||
Modify patch: btrfs-constify-tracepoint-arguments.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 20 21:46:15 UTC 2017 - tonyj@suse.com
|
||||
|
||||
|
@@ -19,7 +19,7 @@
|
||||
|
||||
%if ! 0%{?is_opensuse}
|
||||
%ifarch x86_64
|
||||
%define buildrt 1
|
||||
%define buildrt 0
|
||||
%endif
|
||||
%endif
|
||||
|
||||
@@ -28,7 +28,7 @@ License: GPL-2.0 and LGPL-2.1 and MIT
|
||||
Group: System/Kernel
|
||||
|
||||
Name: lttng-modules
|
||||
Version: 2.7.1
|
||||
Version: 2.10.0
|
||||
Release: 0
|
||||
Source: http://lttng.org/files/lttng-modules/%{name}-%{version}.tar.bz2
|
||||
Source1: %{name}-preamble
|
||||
@@ -42,11 +42,7 @@ BuildRequires: module-init-tools
|
||||
BuildRequires: kernel-syms-rt
|
||||
%endif
|
||||
ExclusiveArch: x86_64
|
||||
Patch1: cve-2016-0728-check-reference-counts-for-overflow.patch
|
||||
Patch2: tracepoint-event-add-tp_code_post.patch
|
||||
Patch3: update-block-instrumentation-to-compile-on-4.8-kernels.patch
|
||||
Patch4: fix-btrfs-instrumentation-for-4.8-kernel.patch
|
||||
Patch5: btrfs-constify-tracepoint-arguments.patch
|
||||
Patch1: btrfs-constify-tracepoint-arguments.patch
|
||||
|
||||
%suse_kernel_module_package -p %{name}-preamble ec2 xen xenpae vmi um
|
||||
|
||||
@@ -68,10 +64,6 @@ instrumenting kernel subsystems.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
|
||||
set -- *
|
||||
mkdir source
|
||||
@@ -90,7 +82,7 @@ for flavor in %flavors_to_build; do
|
||||
rm -rf obj/$flavor
|
||||
cp -r source obj/$flavor
|
||||
cp %{S:2} obj/$flavor
|
||||
make -C /usr/src/linux-obj/%_target_cpu/$flavor modules M=$PWD/obj/$flavor
|
||||
make -C /usr/src/linux-obj/%_target_cpu/$flavor modules M=$PWD/obj/$flavor CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m
|
||||
done
|
||||
|
||||
%install
|
||||
@@ -98,7 +90,7 @@ export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
|
||||
export INSTALL_MOD_DIR=updates
|
||||
export BRP_PESIGN_FILES="*.ko /lib/firmware"
|
||||
for flavor in %flavors_to_build; do
|
||||
make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install M=$PWD/obj/$flavor
|
||||
make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install M=$PWD/obj/$flavor CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m
|
||||
done
|
||||
|
||||
%files
|
||||
|
@@ -1,564 +0,0 @@
|
||||
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
Date: Fri Oct 9 10:02:37 2015 -0400
|
||||
Subject: Tracepoint event: add "TP_code_post()"
|
||||
Git-commit 265822ae7c567f883f17d89316b5540eb4447d6f
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
|
||||
Tracepoint event: add "TP_code_post()"
|
||||
|
||||
Useful for probes that need to perform teardown after serialization,
|
||||
e.g. allocate temporary memory in TP_code_pre() and free it in
|
||||
TP_code_post(). Be careful to only use memory allocation from contexts
|
||||
allowing it.
|
||||
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
|
||||
diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
|
||||
index 32c4743..c366267 100644
|
||||
--- a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
|
||||
+++ b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
|
||||
@@ -122,7 +122,7 @@ LTTNG_TRACEPOINT_EVENT_CODE(kvm_exit,
|
||||
u64 info1, info2;
|
||||
),
|
||||
|
||||
- TP_code(
|
||||
+ TP_code_pre(
|
||||
kvm_x86_ops->get_exit_info(vcpu, &tp_locvar->info1,
|
||||
&tp_locvar->info2);
|
||||
),
|
||||
@@ -133,7 +133,9 @@ LTTNG_TRACEPOINT_EVENT_CODE(kvm_exit,
|
||||
ctf_integer(u32, isa, isa)
|
||||
ctf_integer(u64, info1, tp_locvar->info1)
|
||||
ctf_integer(u64, info2, tp_locvar->info2)
|
||||
- )
|
||||
+ ),
|
||||
+
|
||||
+ TP_code_post()
|
||||
)
|
||||
|
||||
/*
|
||||
diff --git a/instrumentation/events/lttng-module/block.h b/instrumentation/events/lttng-module/block.h
|
||||
index 3505df0..1a2ba6b 100644
|
||||
--- a/instrumentation/events/lttng-module/block.h
|
||||
+++ b/instrumentation/events/lttng-module/block.h
|
||||
@@ -135,7 +135,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq_with_error,
|
||||
size_t cmd_len;
|
||||
),
|
||||
|
||||
- TP_code(
|
||||
+ TP_code_pre(
|
||||
if (rq->cmd_type == REQ_TYPE_BLOCK_PC) {
|
||||
tp_locvar->sector = 0;
|
||||
tp_locvar->nr_sector = 0;
|
||||
@@ -159,7 +159,9 @@ LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq_with_error,
|
||||
rq->cmd_flags, blk_rq_bytes(rq))
|
||||
ctf_sequence_hex(unsigned char, cmd,
|
||||
tp_locvar->cmd, size_t, tp_locvar->cmd_len)
|
||||
- )
|
||||
+ ),
|
||||
+
|
||||
+ TP_code_post()
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -227,7 +229,7 @@ LTTNG_TRACEPOINT_EVENT_CODE(block_rq_complete,
|
||||
size_t cmd_len;
|
||||
),
|
||||
|
||||
- TP_code(
|
||||
+ TP_code_pre(
|
||||
if (rq->cmd_type == REQ_TYPE_BLOCK_PC) {
|
||||
tp_locvar->cmd = rq->cmd;
|
||||
tp_locvar->cmd_len = rq->cmd_len;
|
||||
@@ -247,7 +249,9 @@ LTTNG_TRACEPOINT_EVENT_CODE(block_rq_complete,
|
||||
rq->cmd_flags, nr_bytes)
|
||||
ctf_sequence_hex(unsigned char, cmd,
|
||||
tp_locvar->cmd, size_t, tp_locvar->cmd_len)
|
||||
- )
|
||||
+ ),
|
||||
+
|
||||
+ TP_code_post()
|
||||
)
|
||||
|
||||
#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */
|
||||
@@ -286,7 +290,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq,
|
||||
size_t cmd_len;
|
||||
),
|
||||
|
||||
- TP_code(
|
||||
+ TP_code_pre(
|
||||
if (rq->cmd_type == REQ_TYPE_BLOCK_PC) {
|
||||
tp_locvar->sector = 0;
|
||||
tp_locvar->nr_sector = 0;
|
||||
@@ -314,7 +318,9 @@ LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq,
|
||||
ctf_sequence_hex(unsigned char, cmd,
|
||||
tp_locvar->cmd, size_t, tp_locvar->cmd_len)
|
||||
ctf_array_text(char, comm, current->comm, TASK_COMM_LEN)
|
||||
- )
|
||||
+ ),
|
||||
+
|
||||
+ TP_code_post()
|
||||
)
|
||||
|
||||
/**
|
||||
diff --git a/instrumentation/events/lttng-module/compaction.h b/instrumentation/events/lttng-module/compaction.h
|
||||
index 2c25846..771da7d 100644
|
||||
--- a/instrumentation/events/lttng-module/compaction.h
|
||||
+++ b/instrumentation/events/lttng-module/compaction.h
|
||||
@@ -114,7 +114,7 @@ LTTNG_TRACEPOINT_EVENT_CODE_MAP(mm_compaction_migratepages,
|
||||
unsigned long nr_failed;
|
||||
),
|
||||
|
||||
- TP_code(
|
||||
+ TP_code_pre(
|
||||
tp_locvar->nr_failed = 0;
|
||||
|
||||
{
|
||||
@@ -131,7 +131,9 @@ LTTNG_TRACEPOINT_EVENT_CODE_MAP(mm_compaction_migratepages,
|
||||
TP_FIELDS(
|
||||
ctf_integer(unsigned long, nr_migrated, nr_all - tp_locvar->nr_failed)
|
||||
ctf_integer(unsigned long, nr_failed, tp_locvar->nr_failed)
|
||||
- )
|
||||
+ ),
|
||||
+
|
||||
+ TP_code_post()
|
||||
)
|
||||
#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */
|
||||
LTTNG_TRACEPOINT_EVENT_MAP(mm_compaction_migratepages,
|
||||
diff --git a/instrumentation/events/lttng-module/sched.h b/instrumentation/events/lttng-module/sched.h
|
||||
index 2efff16..dc30398 100644
|
||||
--- a/instrumentation/events/lttng-module/sched.h
|
||||
+++ b/instrumentation/events/lttng-module/sched.h
|
||||
@@ -349,7 +349,7 @@ LTTNG_TRACEPOINT_EVENT_CODE(sched_process_fork,
|
||||
unsigned int ns_level;
|
||||
),
|
||||
|
||||
- TP_code(
|
||||
+ TP_code_pre(
|
||||
if (child) {
|
||||
struct pid *child_pid;
|
||||
unsigned int i;
|
||||
@@ -403,7 +403,9 @@ LTTNG_TRACEPOINT_EVENT_CODE(sched_process_fork,
|
||||
child_ns_inum;
|
||||
}))
|
||||
#endif
|
||||
- )
|
||||
+ ),
|
||||
+
|
||||
+ TP_code_post()
|
||||
)
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
|
||||
diff --git a/instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_pointers_override.h b/instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_pointers_override.h
|
||||
index 702cfb5..837991a 100644
|
||||
--- a/instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_pointers_override.h
|
||||
+++ b/instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_pointers_override.h
|
||||
@@ -11,7 +11,7 @@ SC_LTTNG_TRACEPOINT_EVENT_CODE(connect,
|
||||
uint16_t v6addr[8];
|
||||
unsigned int v4addr_len, v6addr_len;
|
||||
),
|
||||
- TP_code(
|
||||
+ TP_code_pre(
|
||||
sc_in(
|
||||
memset(tp_locvar, 0, sizeof(*tp_locvar));
|
||||
if (addrlen < sizeof(struct sockaddr))
|
||||
@@ -48,7 +48,8 @@ SC_LTTNG_TRACEPOINT_EVENT_CODE(connect,
|
||||
sc_in(ctf_integer_network(uint16_t, dport, tp_locvar->dport))
|
||||
sc_in(ctf_sequence_network(uint8_t, v4addr, &tp_locvar->v4addr, unsigned int, tp_locvar->v4addr_len))
|
||||
sc_in(ctf_sequence_network(uint16_t, v6addr, &tp_locvar->v6addr, unsigned int, tp_locvar->v6addr_len))
|
||||
- )
|
||||
+ ),
|
||||
+ TP_code_post()
|
||||
)
|
||||
|
||||
#define OVERRIDE_64_accept
|
||||
@@ -63,7 +64,7 @@ SC_LTTNG_TRACEPOINT_EVENT_CODE(accept,
|
||||
int v4addr_len, v6addr_len;
|
||||
int uaddr_len;
|
||||
),
|
||||
- TP_code(
|
||||
+ TP_code_pre(
|
||||
sc_inout(
|
||||
memset(tp_locvar, 0, sizeof(*tp_locvar));
|
||||
(void) get_user(tp_locvar->uaddr_len, upeer_addrlen);
|
||||
@@ -103,7 +104,8 @@ SC_LTTNG_TRACEPOINT_EVENT_CODE(accept,
|
||||
sc_out(ctf_integer_network(uint16_t, sport, tp_locvar->sport))
|
||||
sc_in(ctf_sequence_network(uint8_t, v4addr, &tp_locvar->v4addr, unsigned int, tp_locvar->v4addr_len))
|
||||
sc_in(ctf_sequence_network(uint16_t, v6addr, &tp_locvar->v6addr, unsigned int, tp_locvar->v6addr_len))
|
||||
- )
|
||||
+ ),
|
||||
+ TP_code_post()
|
||||
)
|
||||
|
||||
#define OVERRIDE_64_pipe
|
||||
diff --git a/lttng-syscalls.c b/lttng-syscalls.c
|
||||
index 5fa6666..806485f 100644
|
||||
--- a/lttng-syscalls.c
|
||||
+++ b/lttng-syscalls.c
|
||||
@@ -118,10 +118,10 @@ struct file_handle;
|
||||
#define SC_LTTNG_TRACEPOINT_EVENT(_name, _proto, _args, _fields) \
|
||||
LTTNG_TRACEPOINT_EVENT(syscall_entry_##_name, PARAMS(_proto), PARAMS(_args), \
|
||||
PARAMS(_fields))
|
||||
-#define SC_LTTNG_TRACEPOINT_EVENT_CODE(_name, _proto, _args, _locvar, _code, _fields) \
|
||||
+#define SC_LTTNG_TRACEPOINT_EVENT_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \
|
||||
LTTNG_TRACEPOINT_EVENT_CODE(syscall_entry_##_name, PARAMS(_proto), PARAMS(_args), \
|
||||
- PARAMS(_locvar), PARAMS(_code), \
|
||||
- PARAMS(_fields))
|
||||
+ PARAMS(_locvar), PARAMS(_code_pre), \
|
||||
+ PARAMS(_fields), PARAMS(_code_post))
|
||||
#define SC_LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(_name, _fields) \
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(syscall_entry_##_name, PARAMS(_fields))
|
||||
#define SC_LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(_template, _name) \
|
||||
@@ -150,9 +150,9 @@ struct file_handle;
|
||||
#define SC_LTTNG_TRACEPOINT_EVENT(_name, _proto, _args, _fields) \
|
||||
LTTNG_TRACEPOINT_EVENT(compat_syscall_entry_##_name, PARAMS(_proto), PARAMS(_args), \
|
||||
PARAMS(_fields))
|
||||
-#define SC_LTTNG_TRACEPOINT_EVENT_CODE(_name, _proto, _args, _locvar, _code, _fields) \
|
||||
+#define SC_LTTNG_TRACEPOINT_EVENT_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \
|
||||
LTTNG_TRACEPOINT_EVENT_CODE(compat_syscall_entry_##_name, PARAMS(_proto), PARAMS(_args), \
|
||||
- PARAMS(_locvar), PARAMS(_code), PARAMS(_fields))
|
||||
+ PARAMS(_locvar), PARAMS(_code_pre), PARAMS(_fields), PARAMS(_code_post))
|
||||
#define SC_LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(_name, _fields) \
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(compat_syscall_entry_##_name, PARAMS(_fields))
|
||||
#define SC_LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(_template, _name) \
|
||||
@@ -194,9 +194,9 @@ struct file_handle;
|
||||
#define SC_LTTNG_TRACEPOINT_EVENT(_name, _proto, _args, _fields) \
|
||||
LTTNG_TRACEPOINT_EVENT(syscall_exit_##_name, PARAMS(_proto), PARAMS(_args), \
|
||||
PARAMS(_fields))
|
||||
-#define SC_LTTNG_TRACEPOINT_EVENT_CODE(_name, _proto, _args, _locvar, _code, _fields) \
|
||||
+#define SC_LTTNG_TRACEPOINT_EVENT_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \
|
||||
LTTNG_TRACEPOINT_EVENT_CODE(syscall_exit_##_name, PARAMS(_proto), PARAMS(_args), \
|
||||
- PARAMS(_locvar), PARAMS(_code), PARAMS(_fields))
|
||||
+ PARAMS(_locvar), PARAMS(_code_pre), PARAMS(_fields), PARAMS(_code_post))
|
||||
#define SC_LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(_name, _fields) \
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(syscall_exit_##_name, PARAMS(_fields))
|
||||
#define SC_LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(_template, _name) \
|
||||
@@ -226,9 +226,9 @@ struct file_handle;
|
||||
#define SC_LTTNG_TRACEPOINT_EVENT(_name, _proto, _args, _fields) \
|
||||
LTTNG_TRACEPOINT_EVENT(compat_syscall_exit_##_name, PARAMS(_proto), PARAMS(_args), \
|
||||
PARAMS(_fields))
|
||||
-#define SC_LTTNG_TRACEPOINT_EVENT_CODE(_name, _proto, _args, _locvar, _code, _fields) \
|
||||
+#define SC_LTTNG_TRACEPOINT_EVENT_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \
|
||||
LTTNG_TRACEPOINT_EVENT_CODE(compat_syscall_exit_##_name, PARAMS(_proto), PARAMS(_args), \
|
||||
- PARAMS(_locvar), PARAMS(_code), PARAMS(_fields))
|
||||
+ PARAMS(_locvar), PARAMS(_code_pre), PARAMS(_fields), PARAMS(_code_post))
|
||||
#define SC_LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(_name, _fields) \
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(compat_syscall_exit_##_name, PARAMS(_fields))
|
||||
#define SC_LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(_template, _name) \
|
||||
diff --git a/probes/define_trace.h b/probes/define_trace.h
|
||||
index 4b67f5f..98bd9f8 100644
|
||||
--- a/probes/define_trace.h
|
||||
+++ b/probes/define_trace.h
|
||||
@@ -56,10 +56,10 @@
|
||||
#define LTTNG_TRACEPOINT_EVENT(name, proto, args, fields)
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CODE
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CODE(name, proto, args, _locvar, _code, fields)
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CODE(name, proto, args, _locvar, _code_pre, fields, _code_post)
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CODE_MAP
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CODE_MAP(name, map, proto, args, _locvar, _code, fields)
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CODE_MAP(name, map, proto, args, _locvar, _code_pre, fields, _code_post)
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_INSTANCE
|
||||
#define LTTNG_TRACEPOINT_EVENT_INSTANCE(template, name, proto, args)
|
||||
diff --git a/probes/lttng-events-reset.h b/probes/lttng-events-reset.h
|
||||
index 1bc7782..8262d83 100644
|
||||
--- a/probes/lttng-events-reset.h
|
||||
+++ b/probes/lttng-events-reset.h
|
||||
@@ -21,10 +21,10 @@
|
||||
/* Reset macros used within LTTNG_TRACEPOINT_EVENT to "nothing" */
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code, _fields)
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post)
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, _fields)
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, _fields, _code_post)
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP
|
||||
#define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(_template, _name, _map, _proto, _args)
|
||||
@@ -41,8 +41,11 @@
|
||||
#undef TP_locvar
|
||||
#define TP_locvar(...)
|
||||
|
||||
-#undef TP_code
|
||||
-#define TP_code(...)
|
||||
+#undef TP_code_pre
|
||||
+#define TP_code_pre(...)
|
||||
+
|
||||
+#undef TP_code_post
|
||||
+#define TP_code_post(...)
|
||||
|
||||
#undef TP_FIELDS
|
||||
#define TP_FIELDS(args...)
|
||||
diff --git a/probes/lttng-events.h b/probes/lttng-events.h
|
||||
index 35d6f79..0e3b713 100644
|
||||
--- a/probes/lttng-events.h
|
||||
+++ b/probes/lttng-events.h
|
||||
@@ -55,23 +55,25 @@
|
||||
LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(map, name, map)
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CODE_MAP
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CODE_MAP(name, map, proto, args, _locvar, _code, fields) \
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CODE_MAP(name, map, proto, args, _locvar, _code_pre, fields, _code_post) \
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS_CODE(map, \
|
||||
PARAMS(proto), \
|
||||
PARAMS(args), \
|
||||
PARAMS(_locvar), \
|
||||
- PARAMS(_code), \
|
||||
- PARAMS(fields)) \
|
||||
+ PARAMS(_code_pre), \
|
||||
+ PARAMS(fields), \
|
||||
+ PARAMS(_code_post)) \
|
||||
LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(map, name, map, PARAMS(proto), PARAMS(args))
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CODE
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CODE(name, proto, args, _locvar, _code, fields) \
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CODE(name, proto, args, _locvar, _code_pre, fields, _code_post) \
|
||||
LTTNG_TRACEPOINT_EVENT_CODE_MAP(name, name, \
|
||||
PARAMS(proto), \
|
||||
PARAMS(args), \
|
||||
PARAMS(_locvar), \
|
||||
- PARAMS(_code), \
|
||||
- PARAMS(fields))
|
||||
+ PARAMS(_code_pre), \
|
||||
+ PARAMS(fields), \
|
||||
+ PARAMS(_code_post))
|
||||
|
||||
/*
|
||||
* LTTNG_TRACEPOINT_EVENT_CLASS can be used to add a generic function
|
||||
@@ -106,11 +108,11 @@
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CLASS
|
||||
#define LTTNG_TRACEPOINT_EVENT_CLASS(_name, _proto, _args, _fields) \
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, PARAMS(_proto), PARAMS(_args), , , \
|
||||
- PARAMS(_fields))
|
||||
+ PARAMS(_fields), )
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS
|
||||
#define LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(_name, _fields) \
|
||||
- LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, , , PARAMS(_fields))
|
||||
+ LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, , , PARAMS(_fields), )
|
||||
|
||||
|
||||
/*
|
||||
@@ -165,11 +167,11 @@ void __event_template_proto___##_template(_proto);
|
||||
void __event_template_proto___##_template(void);
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code, _fields) \
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \
|
||||
void __event_template_proto___##_name(_proto);
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, _fields) \
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, _fields, _code_post) \
|
||||
void __event_template_proto___##_name(void);
|
||||
|
||||
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
|
||||
@@ -302,14 +304,14 @@ void __event_template_proto___##_name(void);
|
||||
#define TP_FIELDS(...) __VA_ARGS__ /* Only one used in this phase */
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, _fields) \
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, _fields, _code_post) \
|
||||
static const struct lttng_event_field __event_fields___##_name[] = { \
|
||||
_fields \
|
||||
};
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code, _fields) \
|
||||
- LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, PARAMS(_fields))
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \
|
||||
+ LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, PARAMS(_fields), _code_post)
|
||||
|
||||
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
|
||||
|
||||
@@ -326,11 +328,11 @@ void __event_template_proto___##_name(void);
|
||||
#define TP_PROTO(...) __VA_ARGS__
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code, _fields) \
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \
|
||||
static void __event_probe__##_name(void *__data, _proto);
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, _fields) \
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, _fields, _code_post) \
|
||||
static void __event_probe__##_name(void *__data);
|
||||
|
||||
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
|
||||
@@ -399,7 +401,7 @@ static void __event_probe__##_name(void *__data);
|
||||
#define TP_locvar(...) __VA_ARGS__
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code, _fields) \
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \
|
||||
static inline size_t __event_get_size__##_name(size_t *__dynamic_len, \
|
||||
void *__tp_locvar, _proto) \
|
||||
{ \
|
||||
@@ -412,7 +414,7 @@ static inline size_t __event_get_size__##_name(size_t *__dynamic_len, \
|
||||
}
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, _fields) \
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, _fields, _code_post) \
|
||||
static inline size_t __event_get_size__##_name(size_t *__dynamic_len, \
|
||||
void *__tp_locvar) \
|
||||
{ \
|
||||
@@ -575,7 +577,7 @@ static inline size_t __event_get_size__##_name(size_t *__dynamic_len, \
|
||||
#define TP_locvar(...) __VA_ARGS__
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, _fields) \
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, _fields, _code_post) \
|
||||
static inline \
|
||||
void __event_prepare_filter_stack__##_name(char *__stack_data, \
|
||||
void *__tp_locvar) \
|
||||
@@ -586,7 +588,7 @@ void __event_prepare_filter_stack__##_name(char *__stack_data, \
|
||||
}
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code, _fields) \
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \
|
||||
static inline \
|
||||
void __event_prepare_filter_stack__##_name(char *__stack_data, \
|
||||
void *__tp_locvar, _proto) \
|
||||
@@ -646,7 +648,7 @@ void __event_prepare_filter_stack__##_name(char *__stack_data, \
|
||||
#define TP_locvar(...) __VA_ARGS__
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code, _fields) \
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \
|
||||
static inline size_t __event_get_align__##_name(void *__tp_locvar, _proto) \
|
||||
{ \
|
||||
size_t __event_align = 1; \
|
||||
@@ -657,7 +659,7 @@ static inline size_t __event_get_align__##_name(void *__tp_locvar, _proto) \
|
||||
}
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, _fields) \
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, _fields, _code_post) \
|
||||
static inline size_t __event_get_align__##_name(void *__tp_locvar) \
|
||||
{ \
|
||||
size_t __event_align = 1; \
|
||||
@@ -871,8 +873,11 @@ static inline size_t __event_get_align__##_name(void *__tp_locvar) \
|
||||
#undef TP_locvar
|
||||
#define TP_locvar(...) __VA_ARGS__
|
||||
|
||||
-#undef TP_code
|
||||
-#define TP_code(...) __VA_ARGS__
|
||||
+#undef TP_code_pre
|
||||
+#define TP_code_pre(...) __VA_ARGS__
|
||||
+
|
||||
+#undef TP_code_post
|
||||
+#define TP_code_post(...) __VA_ARGS__
|
||||
|
||||
/*
|
||||
* For state dump, check that "session" argument (mandatory) matches the
|
||||
@@ -893,7 +898,7 @@ static inline size_t __event_get_align__##_name(void *__tp_locvar) \
|
||||
* Perform UNION (||) of filter runtime list.
|
||||
*/
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code, _fields) \
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \
|
||||
static void __event_probe__##_name(void *__data, _proto) \
|
||||
{ \
|
||||
struct probe_local_vars { _locvar }; \
|
||||
@@ -924,7 +929,7 @@ static void __event_probe__##_name(void *__data, _proto) \
|
||||
__lpf = lttng_rcu_dereference(__session->pid_tracker); \
|
||||
if (__lpf && likely(!lttng_pid_tracker_lookup(__lpf, current->pid))) \
|
||||
return; \
|
||||
- _code \
|
||||
+ _code_pre \
|
||||
if (unlikely(!list_empty(&__event->bytecode_runtime_head))) { \
|
||||
struct lttng_bytecode_runtime *bc_runtime; \
|
||||
int __filter_record = __event->has_enablers_without_bytecode; \
|
||||
@@ -937,7 +942,7 @@ static void __event_probe__##_name(void *__data, _proto) \
|
||||
__filter_record = 1; \
|
||||
} \
|
||||
if (likely(!__filter_record)) \
|
||||
- return; \
|
||||
+ goto __post; \
|
||||
} \
|
||||
__event_len = __event_get_size__##_name(__stackvar.__dynamic_len, \
|
||||
tp_locvar, _args); \
|
||||
@@ -946,13 +951,16 @@ static void __event_probe__##_name(void *__data, _proto) \
|
||||
__event_align, -1); \
|
||||
__ret = __chan->ops->event_reserve(&__ctx, __event->id); \
|
||||
if (__ret < 0) \
|
||||
- return; \
|
||||
+ goto __post; \
|
||||
_fields \
|
||||
__chan->ops->event_commit(&__ctx); \
|
||||
+__post: \
|
||||
+ _code_post \
|
||||
+ return; \
|
||||
}
|
||||
|
||||
#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, _fields) \
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, _fields, _code_post) \
|
||||
static void __event_probe__##_name(void *__data) \
|
||||
{ \
|
||||
struct probe_local_vars { _locvar }; \
|
||||
@@ -983,7 +991,7 @@ static void __event_probe__##_name(void *__data) \
|
||||
__lpf = lttng_rcu_dereference(__session->pid_tracker); \
|
||||
if (__lpf && likely(!lttng_pid_tracker_lookup(__lpf, current->pid))) \
|
||||
return; \
|
||||
- _code \
|
||||
+ _code_pre \
|
||||
if (unlikely(!list_empty(&__event->bytecode_runtime_head))) { \
|
||||
struct lttng_bytecode_runtime *bc_runtime; \
|
||||
int __filter_record = __event->has_enablers_without_bytecode; \
|
||||
@@ -996,7 +1004,7 @@ static void __event_probe__##_name(void *__data) \
|
||||
__filter_record = 1; \
|
||||
} \
|
||||
if (likely(!__filter_record)) \
|
||||
- return; \
|
||||
+ goto __post; \
|
||||
} \
|
||||
__event_len = __event_get_size__##_name(__stackvar.__dynamic_len, tp_locvar); \
|
||||
__event_align = __event_get_align__##_name(tp_locvar); \
|
||||
@@ -1004,9 +1012,12 @@ static void __event_probe__##_name(void *__data) \
|
||||
__event_align, -1); \
|
||||
__ret = __chan->ops->event_reserve(&__ctx, __event->id); \
|
||||
if (__ret < 0) \
|
||||
- return; \
|
||||
+ goto __post; \
|
||||
_fields \
|
||||
__chan->ops->event_commit(&__ctx); \
|
||||
+__post: \
|
||||
+ _code_post \
|
||||
+ return; \
|
||||
}
|
||||
|
||||
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
|
||||
diff --git a/probes/lttng-tracepoint-event.h b/probes/lttng-tracepoint-event.h
|
||||
index 39c0f37..fc3417c 100644
|
||||
--- a/probes/lttng-tracepoint-event.h
|
||||
+++ b/probes/lttng-tracepoint-event.h
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
#define LTTNG_TRACEPOINT_EVENT(name, proto, args, fields) \
|
||||
_LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CODE(name, proto, args, _locvar, _code, fields) \
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CODE(name, proto, args, _locvar, _code_pre, fields, _code_post) \
|
||||
_LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CODE_MAP(name, map, proto, args, _locvar, _code, fields) \
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CODE_MAP(name, map, proto, args, _locvar, _code_pre, fields, _code_post) \
|
||||
_LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
|
||||
#define LTTNG_TRACEPOINT_EVENT_MAP(name, map, proto, args, fields) \
|
||||
_LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
|
||||
@@ -47,8 +47,8 @@
|
||||
_LTTNG_INSTRUMENTATION(DECLARE_TRACE_NOARGS(name))
|
||||
|
||||
#define LTTNG_TRACEPOINT_EVENT_CLASS(name, proto, args, fields)
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code, _fields)
|
||||
-#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, _fields)
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post)
|
||||
+#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, _fields, _code_post)
|
||||
|
||||
#define LTTNG_TRACEPOINT_EVENT_INSTANCE(template, name, proto, args) \
|
||||
_LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)))
|
@@ -1,279 +0,0 @@
|
||||
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
Date: Tue Aug 30 16:59:13 2016 -0400
|
||||
Subject: update block instrumentation to compile on 4.8 kernels
|
||||
Git-commit: e6d2cc09300c7e46f6ea66259cbbec92138379e1
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
|
||||
[suse: adjust version check for SUSE]
|
||||
|
||||
Fix: update block instrumentation to compile on 4.8 kernels
|
||||
|
||||
These 2 upstream Linux commits break the block instrumentation in lttng
|
||||
modules master:
|
||||
|
||||
https://github.com/torvalds/linux/commit/4e1b2d52a80d79296a5d899d73249748dea71a53
|
||||
|
||||
https://github.com/torvalds/linux/commit/288dab8a35a0bde426a09870943c8d3ee3a50dab
|
||||
|
||||
The errors are :
|
||||
|
||||
lttng-modules/probes/../instrumentation/events/lttng-module/block.h:35:13:
|
||||
error: ‘REQ_DISCARD’ undeclared (first use in this function)
|
||||
|
||||
lttng-modules/probes/../instrumentation/events/lttng-module/block.h:41:14:
|
||||
error: ‘REQ_SECURE’ undeclared (first use in this function)
|
||||
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
|
||||
diff --git a/instrumentation/events/lttng-module/block.h b/instrumentation/events/lttng-module/block.h
|
||||
index 75cb11b..4373edf 100644
|
||||
--- a/instrumentation/events/lttng-module/block.h
|
||||
+++ b/instrumentation/events/lttng-module/block.h
|
||||
@@ -24,13 +24,40 @@ enum {
|
||||
RWBS_FLAG_SECURE = (1 << 7),
|
||||
RWBS_FLAG_FLUSH = (1 << 8),
|
||||
RWBS_FLAG_FUA = (1 << 9),
|
||||
+ RWBS_FLAG_PREFLUSH = (1 << 10),
|
||||
};
|
||||
|
||||
#endif /* _TRACE_BLOCK_DEF_ */
|
||||
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
|
||||
+#if (defined(CONFIG_SUSE_KERNEL) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
|
||||
+
|
||||
+#define lttng_req_op(rq) req_op(rq)
|
||||
+#define lttng_req_rw(rq) ((rq)->cmd_flags)
|
||||
+#define lttng_bio_op(bio) bio_op(bio)
|
||||
+#define lttng_bio_rw(bio) ((bio)->bi_opf)
|
||||
+
|
||||
+#define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \
|
||||
+ ctf_integer(type, rwbs, \
|
||||
+ (((op) == REQ_OP_WRITE || (op) == REQ_OP_WRITE_SAME) ? RWBS_FLAG_WRITE : \
|
||||
+ ( (op) == REQ_OP_DISCARD ? RWBS_FLAG_DISCARD : \
|
||||
+ ( (op) == REQ_OP_SECURE_ERASE ? (RWBS_FLAG_DISCARD | RWBS_FLAG_SECURE) : \
|
||||
+ ( (op) == REQ_OP_FLUSH ? RWBS_FLAG_FLUSH : \
|
||||
+ ( (op) == REQ_OP_READ ? RWBS_FLAG_READ : \
|
||||
+ ( 0 )))))) \
|
||||
+ | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0) \
|
||||
+ | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0) \
|
||||
+ | ((rw) & REQ_META ? RWBS_FLAG_META : 0) \
|
||||
+ | ((rw) & REQ_PREFLUSH ? RWBS_FLAG_PREFLUSH : 0) \
|
||||
+ | ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0))
|
||||
+
|
||||
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
|
||||
|
||||
-#define blk_rwbs_ctf_integer(type, rwbs, rw, bytes) \
|
||||
+#define lttng_req_op(rq)
|
||||
+#define lttng_req_rw(rq) ((rq)->cmd_flags)
|
||||
+#define lttng_bio_op(bio)
|
||||
+#define lttng_bio_rw(bio) ((bio)->bi_rw)
|
||||
+
|
||||
+#define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \
|
||||
ctf_integer(type, rwbs, ((rw) & WRITE ? RWBS_FLAG_WRITE : \
|
||||
( (rw) & REQ_DISCARD ? RWBS_FLAG_DISCARD : \
|
||||
( (bytes) ? RWBS_FLAG_READ : \
|
||||
@@ -44,7 +71,12 @@ enum {
|
||||
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
|
||||
|
||||
-#define blk_rwbs_ctf_integer(type, rwbs, rw, bytes) \
|
||||
+#define lttng_req_op(rq)
|
||||
+#define lttng_req_rw(rq) ((rq)->cmd_flags)
|
||||
+#define lttng_bio_op(bio)
|
||||
+#define lttng_bio_rw(bio) ((bio)->bi_rw)
|
||||
+
|
||||
+#define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \
|
||||
ctf_integer(type, rwbs, ((rw) & WRITE ? RWBS_FLAG_WRITE : \
|
||||
( (rw) & REQ_DISCARD ? RWBS_FLAG_DISCARD : \
|
||||
( (bytes) ? RWBS_FLAG_READ : \
|
||||
@@ -56,7 +88,12 @@ enum {
|
||||
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
|
||||
|
||||
-#define blk_rwbs_ctf_integer(type, rwbs, rw, bytes) \
|
||||
+#define lttng_req_op(rq)
|
||||
+#define lttng_req_rw(rq) ((rq)->cmd_flags)
|
||||
+#define lttng_bio_op(bio)
|
||||
+#define lttng_bio_rw(bio) ((bio)->bi_rw)
|
||||
+
|
||||
+#define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \
|
||||
ctf_integer(type, rwbs, ((rw) & WRITE ? RWBS_FLAG_WRITE : \
|
||||
( (rw) & REQ_DISCARD ? RWBS_FLAG_DISCARD : \
|
||||
( (bytes) ? RWBS_FLAG_READ : \
|
||||
@@ -69,7 +106,12 @@ enum {
|
||||
|
||||
#else
|
||||
|
||||
-#define blk_rwbs_ctf_integer(type, rwbs, rw, bytes) \
|
||||
+#define lttng_req_op(rq)
|
||||
+#define lttng_req_rw(rq) ((rq)->cmd_flags)
|
||||
+#define lttng_bio_op(bio)
|
||||
+#define lttng_bio_rw(bio) ((bio)->bi_rw)
|
||||
+
|
||||
+#define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \
|
||||
ctf_integer(type, rwbs, ((rw) & WRITE ? RWBS_FLAG_WRITE : \
|
||||
( (rw) & (1 << BIO_RW_DISCARD) ? RWBS_FLAG_DISCARD : \
|
||||
( (bytes) ? RWBS_FLAG_READ : \
|
||||
@@ -156,7 +198,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq_with_error,
|
||||
ctf_integer(unsigned int, nr_sector, tp_locvar->nr_sector)
|
||||
ctf_integer(int, errors, rq->errors)
|
||||
blk_rwbs_ctf_integer(unsigned int, rwbs,
|
||||
- rq->cmd_flags, blk_rq_bytes(rq))
|
||||
+ lttng_req_op(rq), lttng_req_rw(rq), blk_rq_bytes(rq))
|
||||
ctf_sequence_hex(unsigned char, cmd,
|
||||
tp_locvar->cmd, size_t, tp_locvar->cmd_len)
|
||||
),
|
||||
@@ -246,7 +288,7 @@ LTTNG_TRACEPOINT_EVENT_CODE(block_rq_complete,
|
||||
ctf_integer(unsigned int, nr_sector, nr_bytes >> 9)
|
||||
ctf_integer(int, errors, rq->errors)
|
||||
blk_rwbs_ctf_integer(unsigned int, rwbs,
|
||||
- rq->cmd_flags, nr_bytes)
|
||||
+ lttng_req_op(rq), lttng_req_rw(rq), nr_bytes)
|
||||
ctf_sequence_hex(unsigned char, cmd,
|
||||
tp_locvar->cmd, size_t, tp_locvar->cmd_len)
|
||||
),
|
||||
@@ -314,7 +356,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq,
|
||||
ctf_integer(unsigned int, bytes, tp_locvar->bytes)
|
||||
ctf_integer(pid_t, tid, current->pid)
|
||||
blk_rwbs_ctf_integer(unsigned int, rwbs,
|
||||
- rq->cmd_flags, blk_rq_bytes(rq))
|
||||
+ lttng_req_op(rq), lttng_req_rw(rq), blk_rq_bytes(rq))
|
||||
ctf_sequence_hex(unsigned char, cmd,
|
||||
tp_locvar->cmd, size_t, tp_locvar->cmd_len)
|
||||
ctf_array_text(char, comm, current->comm, TASK_COMM_LEN)
|
||||
@@ -378,12 +420,14 @@ LTTNG_TRACEPOINT_EVENT(block_bio_bounce,
|
||||
ctf_integer(sector_t, sector, bio->bi_iter.bi_sector)
|
||||
ctf_integer(unsigned int, nr_sector, bio_sectors(bio))
|
||||
blk_rwbs_ctf_integer(unsigned int, rwbs,
|
||||
- bio->bi_rw, bio->bi_iter.bi_size)
|
||||
+ lttng_bio_op(bio), lttng_bio_rw(bio),
|
||||
+ bio->bi_iter.bi_size)
|
||||
#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
|
||||
ctf_integer(sector_t, sector, bio->bi_sector)
|
||||
ctf_integer(unsigned int, nr_sector, bio->bi_size >> 9)
|
||||
blk_rwbs_ctf_integer(unsigned int, rwbs,
|
||||
- bio->bi_rw, bio->bi_size)
|
||||
+ lttng_bio_op(bio), lttng_bio_rw(bio),
|
||||
+ bio->bi_size)
|
||||
#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
|
||||
ctf_integer(pid_t, tid, current->pid)
|
||||
ctf_array_text(char, comm, current->comm, TASK_COMM_LEN)
|
||||
@@ -418,7 +462,8 @@ LTTNG_TRACEPOINT_EVENT(block_bio_complete,
|
||||
ctf_integer(unsigned int, nr_sector, bio_sectors(bio))
|
||||
ctf_integer(int, error, error)
|
||||
blk_rwbs_ctf_integer(unsigned int, rwbs,
|
||||
- bio->bi_rw, bio->bi_iter.bi_size)
|
||||
+ lttng_bio_op(bio), lttng_bio_rw(bio),
|
||||
+ bio->bi_iter.bi_size)
|
||||
#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
|
||||
ctf_integer(sector_t, sector, bio->bi_sector)
|
||||
ctf_integer(unsigned int, nr_sector, bio->bi_size >> 9)
|
||||
@@ -428,7 +473,7 @@ LTTNG_TRACEPOINT_EVENT(block_bio_complete,
|
||||
ctf_integer(int, error, 0)
|
||||
#endif
|
||||
blk_rwbs_ctf_integer(unsigned int, rwbs,
|
||||
- bio->bi_rw, bio->bi_size)
|
||||
+ lttng_bio_op(bio), lttng_bio_rw(bio), bio->bi_size)
|
||||
#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
|
||||
)
|
||||
)
|
||||
@@ -446,12 +491,13 @@ LTTNG_TRACEPOINT_EVENT_CLASS(block_bio_merge,
|
||||
ctf_integer(sector_t, sector, bio->bi_iter.bi_sector)
|
||||
ctf_integer(unsigned int, nr_sector, bio_sectors(bio))
|
||||
blk_rwbs_ctf_integer(unsigned int, rwbs,
|
||||
- bio->bi_rw, bio->bi_iter.bi_size)
|
||||
+ lttng_bio_op(bio), lttng_bio_rw(bio),
|
||||
+ bio->bi_iter.bi_size)
|
||||
#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
|
||||
ctf_integer(sector_t, sector, bio->bi_sector)
|
||||
ctf_integer(unsigned int, nr_sector, bio->bi_size >> 9)
|
||||
blk_rwbs_ctf_integer(unsigned int, rwbs,
|
||||
- bio->bi_rw, bio->bi_size)
|
||||
+ lttng_bio_op(bio), lttng_bio_rw(bio), bio->bi_size)
|
||||
#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
|
||||
ctf_integer(pid_t, tid, current->pid)
|
||||
ctf_array_text(char, comm, current->comm, TASK_COMM_LEN)
|
||||
@@ -507,12 +553,13 @@ LTTNG_TRACEPOINT_EVENT(block_bio_queue,
|
||||
ctf_integer(sector_t, sector, bio->bi_iter.bi_sector)
|
||||
ctf_integer(unsigned int, nr_sector, bio_sectors(bio))
|
||||
blk_rwbs_ctf_integer(unsigned int, rwbs,
|
||||
- bio->bi_rw, bio->bi_iter.bi_size)
|
||||
+ lttng_bio_op(bio), lttng_bio_rw(bio),
|
||||
+ bio->bi_iter.bi_size)
|
||||
#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
|
||||
ctf_integer(sector_t, sector, bio->bi_sector)
|
||||
ctf_integer(unsigned int, nr_sector, bio->bi_size >> 9)
|
||||
blk_rwbs_ctf_integer(unsigned int, rwbs,
|
||||
- bio->bi_rw, bio->bi_size)
|
||||
+ lttng_bio_op(bio), lttng_bio_rw(bio), bio->bi_size)
|
||||
#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
|
||||
ctf_integer(pid_t, tid, current->pid)
|
||||
ctf_array_text(char, comm, current->comm, TASK_COMM_LEN)
|
||||
@@ -530,7 +577,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(block_bio,
|
||||
ctf_integer(sector_t, sector, bio->bi_sector)
|
||||
ctf_integer(unsigned int, nr_sector, bio->bi_size >> 9)
|
||||
blk_rwbs_ctf_integer(unsigned int, rwbs,
|
||||
- bio->bi_rw, bio->bi_size)
|
||||
+ lttng_bio_op(bio), lttng_bio_rw(bio), bio->bi_size)
|
||||
ctf_integer(pid_t, tid, current->pid)
|
||||
ctf_array_text(char, comm, current->comm, TASK_COMM_LEN)
|
||||
)
|
||||
@@ -594,14 +641,16 @@ LTTNG_TRACEPOINT_EVENT_CLASS(block_get_rq,
|
||||
ctf_integer(unsigned int, nr_sector,
|
||||
bio ? bio_sectors(bio) : 0)
|
||||
blk_rwbs_ctf_integer(unsigned int, rwbs,
|
||||
- bio ? bio->bi_rw : 0,
|
||||
+ bio ? lttng_bio_op(bio) : 0,
|
||||
+ bio ? lttng_bio_rw(bio) : 0,
|
||||
bio ? bio->bi_iter.bi_size : 0)
|
||||
#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
|
||||
ctf_integer(sector_t, sector, bio ? bio->bi_sector : 0)
|
||||
ctf_integer(unsigned int, nr_sector,
|
||||
bio ? bio->bi_size >> 9 : 0)
|
||||
blk_rwbs_ctf_integer(unsigned int, rwbs,
|
||||
- bio ? bio->bi_rw : 0,
|
||||
+ bio ? lttng_bio_op(bio) : 0,
|
||||
+ bio ? lttng_bio_rw(bio) : 0,
|
||||
bio ? bio->bi_size : 0)
|
||||
#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
|
||||
ctf_integer(pid_t, tid, current->pid)
|
||||
@@ -751,11 +800,12 @@ LTTNG_TRACEPOINT_EVENT(block_split,
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
|
||||
ctf_integer(sector_t, sector, bio->bi_iter.bi_sector)
|
||||
blk_rwbs_ctf_integer(unsigned int, rwbs,
|
||||
- bio->bi_rw, bio->bi_iter.bi_size)
|
||||
+ lttng_bio_op(bio), lttng_bio_rw(bio),
|
||||
+ bio->bi_iter.bi_size)
|
||||
#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
|
||||
ctf_integer(sector_t, sector, bio->bi_sector)
|
||||
blk_rwbs_ctf_integer(unsigned int, rwbs,
|
||||
- bio->bi_rw, bio->bi_size)
|
||||
+ lttng_bio_op(bio), lttng_bio_rw(bio), bio->bi_size)
|
||||
#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
|
||||
ctf_integer(sector_t, new_sector, new_sector)
|
||||
ctf_integer(pid_t, tid, current->pid)
|
||||
@@ -790,12 +840,13 @@ LTTNG_TRACEPOINT_EVENT(block_remap,
|
||||
ctf_integer(sector_t, sector, bio->bi_iter.bi_sector)
|
||||
ctf_integer(unsigned int, nr_sector, bio_sectors(bio))
|
||||
blk_rwbs_ctf_integer(unsigned int, rwbs,
|
||||
- bio->bi_rw, bio->bi_iter.bi_size)
|
||||
+ lttng_bio_op(bio), lttng_bio_rw(bio),
|
||||
+ bio->bi_iter.bi_size)
|
||||
#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
|
||||
ctf_integer(sector_t, sector, bio->bi_sector)
|
||||
ctf_integer(unsigned int, nr_sector, bio->bi_size >> 9)
|
||||
blk_rwbs_ctf_integer(unsigned int, rwbs,
|
||||
- bio->bi_rw, bio->bi_size)
|
||||
+ lttng_bio_op(bio), lttng_bio_rw(bio), bio->bi_size)
|
||||
#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
|
||||
ctf_integer(dev_t, old_dev, dev)
|
||||
ctf_integer(sector_t, old_sector, from)
|
||||
@@ -828,7 +879,7 @@ LTTNG_TRACEPOINT_EVENT(block_rq_remap,
|
||||
ctf_integer(dev_t, old_dev, dev)
|
||||
ctf_integer(sector_t, old_sector, from)
|
||||
blk_rwbs_ctf_integer(unsigned int, rwbs,
|
||||
- rq->cmd_flags, blk_rq_bytes(rq))
|
||||
+ lttng_req_op(rq), lttng_req_rw(rq), blk_rq_bytes(rq))
|
||||
)
|
||||
)
|
||||
#endif
|
Reference in New Issue
Block a user