Vtune and MinGW

Vtune and MinGW

I have problems using Vtune Analyzer to profile a an open source project (the origami tool TreeMaker to be specific) which has been build using the MinGW-Compiler for the Win-64-bit plattform.When building the project I have specified the compiler flag "-g3".In the vtune project settings I have specified the directory which include the source files.
After runing the VTune analyzer I see a call stack full of [treemaker.exe] and no function names. An when clicking on one of these items I get an error "Failed to show source and assembly code."How can I get more information what is going wrong?Does anyone have experience with using VTune in combination with MinGW?Thanks,Constantin

12 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Constantin,

You are not alone.

This is a known issue, and treated as "new feature request".

Regards, Peter

Hi Peter,ok, this is good to know. Can you tell me what the problem exactly is?Does Vtune not understand the debug symbols written by gcc?Regards,Constantin

Yes. VTune doesn't recognize debug infogenerated bymingw gcc...that is a new feature request.

Regards, Peter

Hi Peter,thanks for clarification.However, I am still a little confused: mingw supports different debug standards- f.e. stabs, dwarf-2.And as far as I know VTune also supports those standars - or is it just the linux version which supports them?Regards,Constantin

Best Reply

Hi Constantin,

You are right, again:-)

MinGW produces DWARF format.The toolsupports DWARF on Linux, but not for Windows PE executable format.

This is a new feature request.

Regards, Peter

Any update on this? I tried profiling a gcc target on windows, and noticed I am at least getting mangled function names and can look at the assembly, but not at the source code.P.S. can the status of feature requests like this be tracked somewhere?

This issue is still a feature request, will be considered in furture release,absolutely is tracked.

I will update the status,when itis ready.

Now you can use VTune to profile your windows apps builded with gcc. Download the latest version of VTune and pass the next options to gcc: "-g3 -gdwarf-2".

Thanks Alexei.

This new feature is ready in VTune(TM) Amplifier XE 2013 Update 7. 

It's working for a cygwin64 mixed Fortran/C build.  I never would have guessed the necessary debug symbol options.

By the way, even older versions of MinGW C++ compiler ( like, 3.4.2 ) support -gdwarf-2 option. For example, here is a complete list of options related to debugging information:
...
-g - Generate debug information in default format
-gcoff - Generate debug information in COFF format
-gdwarf-2 - Generate debug information in DWARF v2 format
-ggdb - Generate debug information in default extended format
-gstabs - Generate debug information in STABS format
-gstabs+ - Generate debug information in extended STABS format
-gvms - Generate debug information in VMS format
-gxcoff - Generate debug information in XCOFF format
-gxcoff+ - Generate debug information in extended XCOFF format
...

Leave a Comment

Please sign in to add a comment. Not a member? Join today