Jon Haslam writes:
>
> > Typically, when I assign a variable in dtrace, I cast it first, like
> > this:
> >
> > fbt::foo:entry
> > {
> > self->vpp = (vnode_t **)arg0;
> > }
>
> There's no need to cast in this situation though as, with
> the fbt provider, you can just access typed arguments through
> the args[] array. Just use args[2] for zfs_lookup:entry in
> this case.
Yes; you're right about that. I was trying to make it a little more
generic ...
The issue I was pointing out was that the automatic creation process
for "self->" variables saves off the data type, and that can be a
handy property to simplify a mass of casts later in the code.
--
James Carlson, Solaris Networking <[EMAIL PROTECTED]>
Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
_______________________________________________
dtrace-discuss mailing list
[email protected]