* Followup on doc issues with USDT
@ 2024-08-21 0:11 Sam James
0 siblings, 0 replies; only message in thread
From: Sam James @ 2024-08-21 0:11 UTC (permalink / raw)
To: dtrace
[-- Attachment #1: Type: text/plain, Size: 2376 bytes --]
Hi!
This is a followup to
https://lore.kernel.org/dtrace/87jzgfr2m8.fsf@gentoo.org/.
Carrying on with the USDT tutorial and reference, I noticed a few other
issues.
* In the guide/reference [0], under "Adding Probes to an Application" ->
"Using Statically Defined Probes", a script is provided as 'testscript'.
Unfortunately, the script is broken (it's missing a heredoc for the
Makefile at the very least; there's nothing in the script to stsrt
creating a Makefile, it just launches into some of its (truncated) contents):
```
$ bash /tmp/x
/tmp/x: line 36: test.o:: command not found
test.c:2:10: fatal error: prov.h: No such file or directory
2 | #include "prov.h"
| ^~~~~~~~
compilation terminated.
/tmp/x: line 39: prov.o:: command not found
dtrace: failed to link script prov: failed to open test.o: No such file or directory
/tmp/x: line 42: test:: command not found
/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find prov.o: No such file or directory
/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find test.o: No such file or directory
collect2: error: ld returned 1 exit status
/tmp/x: line 44: EOF: command not found
cc test.c -o test
test.c:2:10: fatal error: prov.h: No such file or directory
2 | #include "prov.h"
| ^~~~~~~~
compilation terminated.
make: *** [<builtin>: test] Error 1
dtrace: No such process
```
* In the tutorial [1], under "Using USDT Probes", the 'list the probes'
instructions don't work.
I get the same "No probe matches description" even when `prime` is
certainly running in another terminal. I've also verified USDT
functionality works using the DTrace testsuite and via manually
constructing examples with an actual probe enabled (not just listing).
```
# dtrace -l -P 'prime*'
ID PROVIDER MODULE FUNCTION NAME
dtrace: failed to match prime*:::: No probe matches description
```
When doing `dtrace -l`, it doesn't know to wildcard match USDT (or pid)
probes.
[0] https://docs.oracle.com/en/operating-systems/oracle-linux/dtrace-guide/dtrace-ref-StaticallyDefinedTracingofUserApplications.html#dt_uusdt_sdt
[1] https://docs.oracle.com/en/operating-systems/oracle-linux/dtrace-tutorial/dtrace-tutorial-TracingUserSpaceApplications.html#dtrace_use_usdtprobes
thanks,
sam
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 377 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-08-21 0:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-21 0:11 Followup on doc issues with USDT Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox