Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4994 Discussions

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

xiaozhu_kang
Beginner
289 Views

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
Honored Contributor III
289 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.
0 Kudos
Peter_W_Intel
Employee
289 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
0 Kudos
David_A_Intel1
Employee
289 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.

0 Kudos
Reply