Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Problems with -profile-functions option

Ulrich_W_
Beginner
523 Views

Hi!

I am getting familiar with the icpc compiler and tried the -profile-functions option.

To test it I wrote an extended hello world program which defines and calls some functions.

But in the output only main() shows up.

Does anybody have an idea what goes wrong here?

 

Thanks in advance

0 Kudos
4 Replies
TimP
Honored Contributor III
523 Views

I suppose, if you have compiled in a manner which invokes in-lining, you will need to add " -debug inline-debug-info" in hopes of seeing individual identification of the functions.  If that doesn't work, -fno-inline-functions, or separate compilations of the functions split into individual files without -ipo, might be attempted. 

By the way, as many of us are being forced into using Windows 8.x on the forums, I'll note that the way I found to look up the docs is to browse down directly into the compiler installation to find the .chm file.  It seems Microsoft has ruled out the ways used in the past to make the documentation available on menus.  There is supposed to be some sort of Metro button, but I can't find it.

0 Kudos
Ulrich_W_
Beginner
523 Views

Hi!

Thanks for the quick reply!!

Well, there is no inlining used and no optimisation. I compile under Linux from the command line, btw... ;-)

The documentation could be improved in any case.

0 Kudos
Ulrich_W_
Beginner
523 Views

Hi!

Just in case someone else has the same problem:
The solution is to add the option "-inline-max-size=0" to prevent the compiler from inlining small methods and thereby eliminating them.

You would think that an option like -profile-functions would tell the compiler already that a performance bottleneck analysis is going on and leave the methods where they are...

0 Kudos
Fontes__Fabio
Beginner
523 Views

in windows use /Qinline-max-size:0

0 Kudos
Reply