Community
cancel
Showing results for 
Search instead for 
Did you mean: 
xiaozhu_kang
Beginner
74 Views

help!problem to generate line number and symbol when using Vtune to profile apache

I am trying to profile the cost of the component in apache using vtune today. I am having some problem to generate debug information (line number and symbol link) for vtune. basically when i do the call graph activity, vtune shows "function instrument to main modules was skipped". Looks like it can't go to function level, and when i do sampling activity, if i want it to display sources for selected hotspots, then it will say " [source view] warning -Line Number information is not available for this range. only disassembly view is availalbe."


I install apache as follows, by default, the downloaded source code and installation directories are different of course as follows:

$ cd $BENCH/src/httpd-2.2.11
$ CFLAGS="-g -O3 -march=nocona" ./configure \
>     --enable-ssl --enable-so --with-mpm=worker --prefix=$BENCH/apache2
$ make
$ make install
i am not sure whether the configure file helps me to add debug information or not. Or vtune can't find the source code?
does anybody know whether there is a way for me to tell vtune explicity where the source code are?
another question is for big applications like apache, there are a few source code directories.
I don't know what i can do to make vtune do instrument in the function level. pls help!

0 Kudos
3 Replies
TimP
Black Belt
74 Views

I suppose you'd want to check whether your -g compile flag is being passed into all relevant generated Makefiles, if the build works that way, and also check whether it is passed to the linking commands.
Capture the log of the build to see whether the -g is present everywhere you need it.
If VTune sees that the code in question was built and linked with -g, and doesn't find the source code, it should produce a pop-up asking you to browse to it.
Peter_W_Intel
Employee
74 Views


It's your responsibility to check if your main module was compiled with "-g" option.

"... vtune shows "function instrument to main modules was skipped" " - You have to clean up call graph's cacheand run call graph again.

For "...vtune can't find the source code?" - please use "vtl global-options" to view current configuration, then use " vtl global-options source_search_dirs="dir" ", then run vtlec in this console.

Thanks, Peter
David_A_Intel1
Employee
74 Views

BTW, "skipped" just means the VTune analyzer did not NEED to instrument these modules AGAIN. Once they are instrumented, they are saved in a cache. Unless you rebuild the modules, the cached copies can be used instead of re-instrumenting.

Reply