Blame SOURCES/bpftrace-0.13.1-Update-bio-tools-to-work-on-kernel-5.16.patch

bd8a9c
From ff22437ef4310a2ab37d732bdd1496a926315691 Mon Sep 17 00:00:00 2001
39b6c0
From: Viktor Malik <viktor.malik@gmail.com>
39b6c0
Date: Mon, 17 Jan 2022 11:15:26 +0100
bd8a9c
Subject: [PATCH 5/6] Update bio* tools to work on kernel 5.16+
39b6c0
bd8a9c
Kernel 5.16 contains commit:
39b6c0
bd8a9c
    https://github.com/torvalds/linux/commit/be6bfe36db1795babe9d92178a47b2e02193cb0f
39b6c0
bd8a9c
which renamed some of the functions that the bio* tools attach to.
39b6c0
---
bd8a9c
 tools/biolatency.bt | 6 ++++--
bd8a9c
 tools/biosnoop.bt   | 6 ++++--
bd8a9c
 tools/biostacks.bt  | 3 ++-
bd8a9c
 3 files changed, 10 insertions(+), 5 deletions(-)
39b6c0
39b6c0
diff --git a/tools/biolatency.bt b/tools/biolatency.bt
bd8a9c
index 4ea910b4..d5af1f29 100755
39b6c0
--- a/tools/biolatency.bt
39b6c0
+++ b/tools/biolatency.bt
bd8a9c
@@ -16,12 +16,14 @@ BEGIN
39b6c0
 	printf("Tracing block device I/O... Hit Ctrl-C to end.\n");
39b6c0
 }
39b6c0
 
39b6c0
-kprobe:blk_account_io_start
bd8a9c
+kprobe:blk_account_io_start,
39b6c0
+kprobe:__blk_account_io_start
39b6c0
 {
39b6c0
 	@start[arg0] = nsecs;
39b6c0
 }
39b6c0
 
39b6c0
-kprobe:blk_account_io_done
bd8a9c
+kprobe:blk_account_io_done,
39b6c0
+kprobe:__blk_account_io_done
39b6c0
 /@start[arg0]/
39b6c0
 {
39b6c0
 	@usecs = hist((nsecs - @start[arg0]) / 1000);
39b6c0
diff --git a/tools/biosnoop.bt b/tools/biosnoop.bt
bd8a9c
index 38ffeb52..aa88f4ba 100755
39b6c0
--- a/tools/biosnoop.bt
39b6c0
+++ b/tools/biosnoop.bt
bd8a9c
@@ -16,7 +16,8 @@ BEGIN
39b6c0
 	printf("%-12s %-7s %-16s %-6s %7s\n", "TIME(ms)", "DISK", "COMM", "PID", "LAT(ms)");
39b6c0
 }
39b6c0
 
39b6c0
-kprobe:blk_account_io_start
bd8a9c
+kprobe:blk_account_io_start,
39b6c0
+kprobe:__blk_account_io_start
39b6c0
 {
39b6c0
 	@start[arg0] = nsecs;
39b6c0
 	@iopid[arg0] = pid;
bd8a9c
@@ -24,7 +25,8 @@ kprobe:blk_account_io_start
39b6c0
 	@disk[arg0] = ((struct request *)arg0)->rq_disk->disk_name;
39b6c0
 }
39b6c0
 
39b6c0
-kprobe:blk_account_io_done
bd8a9c
+kprobe:blk_account_io_done,
39b6c0
+kprobe:__blk_account_io_done
39b6c0
 /@start[arg0] != 0 && @iopid[arg0] != 0 && @iocomm[arg0] != ""/
39b6c0
 
39b6c0
 {
39b6c0
diff --git a/tools/biostacks.bt b/tools/biostacks.bt
bd8a9c
index 58201cdf..1bc9f819 100755
39b6c0
--- a/tools/biostacks.bt
39b6c0
+++ b/tools/biostacks.bt
bd8a9c
@@ -18,7 +18,8 @@ BEGIN
39b6c0
 	printf("Tracing block I/O with init stacks. Hit Ctrl-C to end.\n");
39b6c0
 }
39b6c0
 
39b6c0
-kprobe:blk_account_io_start
bd8a9c
+kprobe:blk_account_io_start,
39b6c0
+kprobe:__blk_account_io_start
39b6c0
 {
39b6c0
 	@reqstack[arg0] = kstack;
39b6c0
 	@reqts[arg0] = nsecs;
39b6c0
-- 
bd8a9c
2.35.3
39b6c0