Stephen Guidon
2005-Jul-28 11:05 UTC
[dtrace-discuss] speculative tracing on nevada builds ?
Hi, Has something related to speculative tracing changed between s10 FCS and the more recent nevada builds ? I was trying the specopen.d script from the Dtrace guide on a nevada machine and it failed with : dtrace: failed to enable ''./spec.d'': DIF program content is invalid To try and narrow things down a bit I wrote the following short script. This works fine on s10, but fails with the above error on nevada builds 14, 17 and 19 (the only builds I have access to). I set dtrace_err_verbose=1 but didn''t get any more information. #!/usr/sbin/dtrace -s syscall::open:entry { self->spec = speculation(); speculate(self->spec); printf("%s", stringof(copyinstr(arg0))); } syscall::open:return /self->spec && errno != 0/ { commit(self->spec); self->spec = 0; } syscall::open:return /self->spec && errno == 0/ { discard(self->spec); self->spec = 0; } Anyone got any ideas whats going on ? Cheers, Steve
Jonathan Adams
2005-Jul-28 15:51 UTC
[dtrace-discuss] speculative tracing on nevada builds ?
On Thu, Jul 28, 2005 at 12:05:19PM +0100, Stephen Guidon wrote:> > dtrace: failed to enable ''./spec.d'': DIF program content is invalid > > To try and narrow things down a bit I wrote the following short > script. This works fine on s10, but fails with the above error on > nevada builds 14, 17 and 19 (the only builds I have access to). > > I set dtrace_err_verbose=1 but didn''t get any more information. > > #!/usr/sbin/dtrace -s > > syscall::open:entry > { > self->spec = speculation(); > speculate(self->spec); > printf("%s", stringof(copyinstr(arg0))); > } > > syscall::open:return > /self->spec && errno != 0/ > { > commit(self->spec); > self->spec = 0; > } > > syscall::open:return > /self->spec && errno == 0/ > { > discard(self->spec); > self->spec = 0; > } > > > Anyone got any ideas whats going on ?This is definitely a bug; I''ve filed: 6303188 some dtrace scripts with speculations fail to load Unfortunately, I don''t see an easy workaround at the moment. It looks like some of the validation logic has gotten out of step with itself. Cheers, - jonathan
Bryan Cantrill
2005-Jul-28 22:30 UTC
[dtrace-discuss] speculative tracing on nevada builds ?
> > #!/usr/sbin/dtrace -s > > > > syscall::open:entry > > { > > self->spec = speculation(); > > speculate(self->spec); > > printf("%s", stringof(copyinstr(arg0))); > > } > > > > syscall::open:return > > /self->spec && errno != 0/ > > { > > commit(self->spec); > > self->spec = 0; > > } > > > > syscall::open:return > > /self->spec && errno == 0/ > > { > > discard(self->spec); > > self->spec = 0; > > } > > > > > > Anyone got any ideas whats going on ? > > This is definitely a bug; I''ve filed: > > 6303188 some dtrace scripts with speculations fail to loadI actually have a fix for this in my current wad. (I''m embarrassed to say that this was first run into over a month ago -- I''ve got a pretty bad case of wad creep at the moment.) I introduced this with the fix for: 6253030 adding an action to an ECB takes quadratic time The fix is a one-liner, and I''m embarrassed that we didn''t have a test to catch this in our test suite (suffice it to say that I have added such a test). The workaround would be to rephrase this as: syscall::open:entry { self->spec = speculation(); } syscall::open:entry /self->spec/ { speculate(self->spec); ... } Apologies for the brokenness -- and for the delay in getting the fix back in... - Bryan -------------------------------------------------------------------------- Bryan Cantrill, Solaris Kernel Development. http://blogs.sun.com/bmc
Stephen Guidon
2005-Aug-02 09:00 UTC
[dtrace-discuss] speculative tracing on nevada builds ?
Hi Bryan, Jonathan, Thanks to you both for the speedy replies. The workaround is all I needed. Everything is working fine now. Cheers, Steve Bryan Cantrill wrote:>>>#!/usr/sbin/dtrace -s >>> >>>syscall::open:entry >>>{ >>> self->spec = speculation(); >>> speculate(self->spec); >>> printf("%s", stringof(copyinstr(arg0))); >>>} >>> >>>syscall::open:return >>>/self->spec && errno != 0/ >>>{ >>> commit(self->spec); >>> self->spec = 0; >>>} >>> >>>syscall::open:return >>>/self->spec && errno == 0/ >>>{ >>> discard(self->spec); >>> self->spec = 0; >>>} >>> >>> >>>Anyone got any ideas whats going on ? >> >>This is definitely a bug; I''ve filed: >> >>6303188 some dtrace scripts with speculations fail to load > > > I actually have a fix for this in my current wad. (I''m embarrassed to say > that this was first run into over a month ago -- I''ve got a pretty bad case > of wad creep at the moment.) > > I introduced this with the fix for: > > 6253030 adding an action to an ECB takes quadratic time > > The fix is a one-liner, and I''m embarrassed that we didn''t have a test > to catch this in our test suite (suffice it to say that I have added > such a test). The workaround would be to rephrase this as: > > syscall::open:entry > { > self->spec = speculation(); > } > > syscall::open:entry > /self->spec/ > { > speculate(self->spec); > ... > } > > Apologies for the brokenness -- and for the delay in getting the fix > back in... > > - Bryan > > -------------------------------------------------------------------------- > Bryan Cantrill, Solaris Kernel Development. http://blogs.sun.com/bmc-- Cheers, Steve