Blob Blame History Raw
From ff22437ef4310a2ab37d732bdd1496a926315691 Mon Sep 17 00:00:00 2001
From: Viktor Malik <viktor.malik@gmail.com>
Date: Mon, 17 Jan 2022 11:15:26 +0100
Subject: [PATCH 5/6] Update bio* tools to work on kernel 5.16+

Kernel 5.16 contains commit:

    https://github.com/torvalds/linux/commit/be6bfe36db1795babe9d92178a47b2e02193cb0f

which renamed some of the functions that the bio* tools attach to.
---
 tools/biolatency.bt | 6 ++++--
 tools/biosnoop.bt   | 6 ++++--
 tools/biostacks.bt  | 3 ++-
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/tools/biolatency.bt b/tools/biolatency.bt
index 4ea910b4..d5af1f29 100755
--- a/tools/biolatency.bt
+++ b/tools/biolatency.bt
@@ -16,12 +16,14 @@ BEGIN
 	printf("Tracing block device I/O... Hit Ctrl-C to end.\n");
 }
 
-kprobe:blk_account_io_start
+kprobe:blk_account_io_start,
+kprobe:__blk_account_io_start
 {
 	@start[arg0] = nsecs;
 }
 
-kprobe:blk_account_io_done
+kprobe:blk_account_io_done,
+kprobe:__blk_account_io_done
 /@start[arg0]/
 {
 	@usecs = hist((nsecs - @start[arg0]) / 1000);
diff --git a/tools/biosnoop.bt b/tools/biosnoop.bt
index 38ffeb52..aa88f4ba 100755
--- a/tools/biosnoop.bt
+++ b/tools/biosnoop.bt
@@ -16,7 +16,8 @@ BEGIN
 	printf("%-12s %-7s %-16s %-6s %7s\n", "TIME(ms)", "DISK", "COMM", "PID", "LAT(ms)");
 }
 
-kprobe:blk_account_io_start
+kprobe:blk_account_io_start,
+kprobe:__blk_account_io_start
 {
 	@start[arg0] = nsecs;
 	@iopid[arg0] = pid;
@@ -24,7 +25,8 @@ kprobe:blk_account_io_start
 	@disk[arg0] = ((struct request *)arg0)->rq_disk->disk_name;
 }
 
-kprobe:blk_account_io_done
+kprobe:blk_account_io_done,
+kprobe:__blk_account_io_done
 /@start[arg0] != 0 && @iopid[arg0] != 0 && @iocomm[arg0] != ""/
 
 {
diff --git a/tools/biostacks.bt b/tools/biostacks.bt
index 58201cdf..1bc9f819 100755
--- a/tools/biostacks.bt
+++ b/tools/biostacks.bt
@@ -18,7 +18,8 @@ BEGIN
 	printf("Tracing block I/O with init stacks. Hit Ctrl-C to end.\n");
 }
 
-kprobe:blk_account_io_start
+kprobe:blk_account_io_start,
+kprobe:__blk_account_io_start
 {
 	@reqstack[arg0] = kstack;
 	@reqts[arg0] = nsecs;
-- 
2.35.3