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
0f0c8317
Commit
0f0c8317
authored
Sep 10, 2017
by
Alastair Robertson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
README: Add profile example
parent
ba038b23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
16 deletions
+38
-16
README.md
README.md
+38
-16
No files found.
README.md
View file @
0f0c8317
...
...
@@ -20,7 +20,7 @@ kretprobe:sys_read / @start[tid] /
}
```
```
Running... press Ctrl-C to stop
Attaching 2 probes...
^C
@start[9134]: 6465933686812
...
...
@@ -53,7 +53,7 @@ kprobe:sys_open / comm == "bash" /
}
```
```
Running... press Ctrl-C to stop
Attaching 1 probe...
^C
@[/usr/lib/libnsl.so.1]: 1
...
...
@@ -66,29 +66,51 @@ Running... press Ctrl-C to stop
...
```
Record where malloc is called from for a particular process ID (userland stack tracing will try to resolve symbols in the future
):
Whole system profiling (TODO make example check if kernel is on-cpu before recording
):
```
uprobe:/lib/libc-2.25.so:malloc / pid == 15201 /
profile:hz:99
{
@[
u
stack] = count()
@[stack] = count()
}
```
```
Running... press Ctrl-C to stop
Attaching 1 probe...
^C
...
@[
_raw_spin_unlock_irq+23
finish_task_switch+117
__schedule+574
schedule_idle+44
do_idle+333
cpu_startup_entry+113
start_secondary+344
verify_cpu+0
]: 83
@[
0x7fe223fdff40
0x40058a
0x7fe223f8343a
0x82e258d4c544155
]: 271276
queue_work_on+41
tty_flip_buffer_push+43
pty_write+83
n_tty_write+434
tty_write+444
__vfs_write+55
vfs_write+177
sys_write+85
entry_SYSCALL_64_fastpath+26
]: 97
@[
0x7fe223fdff40
0x40058f
0x7fe223f8343a
0x82e258d4c544155
]: 135637
cpuidle_enter_state+299
cpuidle_enter+23
call_cpuidle+35
do_idle+394
cpu_startup_entry+113
rest_init+132
start_kernel+1083
x86_64_start_reservations+41
x86_64_start_kernel+323
verify_cpu+0
]: 150
```
## Probe types
...
...
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