William Reich
2010-05-07 18:43:31 UTC
I have a very simple dtrace script ( shown below ).
This script works on simple programs just fine.
Now I want to use this script on a large C++ executable.
The executable is 8.5 meg in size on a x86 platform.
This executable has more than 10 threads in it.
I try to execute that the dtrace script and I get this error -
./adc.d 24930
dtrace: failed to compile script ./adc.d: line 7: failed to grab
process 24930
What is the error really trying to tell me ?
wr
#######################
#!/usr/sbin/dtrace -qs
BEGIN
{ flag = 1 ; }
END
{ flag = 0 ; }
pid$1:::entry
{
self->t[probefunc] = timestamp ;
}
pid$1:::return
/self->t[probefunc] && flag /
{ this->time = timestamp - self->t[probefunc] ;
@[probefunc] = avg(this->time) ;
self->t[probefunc] = 0 ;
}
This script works on simple programs just fine.
Now I want to use this script on a large C++ executable.
The executable is 8.5 meg in size on a x86 platform.
This executable has more than 10 threads in it.
I try to execute that the dtrace script and I get this error -
./adc.d 24930
dtrace: failed to compile script ./adc.d: line 7: failed to grab
process 24930
What is the error really trying to tell me ?
wr
#######################
#!/usr/sbin/dtrace -qs
BEGIN
{ flag = 1 ; }
END
{ flag = 0 ; }
pid$1:::entry
{
self->t[probefunc] = timestamp ;
}
pid$1:::return
/self->t[probefunc] && flag /
{ this->time = timestamp - self->t[probefunc] ;
@[probefunc] = avg(this->time) ;
self->t[probefunc] = 0 ;
}