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
c325d6dc
Commit
c325d6dc
authored
Jun 27, 2018
by
Joe Yin
Committed by
yonghong-song
Jun 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify tools/ext4dist.py for 4.10+ (#1855)
based on kernel version, different kernel functions are kprobed.
parent
293938d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
tools/ext4dist.py
tools/ext4dist.py
+10
-1
No files found.
tools/ext4dist.py
View file @
c325d6dc
...
...
@@ -174,7 +174,16 @@ if debug or args.ebpf:
b
=
BPF
(
text
=
bpf_text
)
# Common file functions. See earlier comment about generic_file_read_iter().
b
.
attach_kprobe
(
event
=
"generic_file_read_iter"
,
fn_name
=
"trace_read_entry"
)
# Comment by Joe Yin
# From Linux 4.10, the function .read_iter at the ext4_file_operations has
# changed to ext4_file_read_iter.
# So, I add get_kprobe_functions('ext4_file_read_iter'),it will first to attach ext4_file_read_iter,
# if fails and will attach the generic_file_read_iter which used to pre-4.10.
if
BPF
.
get_kprobe_functions
(
'ext4_file_read_iter'
):
b
.
attach_kprobe
(
event
=
"ext4_file_read_iter"
,
fn_name
=
"trace_entry"
)
else
:
b
.
attach_kprobe
(
event
=
"generic_file_read_iter"
,
fn_name
=
"trace_read_entry"
)
b
.
attach_kprobe
(
event
=
"ext4_file_write_iter"
,
fn_name
=
"trace_entry"
)
b
.
attach_kprobe
(
event
=
"ext4_file_open"
,
fn_name
=
"trace_entry"
)
b
.
attach_kprobe
(
event
=
"ext4_sync_file"
,
fn_name
=
"trace_entry"
)
...
...
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