Re: Snow Leopard's DTrace does not enable some probes?
Re: Snow Leopard's DTrace does not enable some probes?
- Subject: Re: Snow Leopard's DTrace does not enable some probes?
- From: Tomas Zahradnicky <email@hidden>
- Date: Fri, 16 Oct 2009 20:58:08 +0200
Hi all,
I have added a usleep for 100 ms at the start of the program and this turned on the first NFET_MAIN_START() probe. Shouldn't DTrace load the program first, then setup probes and after that run the program?
The measurement works only from time to time. Some of the later probes have the same problem... weird!
Tomas
Le 15 oct. 2009 à 17:07, Tomas Zahradnicky a écrit : Dear Xcode Users,
after upgrading to Snow Leopard and Xcode Tools, I have noticed that my apps that use DTrace no longer work. I have looked at the generated assembly and I see nops properly placed in the code. Further digging revealed, that some of the probes are *disabled* despite they are defined in the .d file.
Since it worked in Leopard, I am suspecting a bug somewhere else, or someone sees a problem below?
This is how I call the probe: if( NFET_MAIN_START_ENABLED() ) { // <- this probe is always disabled despite enabled below! printf("enabled\n"); NFET_MAIN_START(); } else { printf("disabled\n"); } sleep(1);//app->Run(); NFET_MAIN_END();
This is how is the probe turned on in the .d file: nfet$target:::main-start { trace("main-start\n"); self->ts = walltimestamp; }
nfet$target:::main-end { trace("main-end\n"); self->ts = walltimestamp - self->ts; }
This is how the probe is defined: provider nfet { probe main__start(); probe main__end(); };
This is how I run dtrace (dtrace: Sun D 1.6.2): sudo dtrace -qs src/probes.d -c './build/Release/nfet'
Best Regards,
Tomas
|
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden