Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
a91ec385
Commit
a91ec385
authored
Aug 28, 2017
by
Brendan Gregg
Committed by
GitHub
Aug 28, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1324 from mskarbek/zfs_tools_fix
zfs tools fix for zpl_read/zpl_write removal
parents
667988ce
4f444a52
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
8 deletions
+36
-8
tools/zfsdist.py
tools/zfsdist.py
+18
-4
tools/zfsslower.py
tools/zfsslower.py
+18
-4
No files found.
tools/zfsdist.py
View file @
a91ec385
...
...
@@ -133,12 +133,26 @@ if debug:
b
=
BPF
(
text
=
bpf_text
)
# common file functions
b
.
attach_kprobe
(
event
=
"zpl_read"
,
fn_name
=
"trace_entry"
)
b
.
attach_kprobe
(
event
=
"zpl_write"
,
fn_name
=
"trace_entry"
)
if
BPF
.
get_kprobe_functions
(
'zpl_iter'
):
b
.
attach_kprobe
(
event
=
"zpl_iter_read"
,
fn_name
=
"trace_entry"
)
b
.
attach_kprobe
(
event
=
"zpl_iter_write"
,
fn_name
=
"trace_entry"
)
elif
BPF
.
get_kprobe_functions
(
'zpl_aio'
):
b
.
attach_kprobe
(
event
=
"zpl_aio_read"
,
fn_name
=
"trace_entry"
)
b
.
attach_kprobe
(
event
=
"zpl_aio_write"
,
fn_name
=
"trace_entry"
)
else
:
b
.
attach_kprobe
(
event
=
"zpl_read"
,
fn_name
=
"trace_entry"
)
b
.
attach_kprobe
(
event
=
"zpl_write"
,
fn_name
=
"trace_entry"
)
b
.
attach_kprobe
(
event
=
"zpl_open"
,
fn_name
=
"trace_entry"
)
b
.
attach_kprobe
(
event
=
"zpl_fsync"
,
fn_name
=
"trace_entry"
)
b
.
attach_kretprobe
(
event
=
"zpl_read"
,
fn_name
=
"trace_read_return"
)
b
.
attach_kretprobe
(
event
=
"zpl_write"
,
fn_name
=
"trace_write_return"
)
if
BPF
.
get_kprobe_functions
(
'zpl_iter'
):
b
.
attach_kretprobe
(
event
=
"zpl_iter_read"
,
fn_name
=
"trace_read_return"
)
b
.
attach_kretprobe
(
event
=
"zpl_iter_write"
,
fn_name
=
"trace_write_return"
)
elif
BPF
.
get_kprobe_functions
(
'zpl_aio'
):
b
.
attach_kretprobe
(
event
=
"zpl_aio_read"
,
fn_name
=
"trace_read_return"
)
b
.
attach_kretprobe
(
event
=
"zpl_aio_write"
,
fn_name
=
"trace_write_return"
)
else
:
b
.
attach_kretprobe
(
event
=
"zpl_read"
,
fn_name
=
"trace_read_return"
)
b
.
attach_kretprobe
(
event
=
"zpl_write"
,
fn_name
=
"trace_write_return"
)
b
.
attach_kretprobe
(
event
=
"zpl_open"
,
fn_name
=
"trace_open_return"
)
b
.
attach_kretprobe
(
event
=
"zpl_fsync"
,
fn_name
=
"trace_fsync_return"
)
...
...
tools/zfsslower.py
View file @
a91ec385
...
...
@@ -276,12 +276,26 @@ def print_event(cpu, data, size):
b
=
BPF
(
text
=
bpf_text
)
# common file functions
b
.
attach_kprobe
(
event
=
"zpl_read"
,
fn_name
=
"trace_rw_entry"
)
b
.
attach_kprobe
(
event
=
"zpl_write"
,
fn_name
=
"trace_rw_entry"
)
if
BPF
.
get_kprobe_functions
(
'zpl_iter'
):
b
.
attach_kprobe
(
event
=
"zpl_iter_read"
,
fn_name
=
"trace_rw_entry"
)
b
.
attach_kprobe
(
event
=
"zpl_iter_write"
,
fn_name
=
"trace_rw_entry"
)
elif
BPF
.
get_kprobe_functions
(
'zpl_aio'
):
b
.
attach_kprobe
(
event
=
"zpl_aio_read"
,
fn_name
=
"trace_rw_entry"
)
b
.
attach_kprobe
(
event
=
"zpl_aio_write"
,
fn_name
=
"trace_rw_entry"
)
else
:
b
.
attach_kprobe
(
event
=
"zpl_read"
,
fn_name
=
"trace_rw_entry"
)
b
.
attach_kprobe
(
event
=
"zpl_write"
,
fn_name
=
"trace_rw_entry"
)
b
.
attach_kprobe
(
event
=
"zpl_open"
,
fn_name
=
"trace_open_entry"
)
b
.
attach_kprobe
(
event
=
"zpl_fsync"
,
fn_name
=
"trace_fsync_entry"
)
b
.
attach_kretprobe
(
event
=
"zpl_read"
,
fn_name
=
"trace_read_return"
)
b
.
attach_kretprobe
(
event
=
"zpl_write"
,
fn_name
=
"trace_write_return"
)
if
BPF
.
get_kprobe_functions
(
'zpl_iter'
):
b
.
attach_kretprobe
(
event
=
"zpl_iter_read"
,
fn_name
=
"trace_read_return"
)
b
.
attach_kretprobe
(
event
=
"zpl_iter_write"
,
fn_name
=
"trace_write_return"
)
elif
BPF
.
get_kprobe_functions
(
'zpl_aio'
):
b
.
attach_kretprobe
(
event
=
"zpl_aio_read"
,
fn_name
=
"trace_read_return"
)
b
.
attach_kretprobe
(
event
=
"zpl_aio_write"
,
fn_name
=
"trace_write_return"
)
else
:
b
.
attach_kretprobe
(
event
=
"zpl_read"
,
fn_name
=
"trace_read_return"
)
b
.
attach_kretprobe
(
event
=
"zpl_write"
,
fn_name
=
"trace_write_return"
)
b
.
attach_kretprobe
(
event
=
"zpl_open"
,
fn_name
=
"trace_open_return"
)
b
.
attach_kretprobe
(
event
=
"zpl_fsync"
,
fn_name
=
"trace_fsync_return"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment