From: Sam James <sam@gentoo.org>
To: dtrace@lists.linux.dev
Subject: Followup on doc issues with USDT
Date: Wed, 21 Aug 2024 01:11:29 +0100 [thread overview]
Message-ID: <87msl6ohu6.fsf@gentoo.org> (raw)
[-- 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 --]
reply other threads:[~2024-08-21 0:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87msl6ohu6.fsf@gentoo.org \
--to=sam@gentoo.org \
--cc=dtrace@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.