From: "Greg Galperin" <grg22@...>
Sent: Saturday, March 16, 2002 3:25 AM
> Hi oprofilers,
hi,
> I'm having trouble with op_to_source (both 0.0.9 and a current cvs
version)
> and am looking for help.
>
> Briefly, I'm trying to op_to_source a shlib, and it only annotates 2 files
> of a couple hundred which went into the shlib, dozens of which had funcs
> show up in oprofpp output with hundreds or thousands of samples.
>
> oprofpp sure seems to know a log about the library:
>
> [1895]oprofpp -demangle -l /proj/libzz.so | wc
> 6617 64531 816959
this count all symbols even those w/o any samples neither debug info,
op_to_source deals only with symbols wiich receive samples and
have debug information.
> but when I try to run op_to_source, it only processes two files, and
> doesn't really give any useful info. It does seem to recognize those two
> files and copies over the source correctly and annotate them slightly, so
I
> don't suspect a path or lib name problem (plus, the oprofpp output seems
> completely reasonable).
are you sure all object file used to build the shared libs contains
debug info ? oprofpp -l does not need debugs info but op_to_source
needs them. Try objdump -d -S on the shared libs and look for
imbeded source inside assembly.
> [1896]op_to_source -d -i /proj/libzz.so --source-dir
> $SOURCEDIR --output-dir /tmp/grg/oprof-annotated-source
[snip diff annotated source/source show small difference]
>
> Also, that the one symbol op_to_source named in debug.cpp isn't actually
> in that file or referenced by anything anywhere 'below' that file.
perhaps a corner case like an inline function or a template
instantation invoked through an implicit call to a base class
ctor. What is the symbol name?
> Again, oprofpp does seem to correctly show many symbols which are in many
> different files in that same source dir. Shouldn't I expect to see many
> of them get annotated by op_to_source?
only if debug info are present, in this case if op_to_source can't open
the source file for any reason it should warn else it fails silently (debug
info missing are a quite common case and so on op_to_source does
not complain for symbol w/o debug info)
> Perhaps I'm just using the wrong command-line features? I have tried to
> play with them (e.g. adding "-w 0") with no change, and this general
> format does seem to work for me on simple executables. The behavior
> is the same for 0.0.9 and the cvs head.
nope plain op_to_source w/o any options should shows all source
wich contains at least one sample.
As a last hint, I commited (03-13) a fix against a problem with
gcc-2.95.3 and debug info.
regards,
Philippe Elie
|