On Dec 4, 2007 1:49 AM, Adam Leventhal <[EMAIL PROTECTED]> wrote:
> On Mon, Dec 03, 2007 at 11:07:15PM -0600, Mike Gerdts wrote:
> > Is there some updated documentation that helps out with less trivial
> > USDT probes? The wikified dtrace manual[1] isn't too helpful when you
> > want to provide access to data structures.
>
> I don't think you'll need translated types for a libnsl provider. The new
> mechanism for USDT can be found here:
>
> http://blogs.sun.com/ahl/entry/user_land_tracing_gets_better
This got me started. I've added a couple probes to clnt_create with
some success. The first problem I ran into was with ctfmerge:
ERROR: ctfmerge: Input file pics/rpc_provider.o was partially built
from C sources, but no CTF data was present
Removing libnsl.so.1
A bit of hackery (not sure it is long-term right) in ../Makefile.lib
got me past this.
I was rather surprised when I next ran into this:
check_fnames: error: forbidden names found in pics/rpc_provider.o
close
dlinfo
fprintf
ioctl
open64
strerror
*** Error code 1
dmake: Fatal error: Command failed for target `fnamecheck'
Current working directory
/ws/2007-11-rpc-dtrace/onnv-gate/usr/src/lib/libnsl/sparc
*** Error code 1
The following command caused the error:
cd sparc; pwd; dmake all
dmake: Fatal error: Command failed for target `sparc'
Current working directory /ws/2007-11-rpc-dtrace/onnv-gate/usr/src/lib/libnsl
Does this mean that lint rules need to tamed or that rpc_provider.o
needs to be generated in a different way?
FWIW, pics/rpc_provider.o is generated from rpc/rpc_provider.c:
provider rpc {
probe clnt_create_start(char*, int, int, char*);
probe clnt_create_done();
probe clnt_tli_create_start();
};
Using the following in Makefile.com:
../rpc/%.h: ../rpc/%.d
$(DTRACE) -h -s $< -o $@
pics/%.o: ../rpc/%.d
@echo "COMPILE.d=<$(COMPILE.d)>"
$(COMPILE.d) -o $@ -s $< $(RPC:%=pics/%)
If I then do:
LD_LIBRARY_PATH=`pwd`/sparc mconnect
Then dtrace -l lists the probes I added and I see calls to
clnt_tli_create() when I run rpcinfo.
> If anyone is interested in updating the wiki chapter, please let me know.
> Otherwise, I hope to get an update done sometime within the next few months.
Assuming I get to a point where this all works out, I may be willing
to take it on. If someone else with more ability steps up before I
get a draft out, my feelings won't be hurt either.
--
Mike Gerdts
http://mgerdts.blogspot.com/
_______________________________________________
dtrace-discuss mailing list
[email protected]