[dtrace-discuss] "this" variables being overridden?

Yossi Lev (Sun Labs)
2009-09-18T17:03:30Z

Oh, I see, Thanks.  Can I then copy all the data that I need from the
copied structure into "this" variables in the clause where copyin is
called, and then use the values in subsequent clauses (that correspond
to the same probe)? e.g.:

pid$target::foo:entry
{
 this->dataP = (ProfData*)copyin(arg2, sizeof(ProfData));

 this->ablock = arg0;
 this->time = this->dataP->execTime;
}

pid$target::foo:entry
/this->time > 100/
{
 @longTx[this->ablock] = count();
}


The reason I''m asking is that sometimes you would like to use the read
data in a predicate, and you cannot access the read data before
executing the copyin...

Thanks,
Yossi



Chris Gerhard wrote:
> The extra copyin is required as copyin returns scratch memory and scratch
memory so is only valid in that clause.
>
> --chris
>