From: Michael Jeanson Date: Fri, 18 Nov 2022 22:38:49 +0000 (-0500) Subject: Drop support for kernels < 4.4 from ext3 and kvm probes X-Git-Url: http://git.liburcu.org/?p=lttng-modules.git;a=commitdiff_plain;h=6687229729b31254fa5774f39ee2d768618b3172 Drop support for kernels < 4.4 from ext3 and kvm probes This effectively removes the ext3 probe. Change-Id: I77480103b4ef1f8d29e792a4f2d27e162d1fa94d Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/include/instrumentation/events/ext3.h b/include/instrumentation/events/ext3.h deleted file mode 100644 index cb1f6884..00000000 --- a/include/instrumentation/events/ext3.h +++ /dev/null @@ -1,522 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM ext3 - -#if !defined(LTTNG_TRACE_EXT3_H) || defined(TRACE_HEADER_MULTI_READ) -#define LTTNG_TRACE_EXT3_H - -#include -#include - -LTTNG_TRACEPOINT_EVENT(ext3_free_inode, - TP_PROTO(struct inode *inode), - - TP_ARGS(inode), - - TP_FIELDS( - ctf_integer(dev_t, dev, inode->i_sb->s_dev) - ctf_integer(ino_t, ino, inode->i_ino) - ctf_integer(umode_t, mode, inode->i_mode) -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,5,0)) - ctf_integer(uid_t, uid, i_uid_read(inode)) - ctf_integer(gid_t, gid, i_gid_read(inode)) -#else - ctf_integer(uid_t, uid, inode->i_uid) - ctf_integer(gid_t, gid, inode->i_gid) -#endif - ctf_integer(blkcnt_t, blocks, inode->i_blocks) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_request_inode, - TP_PROTO(struct inode *dir, int mode), - - TP_ARGS(dir, mode), - - TP_FIELDS( - ctf_integer(dev_t, dev, dir->i_sb->s_dev) - ctf_integer(ino_t, dir, dir->i_ino) - ctf_integer(umode_t, mode, mode) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_allocate_inode, - TP_PROTO(struct inode *inode, struct inode *dir, int mode), - - TP_ARGS(inode, dir, mode), - - TP_FIELDS( - ctf_integer(dev_t, dev, inode->i_sb->s_dev) - ctf_integer(ino_t, ino, inode->i_ino) - ctf_integer(ino_t, dir, dir->i_ino) - ctf_integer(umode_t, mode, mode) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_evict_inode, - TP_PROTO(struct inode *inode), - - TP_ARGS(inode), - - TP_FIELDS( - ctf_integer(dev_t, dev, inode->i_sb->s_dev) - ctf_integer(ino_t, ino, inode->i_ino) - ctf_integer(int, nlink, inode->i_nlink) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_drop_inode, - TP_PROTO(struct inode *inode, int drop), - - TP_ARGS(inode, drop), - - TP_FIELDS( - ctf_integer(dev_t, dev, inode->i_sb->s_dev) - ctf_integer(ino_t, ino, inode->i_ino) - ctf_integer(int, drop, drop) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_mark_inode_dirty, - TP_PROTO(struct inode *inode, unsigned long IP), - - TP_ARGS(inode, IP), - - TP_FIELDS( - ctf_integer(dev_t, dev, inode->i_sb->s_dev) - ctf_integer(ino_t, ino, inode->i_ino) - ctf_integer_hex(unsigned long, ip, IP) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_write_begin, - TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, - unsigned int flags), - - TP_ARGS(inode, pos, len, flags), - - TP_FIELDS( - ctf_integer(dev_t, dev, inode->i_sb->s_dev) - ctf_integer(ino_t, ino, inode->i_ino) - ctf_integer(loff_t, pos, pos) - ctf_integer(unsigned int, len, len) - ctf_integer(unsigned int, flags, flags) - ) -) - -LTTNG_TRACEPOINT_EVENT_CLASS(ext3__write_end, - TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, - unsigned int copied), - - TP_ARGS(inode, pos, len, copied), - - TP_FIELDS( - ctf_integer(dev_t, dev, inode->i_sb->s_dev) - ctf_integer(ino_t, ino, inode->i_ino) - ctf_integer(loff_t, pos, pos) - ctf_integer(unsigned int, len, len) - ctf_integer(unsigned int, copied, copied) - ) -) - -LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__write_end, ext3_ordered_write_end, - - TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, - unsigned int copied), - - TP_ARGS(inode, pos, len, copied) -) - -LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__write_end, ext3_writeback_write_end, - - TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, - unsigned int copied), - - TP_ARGS(inode, pos, len, copied) -) - -LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__write_end, ext3_journalled_write_end, - - TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, - unsigned int copied), - - TP_ARGS(inode, pos, len, copied) -) - -LTTNG_TRACEPOINT_EVENT_CLASS(ext3__page_op, - TP_PROTO(struct page *page), - - TP_ARGS(page), - - TP_FIELDS( - ctf_integer(dev_t, dev, page->mapping->host->i_sb->s_dev) - ctf_integer(ino_t, ino, page->mapping->host->i_ino) - ctf_integer(pgoff_t, index, page->index) - ) -) - -LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op, ext3_ordered_writepage, - - TP_PROTO(struct page *page), - - TP_ARGS(page) -) - -LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op, ext3_writeback_writepage, - - TP_PROTO(struct page *page), - - TP_ARGS(page) -) - -LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op, ext3_journalled_writepage, - - TP_PROTO(struct page *page), - - TP_ARGS(page) -) - -LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op, ext3_readpage, - - TP_PROTO(struct page *page), - - TP_ARGS(page) -) - -LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op, ext3_releasepage, - - TP_PROTO(struct page *page), - - TP_ARGS(page) -) - -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0)) - -LTTNG_TRACEPOINT_EVENT(ext3_invalidatepage, - TP_PROTO(struct page *page, unsigned int offset, unsigned int length), - - TP_ARGS(page, offset, length), - - TP_FIELDS( - ctf_integer(pgoff_t, index, page->index) - ctf_integer(unsigned int, offset, offset) - ctf_integer(unsigned int, length, length) - ctf_integer(ino_t, ino, page->mapping->host->i_ino) - ctf_integer(dev_t, dev, page->mapping->host->i_sb->s_dev) - ) -) - -#else - -LTTNG_TRACEPOINT_EVENT(ext3_invalidatepage, - TP_PROTO(struct page *page, unsigned long offset), - - TP_ARGS(page, offset), - - TP_FIELDS( - ctf_integer(pgoff_t, index, page->index) - ctf_integer(unsigned long, offset, offset) - ctf_integer(ino_t, ino, page->mapping->host->i_ino) - ctf_integer(dev_t, dev, page->mapping->host->i_sb->s_dev) - ) -) - -#endif - -LTTNG_TRACEPOINT_EVENT(ext3_discard_blocks, - TP_PROTO(struct super_block *sb, unsigned long blk, - unsigned long count), - - TP_ARGS(sb, blk, count), - - TP_FIELDS( - ctf_integer(dev_t, dev, sb->s_dev) - ctf_integer(unsigned long, blk, blk) - ctf_integer(unsigned long, count, count) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_request_blocks, - TP_PROTO(struct inode *inode, unsigned long goal, - unsigned long count), - - TP_ARGS(inode, goal, count), - - TP_FIELDS( - ctf_integer(dev_t, dev, inode->i_sb->s_dev) - ctf_integer(ino_t, ino, inode->i_ino) - ctf_integer(unsigned long, count, count) - ctf_integer(unsigned long, goal, goal) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_allocate_blocks, - TP_PROTO(struct inode *inode, unsigned long goal, - unsigned long count, unsigned long block), - - TP_ARGS(inode, goal, count, block), - - TP_FIELDS( - ctf_integer(dev_t, dev, inode->i_sb->s_dev) - ctf_integer(ino_t, ino, inode->i_ino) - ctf_integer(unsigned long, block, block) - ctf_integer(unsigned long, count, count) - ctf_integer(unsigned long, goal, goal) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_free_blocks, - TP_PROTO(struct inode *inode, unsigned long block, - unsigned long count), - - TP_ARGS(inode, block, count), - - TP_FIELDS( - ctf_integer(dev_t, dev, inode->i_sb->s_dev) - ctf_integer(ino_t, ino, inode->i_ino) - ctf_integer(umode_t, mode, inode->i_mode) - ctf_integer(unsigned long, block, block) - ctf_integer(unsigned long, count, count) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_sync_file_enter, - TP_PROTO(struct file *file, int datasync), - - TP_ARGS(file, datasync), - - TP_FIELDS( - ctf_integer(dev_t, dev, file->f_path.dentry->d_inode->i_sb->s_dev) - ctf_integer(ino_t, ino, file->f_path.dentry->d_inode->i_ino) - ctf_integer(ino_t, parent, file->f_path.dentry->d_parent->d_inode->i_ino) - ctf_integer(int, datasync, datasync) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_sync_file_exit, - TP_PROTO(struct inode *inode, int ret), - - TP_ARGS(inode, ret), - - TP_FIELDS( - ctf_integer(dev_t, dev, inode->i_sb->s_dev) - ctf_integer(ino_t, ino, inode->i_ino) - ctf_integer(int, ret, ret) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_sync_fs, - TP_PROTO(struct super_block *sb, int wait), - - TP_ARGS(sb, wait), - - TP_FIELDS( - ctf_integer(dev_t, dev, sb->s_dev) - ctf_integer(int, wait, wait) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_rsv_window_add, - TP_PROTO(struct super_block *sb, - struct ext3_reserve_window_node *rsv_node), - - TP_ARGS(sb, rsv_node), - - TP_FIELDS( - ctf_integer(unsigned long, start, rsv_node->rsv_window._rsv_start) - ctf_integer(unsigned long, end, rsv_node->rsv_window._rsv_end) - ctf_integer(dev_t, dev, sb->s_dev) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_discard_reservation, - TP_PROTO(struct inode *inode, - struct ext3_reserve_window_node *rsv_node), - - TP_ARGS(inode, rsv_node), - - TP_FIELDS( - ctf_integer(unsigned long, start, rsv_node->rsv_window._rsv_start) - ctf_integer(unsigned long, end, rsv_node->rsv_window._rsv_end) - ctf_integer(ino_t, ino, inode->i_ino) - ctf_integer(dev_t, dev, inode->i_sb->s_dev) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_alloc_new_reservation, - TP_PROTO(struct super_block *sb, unsigned long goal), - - TP_ARGS(sb, goal), - - TP_FIELDS( - ctf_integer(dev_t, dev, sb->s_dev) - ctf_integer(unsigned long, goal, goal) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_reserved, - TP_PROTO(struct super_block *sb, unsigned long block, - struct ext3_reserve_window_node *rsv_node), - - TP_ARGS(sb, block, rsv_node), - - TP_FIELDS( - ctf_integer(unsigned long, block, block) - ctf_integer(unsigned long, start, rsv_node->rsv_window._rsv_start) - ctf_integer(unsigned long, end, rsv_node->rsv_window._rsv_end) - ctf_integer(dev_t, dev, sb->s_dev) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_forget, - TP_PROTO(struct inode *inode, int is_metadata, unsigned long block), - - TP_ARGS(inode, is_metadata, block), - - TP_FIELDS( - ctf_integer(dev_t, dev, inode->i_sb->s_dev) - ctf_integer(ino_t, ino, inode->i_ino) - ctf_integer(umode_t, mode, inode->i_mode) - ctf_integer(int, is_metadata, is_metadata) - ctf_integer(unsigned long, block, block) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_read_block_bitmap, - TP_PROTO(struct super_block *sb, unsigned int group), - - TP_ARGS(sb, group), - - TP_FIELDS( - ctf_integer(dev_t, dev, sb->s_dev) - ctf_integer(__u32, group, group) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_direct_IO_enter, - TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw), - - TP_ARGS(inode, offset, len, rw), - - TP_FIELDS( - ctf_integer(dev_t, dev, inode->i_sb->s_dev) - ctf_integer(ino_t, ino, inode->i_ino) - ctf_integer(loff_t, pos, offset) - ctf_integer(unsigned long, len, len) - ctf_integer(int, rw, rw) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_direct_IO_exit, - TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, - int rw, int ret), - - TP_ARGS(inode, offset, len, rw, ret), - - TP_FIELDS( - ctf_integer(dev_t, dev, inode->i_sb->s_dev) - ctf_integer(ino_t, ino, inode->i_ino) - ctf_integer(loff_t, pos, offset) - ctf_integer(unsigned long, len, len) - ctf_integer(int, rw, rw) - ctf_integer(int, ret, ret) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_unlink_enter, - TP_PROTO(struct inode *parent, struct dentry *dentry), - - TP_ARGS(parent, dentry), - - TP_FIELDS( - ctf_integer(ino_t, parent, parent->i_ino) - ctf_integer(ino_t, ino, dentry->d_inode->i_ino) - ctf_integer(loff_t, size, dentry->d_inode->i_size) - ctf_integer(dev_t, dev, dentry->d_inode->i_sb->s_dev) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_unlink_exit, - TP_PROTO(struct dentry *dentry, int ret), - - TP_ARGS(dentry, ret), - - TP_FIELDS( - ctf_integer(dev_t, dev, dentry->d_inode->i_sb->s_dev) - ctf_integer(ino_t, ino, dentry->d_inode->i_ino) - ctf_integer(int, ret, ret) - ) -) - -LTTNG_TRACEPOINT_EVENT_CLASS(ext3__truncate, - TP_PROTO(struct inode *inode), - - TP_ARGS(inode), - - TP_FIELDS( - ctf_integer(dev_t, dev, inode->i_sb->s_dev) - ctf_integer(ino_t, ino, inode->i_ino) - ctf_integer(blkcnt_t, blocks, inode->i_blocks) - ) -) - -LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__truncate, ext3_truncate_enter, - - TP_PROTO(struct inode *inode), - - TP_ARGS(inode) -) - -LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__truncate, ext3_truncate_exit, - - TP_PROTO(struct inode *inode), - - TP_ARGS(inode) -) - -LTTNG_TRACEPOINT_EVENT(ext3_get_blocks_enter, - TP_PROTO(struct inode *inode, unsigned long lblk, - unsigned long len, int create), - - TP_ARGS(inode, lblk, len, create), - - TP_FIELDS( - ctf_integer(dev_t, dev, inode->i_sb->s_dev) - ctf_integer(ino_t, ino, inode->i_ino) - ctf_integer(unsigned long, lblk, lblk) - ctf_integer(unsigned long, len, len) - ctf_integer(int, create, create) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_get_blocks_exit, - TP_PROTO(struct inode *inode, unsigned long lblk, - unsigned long pblk, unsigned long len, int ret), - - TP_ARGS(inode, lblk, pblk, len, ret), - - TP_FIELDS( - ctf_integer(dev_t, dev, inode->i_sb->s_dev) - ctf_integer(ino_t, ino, inode->i_ino) - ctf_integer(unsigned long, lblk, lblk) - ctf_integer(unsigned long, pblk, pblk) - ctf_integer(unsigned long, len, len) - ctf_integer(int, ret, ret) - ) -) - -LTTNG_TRACEPOINT_EVENT(ext3_load_inode, - TP_PROTO(struct inode *inode), - - TP_ARGS(inode), - - TP_FIELDS( - ctf_integer(dev_t, dev, inode->i_sb->s_dev) - ctf_integer(ino_t, ino, inode->i_ino) - ) -) - -#endif /* LTTNG_TRACE_EXT3_H */ - -/* This part must be outside protection */ -#include diff --git a/src/probes/Kbuild b/src/probes/Kbuild index cce16ad4..eb0de4a8 100644 --- a/src/probes/Kbuild +++ b/src/probes/Kbuild @@ -32,10 +32,7 @@ obj-$(CONFIG_LTTNG) += lttng-probe-power.o obj-$(CONFIG_LTTNG) += lttng-probe-statedump.o ifneq ($(CONFIG_NET_9P),) - obj-$(CONFIG_LTTNG) += $(shell \ - if [ $(VERSION) -ge 4 \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 10 \) ] ; then \ - echo "lttng-probe-9p.o" ; fi;) + obj-$(CONFIG_LTTNG) += lttng-probe-9p.o endif # CONFIG_NET_9P i2c_dep = $(srctree)/include/trace/events/i2c.h @@ -50,8 +47,7 @@ ifneq ($(CONFIG_KVM),) kvm_dep_lapic = $(srctree)/arch/x86/kvm/lapic.h kvm_dep_lapic_check = $(wildcard $(kvm_dep_lapic)) ifneq ($(kvm_dep_lapic_check),) - # search for iodev.h in any of its known locations - kvm_dep_iodev = $(srctree)/virt/kvm/iodev.h $(srctree)/include/kvm/iodev.h + kvm_dep_iodev = $(srctree)/include/kvm/iodev.h kvm_dep_iodev_check = $(wildcard $(kvm_dep_iodev)) ifneq ($(kvm_dep_iodev_check),) kvm_dep_emulate = $(srctree)/arch/x86/kvm/kvm_emulate.h @@ -119,45 +115,16 @@ ifneq ($(CONFIG_NET),) obj-$(CONFIG_LTTNG) += lttng-probe-napi.o obj-$(CONFIG_LTTNG) += lttng-probe-skb.o obj-$(CONFIG_LTTNG) += lttng-probe-net.o - obj-$(CONFIG_LTTNG) += $(shell \ - if [ $(VERSION) -ge 4 \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 1 \) ] ; then \ - echo "lttng-probe-sock.o" ; fi;) - obj-$(CONFIG_LTTNG) += $(shell \ - if [ $(VERSION) -ge 4 \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 1 \) ] ; then \ - echo "lttng-probe-udp.o" ; fi;) + obj-$(CONFIG_LTTNG) += lttng-probe-sock.o + obj-$(CONFIG_LTTNG) += lttng-probe-udp.o endif # CONFIG_NET ifneq ($(CONFIG_SND_SOC),) obj-$(CONFIG_LTTNG) += lttng-probe-asoc.o endif # CONFIG_SND_SOC -ifneq ($(CONFIG_EXT3_FS),) - ext3_dep = $(srctree)/fs/ext3/*.h - ext3_dep_check = $(wildcard $(ext3_dep)) - ext3 = $(shell \ - if [ $(VERSION) -lt 4 -o \( $(VERSION) -eq 4 -a $(PATCHLEVEL) -lt 3 \) ] ; then \ - if [ $(VERSION) -ge 4 -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 1 \) ] ; then \ - if [ \( $(VERSION) -ge 4 -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 4 \) \) -a \ - -z "$(ext3_dep_check)" ] ; then \ - echo "warn" ; \ - exit ; \ - fi; \ - echo "lttng-probe-ext3.o" ; \ - fi; \ - fi;) - ifeq ($(ext3),warn) - $(warning Files $(ext3_dep) not found. Probe "ext3" is disabled. Use full kernel source tree to enable it.) - ext3 = - endif # $(ext3),warn - obj-$(CONFIG_LTTNG) += $(ext3) -endif # CONFIG_EXT3_FS - ifneq ($(CONFIG_GPIOLIB),) - obj-$(CONFIG_LTTNG) += $(shell \ - if [ $(VERSION) -ge 3 ] ; then \ - echo "lttng-probe-gpio.o" ; fi;) + obj-$(CONFIG_LTTNG) += lttng-probe-gpio.o endif # CONFIG_GPIOLIB ifneq ($(CONFIG_JBD2),) @@ -165,10 +132,7 @@ ifneq ($(CONFIG_JBD2),) endif # CONFIG_JBD2 ifneq ($(CONFIG_JBD),) - obj-$(CONFIG_LTTNG) += $(shell \ - if [ $(VERSION) -ge 4 \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 1 \) ] ; then \ - echo "lttng-probe-jbd.o" ; fi;) + obj-$(CONFIG_LTTNG) += lttng-probe-jbd.o endif # CONFIG_JBD ifneq ($(CONFIG_REGULATOR),) @@ -223,10 +187,7 @@ ifneq ($(CONFIG_EXT4_FS),) endif # $(wildcard $(ext4_dep)) endif # CONFIG_EXT4_FS -obj-$(CONFIG_LTTNG) += $(shell \ - if [ $(VERSION) -ge 4 \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 4 \) ] ; then \ - echo "lttng-probe-printk.o" ; fi;) +obj-$(CONFIG_LTTNG) += lttng-probe-printk.o ifneq ($(CONFIG_FRAME_WARN),0) CFLAGS_lttng-probe-printk.o += -Wframe-larger-than=2200 @@ -238,39 +199,27 @@ ifneq ($(wildcard $(random_dep)),) obj-$(CONFIG_LTTNG) += lttng-probe-random.o endif -obj-$(CONFIG_LTTNG) += $(shell \ - if [ $(VERSION) -ge 4 \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 2 \) ] ; then \ - echo "lttng-probe-rcu.o" ; fi;) +obj-$(CONFIG_LTTNG) += lttng-probe-rcu.o ifneq ($(CONFIG_REGMAP),) - regmap_dep_4_1 = $(srctree)/drivers/base/regmap/trace.h - ifneq ($(wildcard $(regmap_dep_4_1)),) + regmap_dep = $(srctree)/drivers/base/regmap/trace.h + ifneq ($(wildcard $(regmap_dep)),) obj-$(CONFIG_LTTNG) += lttng-probe-regmap.o else - $(warning File $(regmap_dep_4_1) not found. Probe "regmap" is disabled. Need Linux 4.1+ kernel source tree to enable it.) - endif # $(wildcard $(regmap_dep_4_1)), + $(warning File $(regmap_dep) not found. Probe "regmap" is disabled. Use full kernel source tree to enable it.) + endif # $(wildcard $(regmap_dep)), endif # CONFIG_REGMAP ifneq ($(CONFIG_PM_RUNTIME),) - obj-$(CONFIG_LTTNG) += $(shell \ - if [ $(VERSION) -ge 4 \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 2 \) ] ; then \ - echo "lttng-probe-rpm.o" ; fi;) + obj-$(CONFIG_LTTNG) += lttng-probe-rpm.o endif # CONFIG_PM_RUNTIME ifneq ($(CONFIG_SUNRPC),) - obj-$(CONFIG_LTTNG) += $(shell \ - if [ $(VERSION) -ge 4 \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 4 \) ] ; then \ - echo "lttng-probe-sunrpc.o" ; fi;) + obj-$(CONFIG_LTTNG) += lttng-probe-sunrpc.o endif # CONFIG_SUNRPC ifneq ($(CONFIG_VIDEO_V4L2),) - obj-$(CONFIG_LTTNG) += $(shell \ - if [ $(VERSION) -ge 4 \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 14 \) ] ; then \ - echo "lttng-probe-v4l2.o" ; fi;) + obj-$(CONFIG_LTTNG) += lttng-probe-v4l2.o endif # CONFIG_VIDEO_V4L2 obj-$(CONFIG_LTTNG) += lttng-probe-workqueue.o diff --git a/src/probes/lttng-probe-ext3.c b/src/probes/lttng-probe-ext3.c deleted file mode 100644 index 55a6340b..00000000 --- a/src/probes/lttng-probe-ext3.c +++ /dev/null @@ -1,44 +0,0 @@ -/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) - * - * probes/lttng-probe-ext3.c - * - * LTTng ext3 probes. - * - * Copyright (C) 2010-2012 Mathieu Desnoyers - * Copyright (C) 2012 Mentor Graphics Corp. - */ - -#include -#include -#include -#include -#include - -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0)) -#include <../fs/ext3/ext3.h> -#else -#include -#endif - -/* - * Create the tracepoint static inlines from the kernel to validate that our - * trace event macros match the kernel we run on. - */ -#include - -/* - * Create LTTng tracepoint probes. - */ -#define LTTNG_PACKAGE_BUILD -#define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH instrumentation/events - -#include - -MODULE_LICENSE("GPL and additional rights"); -MODULE_AUTHOR("Wade Farnsworth , Paul Woegerer , and Andrew Gabbasov "); -MODULE_DESCRIPTION("LTTng ext3 probes"); -MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." - __stringify(LTTNG_MODULES_MINOR_VERSION) "." - __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) - LTTNG_MODULES_EXTRAVERSION); diff --git a/src/probes/lttng-probe-kvm-x86-mmu.c b/src/probes/lttng-probe-kvm-x86-mmu.c index 37a5aed3..a77f49b5 100644 --- a/src/probes/lttng-probe-kvm-x86-mmu.c +++ b/src/probes/lttng-probe-kvm-x86-mmu.c @@ -12,11 +12,7 @@ #include #include -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,1,0)) #include -#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,1,0)) */ -#include <../../virt/kvm/iodev.h> -#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,1,0)) */ /* * Create the tracepoint static inlines from the kernel to validate that our diff --git a/src/probes/lttng-probe-kvm-x86.c b/src/probes/lttng-probe-kvm-x86.c index 05cbba58..be9e2ad0 100644 --- a/src/probes/lttng-probe-kvm-x86.c +++ b/src/probes/lttng-probe-kvm-x86.c @@ -16,11 +16,7 @@ #include #endif -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,1,0)) #include -#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,1,0)) */ -#include <../../virt/kvm/iodev.h> -#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,1,0)) */ /* * Create the tracepoint static inlines from the kernel to validate that our