From 6476a7e81eba04a729380b813d6555cdca2acb1a Mon Sep 17 00:00:00 2001 From: Marko Myllynen Date: Thu, 5 Jul 2018 08:59:35 +0300 Subject: [PATCH] pmdabcc: fix ext4dist/xfsdist for RHEL 7 kernel RHEL 7 kernel is unlike Fedora / upstream kernels, apply the corresponding change done in latest RHEL 7 bcc as well. --- src/pmdas/bcc/modules/fs/ext4dist.bpf | 1 + src/pmdas/bcc/modules/fs/ext4dist.python | 8 ++++---- src/pmdas/bcc/modules/fs/xfsdist.bpf | 1 + src/pmdas/bcc/modules/fs/xfsdist.python | 8 ++++---- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/pmdas/bcc/modules/fs/ext4dist.bpf b/src/pmdas/bcc/modules/fs/ext4dist.bpf index 4f41d62..dd57cf3 100644 --- a/src/pmdas/bcc/modules/fs/ext4dist.bpf +++ b/src/pmdas/bcc/modules/fs/ext4dist.bpf @@ -3,6 +3,7 @@ #include #include +#include #include #define OP_NAME_LEN 8 diff --git a/src/pmdas/bcc/modules/fs/ext4dist.python b/src/pmdas/bcc/modules/fs/ext4dist.python index 610abd3..961a03c 100644 --- a/src/pmdas/bcc/modules/fs/ext4dist.python +++ b/src/pmdas/bcc/modules/fs/ext4dist.python @@ -91,12 +91,12 @@ class PCPBCCModule(PCPBCCBase): self.log("\n" + bpf_text) self.bpf = BPF(text=bpf_text) - self.bpf.attach_kprobe(event="generic_file_read_iter", fn_name="trace_read_entry") - self.bpf.attach_kprobe(event="ext4_file_write_iter", fn_name="trace_entry") + self.bpf.attach_kprobe(event="generic_file_aio_read", fn_name="trace_read_entry") + self.bpf.attach_kprobe(event="ext4_file_write", fn_name="trace_entry") self.bpf.attach_kprobe(event="ext4_file_open", fn_name="trace_entry") self.bpf.attach_kprobe(event="ext4_sync_file", fn_name="trace_entry") - self.bpf.attach_kretprobe(event="generic_file_read_iter", fn_name="trace_read_return") - self.bpf.attach_kretprobe(event="ext4_file_write_iter", fn_name="trace_write_return") + self.bpf.attach_kretprobe(event="generic_file_aio_read", fn_name="trace_read_return") + self.bpf.attach_kretprobe(event="ext4_file_write", fn_name="trace_write_return") self.bpf.attach_kretprobe(event="ext4_file_open", fn_name="trace_open_return") self.bpf.attach_kretprobe(event="ext4_sync_file", fn_name="trace_fsync_return") self.log("Compiled.") diff --git a/src/pmdas/bcc/modules/fs/xfsdist.bpf b/src/pmdas/bcc/modules/fs/xfsdist.bpf index 66aeae5..4c539f9 100644 --- a/src/pmdas/bcc/modules/fs/xfsdist.bpf +++ b/src/pmdas/bcc/modules/fs/xfsdist.bpf @@ -3,6 +3,7 @@ #include #include +#include #include #define OP_NAME_LEN 8 diff --git a/src/pmdas/bcc/modules/fs/xfsdist.python b/src/pmdas/bcc/modules/fs/xfsdist.python index a1ebc62..d460983 100644 --- a/src/pmdas/bcc/modules/fs/xfsdist.python +++ b/src/pmdas/bcc/modules/fs/xfsdist.python @@ -73,12 +73,12 @@ class PCPBCCModule(PCPBCCBase): self.log("\n" + bpf_text) self.bpf = BPF(text=bpf_text) - self.bpf.attach_kprobe(event="xfs_file_read_iter", fn_name="trace_entry") - self.bpf.attach_kprobe(event="xfs_file_write_iter", fn_name="trace_entry") + self.bpf.attach_kprobe(event="xfs_file_aio_read", fn_name="trace_entry") + self.bpf.attach_kprobe(event="xfs_file_aio_write", fn_name="trace_entry") self.bpf.attach_kprobe(event="xfs_file_open", fn_name="trace_entry") self.bpf.attach_kprobe(event="xfs_file_fsync", fn_name="trace_entry") - self.bpf.attach_kretprobe(event="xfs_file_read_iter", fn_name="trace_read_return") - self.bpf.attach_kretprobe(event="xfs_file_write_iter", fn_name="trace_write_return") + self.bpf.attach_kretprobe(event="xfs_file_aio_read", fn_name="trace_read_return") + self.bpf.attach_kretprobe(event="xfs_file_aio_write", fn_name="trace_write_return") self.bpf.attach_kretprobe(event="xfs_file_open", fn_name="trace_open_return") self.bpf.attach_kretprobe(event="xfs_file_fsync", fn_name="trace_fsync_return") self.log("Compiled.") -- 1.8.3.1