[dtrace-discuss] I do not understand. Please advise.

Adam Leventhal ahl at eng.sun.com
Wed Jul 4 08:44:38 PDT 2007


Hi Paul,

It sounds like the 'scanit.d' script is using the args[] array, but should
instead be using argN variables, but it's hard to say without seeing the
script. Are you able to run 'scanit.d' by hand?

Adam

On Wed, Jul 04, 2007 at 06:47:28AM -0700, Paul van den Bogaard wrote:
> I have the following script:
> 
> proc:::exec-success
> /execname == "java"/
> {
>     stop();
>     printf("Restart with prun %d\n", pid);
> }
> 
> This one stops any java process that I start (and others :-). Runs as expected. I "prun pid" and that stopped java process continues.
> 
> Now I add a single line directly after the printf:
> 
>     system("./scanit.d -p %d", pid);
> 
> scanit.d uses the hotspot probes to dive into this java process just started.  If scanit.d is started from the command line it works as I expect it. However when started through the above mentioned "system(...)" way, an error is raised and the stopped java process is started again!
> 
> The message is:
> 
> dtrace: failed to compile script ./scanit.d: line 17: args[ ] may not be referenced because probe description hotspot4051:::method-entry matches an unstable set of probes
> 
> What am I missing? (and yes I did start the java process with -XX:+ExtendedDTraceProbes)
> 
> Thanks
> Paul
> --
> This message posted from opensolaris.org
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss at opensolaris.org

-- 
Adam Leventhal, Solaris Kernel Development       http://blogs.sun.com/ahl


More information about the dtrace-discuss mailing list