Commit e3e1eb5a authored by Brendan Gregg's avatar Brendan Gregg Committed by GitHub

Merge pull request #107 from iovisor/update-usdt-docs

update usdt with arguments examples
parents 2562ff60 4bad1e39
...@@ -589,12 +589,25 @@ hi ...@@ -589,12 +589,25 @@ hi
## 8. `usdt`: Static Tracing, User-Level Arguments ## 8. `usdt`: Static Tracing, User-Level Arguments
**TODO**: see issue [#33](https://github.com/iovisor/bpftrace/issues/33) Examples:
Future example: ```
# bpftrace -e 'usdt:/root/tick:loop { printf("%s: %d\n", str(arg0), arg1); }'
my string: 1
my string: 2
my string: 3
my string: 4
my string: 5
^C
```
``` ```
bpftrace -e 'usdt:pthread:pthread_create /arg4 != 0/ { printf("created thread\n"); }' # bpftrace -e 'usdt:/root/tick:loop /arg1 > 2/ { printf("%s: %d\n", str(arg0), arg1); }'
my string: 3
my string: 4
my string: 5
my string: 6
^C
``` ```
## 9. `profile`: Timed Sampling Events ## 9. `profile`: Timed Sampling Events
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment