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
61c7ff1e
Commit
61c7ff1e
authored
Sep 10, 2015
by
Brendan Gregg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shorten syncsnoop example
parent
5853e72e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
tools/syncsnoop
tools/syncsnoop
+1
-3
No files found.
tools/syncsnoop
View file @
61c7ff1e
...
@@ -16,12 +16,10 @@ from bcc import BPF
...
@@ -16,12 +16,10 @@ from bcc import BPF
# load BPF program
# load BPF program
b
=
BPF
(
text
=
"""
b
=
BPF
(
text
=
"""
int do
_sync(void *ctx) {
void kprobe__sys
_sync(void *ctx) {
bpf_trace_printk("sync()
\
\
n");
bpf_trace_printk("sync()
\
\
n");
return 0;
};
};
"""
)
"""
)
b
.
attach_kprobe
(
event
=
"sys_sync"
,
fn_name
=
"do_sync"
)
# header
# header
print
(
"%-18s %s"
%
(
"TIME(s)"
,
"CALL"
))
print
(
"%-18s %s"
%
(
"TIME(s)"
,
"CALL"
))
...
...
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