-qp switch usage

-qp switch usage

How do I make use of -qp switch? the help file says it compiles and links for function profiling with UNIX gprof tool. I used this switch to compile the application but did not seem to get any output file. The "gprof" toolin Linux saysthe profile data is taken from the call graph profile file. (gmon.out default) which is created program that are compiled with -pg option of "cc","pc" and "f77". The -pg option also links in versions of the library routines that are compied for profiling. it seems to me that Ineed to get "gmon.out"to run gprof, but -qp switch in the intelcompiler did not seem to bethe same as -pg in the native linux compiler?

Thank.

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

As far as I know, for 32-bit and EM64T icc, -qp has the same effect as -pg. -pg works normally with gprof, for profiling by function. For the Itanium compiler, there is no -pg, but -p works. The option is required at link time, simply to make the profiling start, and to write out gmon.out at normal termination. gmon.out will not be created if a C program terminates other than by a return from main(). A program has to run for at least a few seconds, before gprof profiling could give much useful data.

Login to leave a comment.