Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bpftrace
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
bpftrace
Commits
0b868fb9
Commit
0b868fb9
authored
Sep 09, 2018
by
Brendan Gregg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ref guide: add missing probe references
parent
30d11f7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
4 deletions
+38
-4
docs/reference_guide.md
docs/reference_guide.md
+38
-4
No files found.
docs/reference_guide.md
View file @
0b868fb9
...
...
@@ -22,8 +22,9 @@ This is a work in progress. If something is missing or incomplete, check the bpf
-
[
7. `usdt`: Static Tracing, User-Level
](
#7-usdt-static-tracing-user-level
)
-
[
8. `usdt`: Static Tracing, User-Level Arguments
](
#8-usdt-static-tracing-user-level-arguments
)
-
[
9. `profile`: Timed Sampling Events
](
#9-profile-timed-sampling-events
)
-
[
10. `software`: Pre-defined Software Events
](
#10-software-pre-defined-software-events
)
-
[
11. `hardware`: Pre-defined Hardware Events
](
#11-hardware-pre-defined-hardware-events
)
-
[
10. `interval`: Timed Output
](
#10-interval-timed-output
)
-
[
11. `software`: Pre-defined Software Events
](
#11-software-pre-defined-software-events
)
-
[
12. `hardware`: Pre-defined Hardware Events
](
#12-hardware-pre-defined-hardware-events
)
-
[
Variables
](
#variables
)
-
[
1. Builtins
](
#1-builtins
)
-
[
2. `@`, `$`: Basic Variables
](
#2---basic-variables
)
...
...
@@ -165,7 +166,11 @@ bpftrace -e 'kprobe:do_nanosleep { printf("secs: %d\n", ((struct timespec *)arg0
-
`uprobe`
- user-level function start
-
`uretprobe`
- user-level function return
-
`tracepoint`
- kernel static tracepoints
-
`usdt`
- user-level static tracepoints
-
`profile`
- timed sampling
-
`interval`
- timed output
-
`software`
- kernel software events
-
`hardware`
- processor-level events
Some probe types allow wildcards to match multiple probes, eg,
`kprobe:vfs_*`
.
...
...
@@ -375,7 +380,36 @@ Attaching 1 probe...
@[0]: 579
```
## 10. `software`: Pre-defined Software Events
## 10. `interval`: Timed Output
Syntax:
```
profile:hz:rate
profile:s:rate
```
This fires on one CPU only, and can be used for generating per-interval output.
Example:
```
# bpftrace -e 'tracepoint:raw_syscalls:sys_enter { @syscalls = count(); }
interval:s:1 { print(@syscalls); clear(@syscalls); }'
Attaching 2 probes...
@syscalls: 1263
@syscalls: 731
@syscalls: 891
@syscalls: 1195
@syscalls: 1154
@syscalls: 1635
@syscalls: 1208
[...]
```
This prints the rate of syscalls per second.
## 11. `software`: Pre-defined Software Events
Syntax:
...
...
@@ -424,7 +458,7 @@ Attaching 1 probe...
This roughly counts who is causing page faults, by sampling the process name for every one in one hundred faults.
## 1
1
. `hardware`: Pre-defined Hardware Events
## 1
2
. `hardware`: Pre-defined Hardware Events
Syntax:
...
...
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