Jump to content
  • Advertisement
Sign in to follow this  
aaron_ds

Unity gprof on windows "not in a.out format"

This topic is 4845 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello I'm having a problem profiling using gprof. I used the -pg option in both the compiler and linker. I ran the program and gmon.out was created. Then from the command line, I tried gprof programname and gprof returned with gprof: path\programname: not in a.out format I'm having the same problem as in this thread, but I'm already using -pg in the compiler and linker. I'm using mingw 3.4.2 and gprof 2.11.92 on windows. I followed the instructions exactly. What else could be causing such a problem? Am I missing something?

Share this post


Link to post
Share on other sites
Advertisement
I've googled the problem and can't seem to find anything useful.
Unfortunately the thread you linked to was one that came up in my search results.

The input:
gprof "F:\programming\Projects\CenotiaEngine\DebugBuild\ProjectEngine.exe" "F:\programming\Projects\CenotiaEngine\DebugBuild\gmon.out"


The output:
gprof: F:\programming\Projects\CenotiaEngine\DebugBuild\ProjectEngine.exe: not in a.out format

I've tried silly things like renaming my exe to a.out. I've switched around the arguments to gprof. Does gprof not cooperate well with windows executables? I assumed (perhaps wrongly) that a windows build of gprof would be compatible with windows executables.

Share this post


Link to post
Share on other sites
Windows executables are in PE format - not ELF, not a.out. If MinGW32 were to produce a program in a.out format, it would not run on Windows.

Share this post


Link to post
Share on other sites
Quote:
Original post by Fruny
Windows executables are in PE format - not ELF, not a.out. If MinGW32 were to produce a program in a.out format, it would not run on Windows.


So, I'm running gprof in windows and it can only profile 'nix applications? [disturbed]

Looks like I need a new profiler.

Any suggestions for a profiler that will play nicely with mingw and windows applications?

ratings++ for all.

Share this post


Link to post
Share on other sites
Quote:
Original post by aaron_ds
So, I'm running gprof in windows and it can only profile 'nix applications? [disturbed]


I don't know. Where did you get that gprof from?

Share this post


Link to post
Share on other sites
Fruny, yeah, I came to the same conclusion. I download a version of gprof from some[random] website.

Upon looking in mingw/bin I found a more useful version of gprof.

Thanks for your help everyone, dumb mistake on my part.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!