On May 7, 2010, at 4:09 PM, James McIlree wrote: > > On May 7, 2010, at 11:41 AM, Eric Gorr wrote: >> Now, there is a dSym file for this application, but for DTrace to find it, >> it would have needed to search the drive for it's location... > > The OS X dtrace uses spotlight to find dSYM(s), if you want to disable > this, move the dSYM to a directory not indexed by spotlight, or turn off > spotlight.
Confirmed. (Not that I doubted you for a second - it was for my edification) To confirm this, I create a sample application, made sure that no dSym file was around. Verified no symbols were anywhere to be seen using both nm and otool -t -V. And, (to no one's surprise), dtrace couldn't find any entry probes at all. For those who are interested, the sample application can be found at: http://ericgorr.net/cocoadev/dtracetest.zip So, now that I understand this part...or at least think I do....it leads me to a couple of more questions. QUESTION #1: I have defined three custom probes in my application. When I create a custom instrument in Instruments to record when those probes fire, I do see them ( http://ericgorr.net/cocoadev/dtracetest_ins.trace.zip ). However, when I do the following: ~ $ps -ax | grep dtracetest 31449 ?? 0:00.46 /Developer/usr/bin/ibtool --start-agent /Users/egorr/Desktop/dtracetest/dtracetest.xcodeproj --agent-timeout 1800.000000 33021 ?? 0:00.09 /Users/egorr/Desktop/dtracetest/build/Release/dtracetest.app/Contents/MacOS/dtracetest -psn_0_667811 33067 ttys000 0:00.00 grep dtracetest ~ $sudo dtrace -l -n 'pid33021:dtracetest::' ID PROVIDER MODULE FUNCTION NAME dtrace: failed to match pid33021:dtracetest::: No probe matches description ~ $cat dtracetest.d pid$target:dtracetest:: { @probecount[ probefunc ] = count(); } ~ $sudo dtrace -p 33021 -s dtracetest.d dtrace: failed to compile script dtracetest.d: line 1: probe description pid33021:dtracetest:: does not match any probes DTrace from the command line doesn't know about the probes. Why is that? --- --- --- QUESTION #2: Clearly, I can prevent DTrace from the command line from automatically creating entry, etc. probes for my application. So, the question then becomes, how can I tell DTrace that I want it to automatically create entry, etc. probes for a subset of my functions. For example, say I wanted the automatic creation of entry and exit probes for just the myCFunc function in my sample application? What if there were 100 or 1000 more functions that I wanted dtrace to automatically create entry and exit probes for? Is it possible to be selective in terms of what dtrace with automatically create entry and exit probes for? Or is it (more or less) an all or nothing proposition? (Although, this question has probably entered the realm of being specific to Xcode.) Thanks again. (Again, using Mac OS X 10.6.3)
_______________________________________________ dtrace-discuss mailing list dtrace-discuss@opensolaris.org