Skip to content

Commit b04a67f

Browse files
authored
DLPX-94098 LTS 24.04: update performance-diagnostics for Ubuntu 24.04 appliance (#106)
PR URL: https://www.github.com/delphix/performance-diagnostics/pull/106
1 parent 8eea78d commit b04a67f

File tree

7 files changed

+14
-12
lines changed

7 files changed

+14
-12
lines changed

.github/workflows/flake8.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ jobs:
99
- uses: actions/checkout@v1
1010
- name: Set up Python
1111
uses: actions/setup-python@v1
12-
with:
13-
python-version: "3.10"
1412
- name: flake8
1513
run: |
1614
python -m pip install --upgrade pip

bpf/estat/backend-io.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <uapi/linux/ptrace.h>
88
#include <linux/bpf_common.h>
99
#include <linux/blkdev.h>
10+
#include <linux/blk-mq.h>
1011
#include <linux/blk_types.h>
1112
#include <uapi/linux/bpf.h>
1213

@@ -34,7 +35,7 @@ int
3435
disk_io_start(struct pt_regs *ctx, struct request *reqp)
3536
{
3637
io_data_t data = {};
37-
struct gendisk *diskp = reqp->rq_disk;
38+
struct gendisk *diskp = reqp->q->disk;
3839
data.ts = bpf_ktime_get_ns();
3940
data.cmd_flags = reqp->cmd_flags;
4041
data.size = reqp->__data_len;

bpf/estat/iscsi.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
#include <uapi/linux/ptrace.h>
2626
#include <linux/bpf_common.h>
2727
#include <uapi/linux/bpf.h>
28-
#include "target/iscsi/iscsi_target_core.h"
28+
#include <scsi/libiscsi.h>
29+
#include <target/iscsi/iscsi_target_core.h>
2930

3031

3132
// Definitions for this script
@@ -48,7 +49,7 @@ BPF_HASH(iscsi_base_data, u32, iscsi_data_t);
4849
// @@ kprobe|iscsit_process_scsi_cmd|iscsi_target_start
4950
int
5051
iscsi_target_start(struct pt_regs *ctx, struct iscsi_conn *conn,
51-
struct iscsi_cmd *cmd, struct iscsi_scsi_req *hdr)
52+
struct iscsit_cmd *cmd, struct iscsi_scsi_req *hdr)
5253
{
5354
u64 ts = bpf_ktime_get_ns();
5455
iscsi_start_ts.update((u64 *) &cmd, &ts);
@@ -75,7 +76,7 @@ aggregate_data(iscsi_data_t *data, u64 ts, char *opstr)
7576

7677
// @@ kprobe|iscsit_response_queue|iscsi_target_response
7778
int
78-
iscsi_target_response(struct pt_regs *ctx, struct iscsi_conn *conn, struct iscsi_cmd *cmd, int state)
79+
iscsi_target_response(struct pt_regs *ctx, struct iscsi_conn *conn, struct iscsit_cmd *cmd, int state)
7980
{
8081
u32 tid = bpf_get_current_pid_tgid();
8182
iscsi_data_t data = {};

bpf/estat/zvol.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <sys/zfs_rlock.h>
1313
#include <sys/spa_impl.h>
1414
#include <sys/dataset_kstats.h>
15+
#include <sys/zvol.h>
1516
#include <sys/zvol_impl.h>
1617

1718

bpf/stbtrace/io.st

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ bpf_text += """
2727
#include <uapi/linux/ptrace.h>
2828
#include <linux/bpf_common.h>
2929
#include <linux/blkdev.h>
30+
#include <linux/blk-mq.h>
3031
#include <linux/blk_types.h>
3132
#include <uapi/linux/bpf.h>
3233

@@ -65,7 +66,7 @@ BPF_HASH($hist.name$, io_hist_key_t, u64);
6566
int disk_io_start(struct pt_regs *ctx, struct request *reqp)
6667
{
6768
io_data_t data = {};
68-
struct gendisk *diskp = reqp->rq_disk;
69+
struct gendisk *diskp = reqp->q->disk;
6970
data.ts = bpf_ktime_get_ns();
7071
data.cmd_flags = reqp->cmd_flags;
7172
data.size = reqp->__data_len;
@@ -128,7 +129,7 @@ b = BPF(text=bpf_text)
128129
if BPF.get_kprobe_functions(b'blk_start_request'):
129130
b.attach_kprobe(event="blk_start_request", fn_name="disk_io_start")
130131
b.attach_kprobe(event="blk_mq_start_request", fn_name="disk_io_start")
131-
b.attach_kprobe(event="blk_account_io_done", fn_name="disk_io_done")
132+
b.attach_kprobe(event="blk_mq_end_request", fn_name="disk_io_done")
132133

133134

134135
helper = BCCHelper(b, BCCHelper.ANALYTICS_PRINT_MODE)

bpf/stbtrace/iscsi.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ BPF_HASH($hist.name$, iscsi_hist_key_t, u64);
6363

6464
// Probe functions to initialize thread local data
6565
int iscsi_target_start(struct pt_regs *ctx, struct iscsi_conn *conn,
66-
struct iscsi_cmd *cmd, struct iscsi_scsi_req *hdr)
66+
struct iscsit_cmd *cmd, struct iscsi_scsi_req *hdr)
6767
{
6868
u64 ts = bpf_ktime_get_ns();
6969
iscsi_start_ts.update((u64 *) &cmd, &ts);
@@ -72,7 +72,7 @@ int iscsi_target_start(struct pt_regs *ctx, struct iscsi_conn *conn,
7272
}
7373

7474
int iscsi_target_response(struct pt_regs *ctx, struct iscsi_conn *conn,
75-
struct iscsi_cmd *cmd, int state)
75+
struct iscsit_cmd *cmd, int state)
7676
{
7777
u32 tid = bpf_get_current_pid_tgid();
7878
iscsi_data_t data = {};

debian/control

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2019 Delphix. All rights reserved.
2+
# Copyright 2019, 2024 Delphix. All rights reserved.
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
55
#
@@ -13,6 +13,6 @@ Standards-Version: 4.1.2
1313

1414
Package: performance-diagnostics
1515
Architecture: any
16-
Depends: python3-bcc, python3-minimal, python3-psutil, telegraf, docker.io
16+
Depends: python3-bpfcc, python3-minimal, python3-psutil, telegraf, docker.io
1717
Description: eBPF-based Performance Diagnostic Tools
1818
A collection of eBPF-based tools for diagnosing performance issues.

0 commit comments

Comments
 (0)