Bug 113032 - Failed analysis of shared libraries with .debug files
Failed analysis of shared libraries with .debug files
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: oprofile (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: William Cohen
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-07 11:54 EST by William Cohen
Modified: 2007-04-18 13:01 EDT (History)
0 users

See Also:
Fixed In Version: oprofile-0.8-0.20040121.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-01-22 17:38:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description William Cohen 2004-01-07 11:54:01 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030922

Description of problem:
Shared libraries (.so files) leave the symbols for the functions in
the code. The .debug file only has the debugging information with line
information. When analyzing the shared library OProfile checks to see
if there is a corresponding .debug file for the .so file. If the
debuginfo rpm is installed, the .debug file for the shared libraries
is used rather than the shared library. However, all the symbols are
in the .so file, not the .debug file. OProfile's opreport cannot
generate per-function accounting of the samples when there is a valid
.debug file for the shared library.

Either the .debug file needs to have the symbols or OProfile needs to
check the .so file for symbols.

Version-Release number of selected component (if applicable):
oprofile-0.7.1-0.20031124.3

How reproducible:
Always

Steps to Reproduce:
1. With machine with OProfile set up collect some samples. As root

/usr/bin/opcontrol --setup --vmlinux=/boot/vmlinux-`uname -r`
/usr/bin/opcontrol --start
/usr/bin/opcontrol --dump

2. Find a .so file with samples

opreport --long-filenames
(pick out .so with samples, e.g. /lib/ld-2.3.2.so)

rpm -qf /lib/ld-2.3.2.so
(install debuginfo rpm for the associated rpm)
rpm -Uvh glibc-debuginfo-2.3.2-101.1

3. opreport -l image:/lib/ld-2.3.2.so
    

Actual Results:  get (no symbols) for the shared libaries

$ opreport -l image:/lib/ld-2.3.2.so
CPU: P4 / Xeon, speed 2386.63 MHz (estimated)
Counted GLOBAL_POWER_EVENTS events (time during which processor is not
stopped) with a unit mask of 0x01 (count cycles when processor is
active) count 100000
samples  %        symbol name
137      100.000  (no symbols)


Expected Results:  list out samples for the functions in
/lib/ld-2.3.2.so like the following


$ opreport -l image:/lib/ld-2.3.2.so
CPU: P4 / Xeon, speed 2386.63 MHz (estimated)
Counted GLOBAL_POWER_EVENTS events (time during which processor is not
stopped) with a unit mask of 0x01 (count cycles when processor is
active) count 100000
samples  %        symbol name
621      71.6263  _dl_sysinfo_int80
60        6.9204  do_lookup_versioned
26        2.9988  strcmp
19        2.1915  _dl_lookup_versioned_symbol_internal
14        1.6148  _dl_map_object_from_fd
...

Additional info:

opreport analysis will work if the debuginfo rpm for the shared
library is removed.

Note You need to log in before you can comment on or make changes to this bug.