|
|
39b6c0 |
From 617bb8501c091be2501b3abe4dad47804d5a4278 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
|
|
|
39b6c0 |
Subject: [PATCH] Update bio* tools to work on RHEL9
|
|
|
39b6c0 |
|
|
|
39b6c0 |
Kernel commit:
|
|
|
39b6c0 |
9e6c144e5fee block: inline hot paths of blk_account_io_*()
|
|
|
39b6c0 |
renamed some functions used in the tools.
|
|
|
39b6c0 |
|
|
|
39b6c0 |
Kernel commit:
|
|
|
39b6c0 |
5f8d3bf600d2 block: move struct request to blk-mq.h
|
|
|
39b6c0 |
moved "struct request" to a different header.
|
|
|
39b6c0 |
|
|
|
39b6c0 |
This fixes both issues.
|
|
|
39b6c0 |
---
|
|
|
39b6c0 |
tools/biolatency.bt | 4 ++--
|
|
|
39b6c0 |
tools/biosnoop.bt | 6 +++---
|
|
|
39b6c0 |
tools/biostacks.bt | 2 +-
|
|
|
39b6c0 |
3 files changed, 6 insertions(+), 6 deletions(-)
|
|
|
39b6c0 |
|
|
|
39b6c0 |
diff --git a/tools/biolatency.bt b/tools/biolatency.bt
|
|
|
39b6c0 |
index 4ea910b4..8fb0490d 100755
|
|
|
39b6c0 |
--- a/tools/biolatency.bt
|
|
|
39b6c0 |
+++ b/tools/biolatency.bt
|
|
|
39b6c0 |
@@ -16,12 +16,12 @@ BEGIN
|
|
|
39b6c0 |
printf("Tracing block device I/O... Hit Ctrl-C to end.\n");
|
|
|
39b6c0 |
}
|
|
|
39b6c0 |
|
|
|
39b6c0 |
-kprobe:blk_account_io_start
|
|
|
39b6c0 |
+kprobe:__blk_account_io_start
|
|
|
39b6c0 |
{
|
|
|
39b6c0 |
@start[arg0] = nsecs;
|
|
|
39b6c0 |
}
|
|
|
39b6c0 |
|
|
|
39b6c0 |
-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
|
|
|
39b6c0 |
index 38ffeb52..6519054c 100755
|
|
|
39b6c0 |
--- a/tools/biosnoop.bt
|
|
|
39b6c0 |
+++ b/tools/biosnoop.bt
|
|
|
39b6c0 |
@@ -1,5 +1,5 @@
|
|
|
39b6c0 |
#!/usr/bin/env bpftrace
|
|
|
39b6c0 |
-#include <linux/blkdev.h>
|
|
|
39b6c0 |
+#include <linux/blk-mq.h>
|
|
|
39b6c0 |
/*
|
|
|
39b6c0 |
* biosnoop.bt Block I/O tracing tool, showing per I/O latency.
|
|
|
39b6c0 |
* For Linux, uses bpftrace, eBPF.
|
|
|
39b6c0 |
@@ -16,7 +16,7 @@ BEGIN
|
|
|
39b6c0 |
printf("%-12s %-7s %-16s %-6s %7s\n", "TIME(ms)", "DISK", "COMM", "PID", "LAT(ms)");
|
|
|
39b6c0 |
}
|
|
|
39b6c0 |
|
|
|
39b6c0 |
-kprobe:blk_account_io_start
|
|
|
39b6c0 |
+kprobe:__blk_account_io_start
|
|
|
39b6c0 |
{
|
|
|
39b6c0 |
@start[arg0] = nsecs;
|
|
|
39b6c0 |
@iopid[arg0] = pid;
|
|
|
39b6c0 |
@@ -24,7 +24,7 @@ kprobe:blk_account_io_start
|
|
|
39b6c0 |
@disk[arg0] = ((struct request *)arg0)->rq_disk->disk_name;
|
|
|
39b6c0 |
}
|
|
|
39b6c0 |
|
|
|
39b6c0 |
-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
|
|
|
39b6c0 |
index 58201cdf..fdd2efed 100755
|
|
|
39b6c0 |
--- a/tools/biostacks.bt
|
|
|
39b6c0 |
+++ b/tools/biostacks.bt
|
|
|
39b6c0 |
@@ -18,7 +18,7 @@ BEGIN
|
|
|
39b6c0 |
printf("Tracing block I/O with init stacks. Hit Ctrl-C to end.\n");
|
|
|
39b6c0 |
}
|
|
|
39b6c0 |
|
|
|
39b6c0 |
-kprobe:blk_account_io_start
|
|
|
39b6c0 |
+kprobe:__blk_account_io_start
|
|
|
39b6c0 |
{
|
|
|
39b6c0 |
@reqstack[arg0] = kstack;
|
|
|
39b6c0 |
@reqts[arg0] = nsecs;
|
|
|
39b6c0 |
--
|
|
|
39b6c0 |
2.34.1
|
|
|
39b6c0 |
|