apitrace on OS X

José Fonseca jose.r.fonseca at gmail.com
Tue May 14 16:28:20 PDT 2013


I believe the right extenision is actually *.dylib. Not *.dyld.

Sorry, I don't have a Mac hand. This is all from memory. Tomorrow I might
retry on my mac machine and give more accurate answers.

I build with Xcode compilers, via command line cmake, just as described in
the README.

The trace is generated in the current dir. There is usually a message to
stderr saying "apitrace: tracing to ..." like on linux.

You can also force trace to be written to a given path by doing

   export TRACE_FILE=/path/to/where/you/want/the.trace

before running.

You can also do

  otool -L /path/to/your/executable

to see whether the wrapper from apitrace are being picked or not.

See
http://developer.apple.com/library/mac/documentation/Darwin/Reference/Manpages/man1/otool.1.html#//apple_ref/doc/man/1/otool
and
http://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/man1/dyld.1.html
for
debuggin dynamic library loading.

Jose

On Tue, May 14, 2013 at 11:58 PM, Peter Lohrmann
<peterl at valvesoftware.com>wrote:

>  I have no *.dyld files. The file that gets output from the cgltrace
> project is just called "OpenGL"
>
> How are you compiling? I'm using XCode.
>
> Where does your trace file get generated? In the ApiTrace folder, or the
> OSX.app/Contents/MacOS/CINEBENCH OSX" folder?
>
> Even if I am in the directory containing apitrace, it is not recognized as
> an executable if I try to run it as you mention below. It does work if I
> use "open apitrace" and I can see the usage print out. Unfortunately I'm
> not able to get it to recognize any arguments.
>
> - Peter
>
>  ------------------------------
> *From:* José Fonseca [jose.r.fonseca at gmail.com]
> *Sent:* Tuesday, May 14, 2013 3:09 PM
> *To:* Peter Lohrmann
> *Cc:* Apitrace list
> *Subject:* Re: apitrace on OS X
>
>   I use apitrace on MacOSX, though only sporadically.
>
>  I haven't tried tracing through "open". What I typically do is to find
> inside the executable inside foo.app/ and invoke that directly.  Take for
> example CINEBENCH -- if you download CINEBENCH
> http://www.maxon.net/?id=1258 , then you'd trace it as
>
>     apitrace trace "CINEBENCH OSX.app/Contents/MacOS/CINEBENCH OSX"
>
>  or somthing like that.
>
>  Also, I'm surprised you have a wrappers/Debug subdir -- when I build on
> MacOSX the .dyld wrappers does not go into a Debug subdir. This only
> happens on MSVC builds for me. What does
>
>    find /ApiTrace/build -name \*.dyld
>
>  output?
>
>  Jose
>
> On Tue, May 14, 2013 at 10:21 PM, Peter Lohrmann <peterl at valvesoftware.com
> > wrote:
>
>>    Hi all,****
>>
>> ** **
>>
>> I'm trying to use apitrace on OS X, but having trouble. I've got the
>> project building, and am using the suggested command line to launch the
>> application (while also overriding DYLD_LIBRARY_PATH) and it does run, but
>> I can't find a trace file anywhere. I'm guessing the application is not
>> actually loading my opengl library. ****
>>
>> ** **
>>
>> export DYLD_LIBRARY_PATH=/ApiTrace/build/wrappers/Debug/****
>>
>> open <long path>/OSXGLEssentials.app****
>>
>> ** **
>>
>> Can anyone offer some suggestions as to what the issue may be, or how to
>> investigate this farther? I'm relatively new to OS X development, so all
>> help would be appreciated.****
>>
>> ** **
>>
>> Thank you,****
>>
>>    Peter****
>>
>> _______________________________________________
>> apitrace mailing list
>> apitrace at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/apitrace
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/apitrace/attachments/20130515/1522c86f/attachment-0001.html>


More information about the apitrace mailing list