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