[Bug binutils/13897] New: objdump (ppc64) performance has severely degraded in the binutils 2.22.52_0322

View: New views
12 Messages — Rating Filter:   Alert me  

[Bug binutils/13897] New: objdump (ppc64) performance has severely degraded in the binutils 2.22.52_0322

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

| View Threaded | Show Only this Message

http://sourceware.org/bugzilla/show_bug.cgi?id=13897

             Bug #: 13897
           Summary: objdump (ppc64) performance has severely degraded in
                    the binutils 2.22.52_0322
           Product: binutils
           Version: 2.22
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: unassigned@...
        ReportedBy: johnhrusso@...
    Classification: Unclassified


Created attachment 6300
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6300
tarball containing ELF file I used to test.

We're disassembling the attached file with:

./objdump -d -S -x mtwx53252-core0.elf > out

With binutils 2.22.51, this disassembly happens in

real    0m6.501s
user    0m6.475s
sys    0m0.018s

With binutils 2.22.52 0322 snaphsot, I get:

real    12m23.685s
user    9m0.350s
sys    3m19.035s

12 minutes now vs. 6 seconds previously.

The -S flag is key, performance is fine if -S is excluded from the command.

target:
mtwx53252-core0.elf: ELF 64-bit MSB executable, 64-bit PowerPC or cisco 7500,
version 1 (SYSV), statically linked, not stripped

host:
./objdump -v
GNU objdump (GNU Binutils) 2.22.52.20120322

uname -a
Linux  2.6.35.6-45.fc14.x86_64 #1 SMP Mon Oct 18 23:57:44 UTC 2010 x86_64
x86_64 x86_64 GNU/Linux

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@...
https://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug binutils/13897] objdump (ppc64) performance has severely degraded in the binutils 2.22.52_0322

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

| View Threaded | Show Only this Message

http://sourceware.org/bugzilla/show_bug.cgi?id=13897

John Russo <johnhrusso at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |ELF 64-bit MSB executable,
                   |                            |64-bit PowerPC
                 CC|                            |johnhrusso at gmail dot com
               Host|                            |Linux
                   |                            |2.6.35.6-45.fc14.x86_64

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@...
https://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug binutils/13897] objdump (ppc64) performance has severely degraded in the binutils 2.22.52_0322

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

| View Threaded | Show Only this Message

http://sourceware.org/bugzilla/show_bug.cgi?id=13897

--- Comment #1 from Nick Clifton <nickc at redhat dot com> 2012-04-02 09:44:31 UTC ---
Created attachment 6311
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6311
Speed up opd_entry_value() when there are no relocs.

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@...
https://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug binutils/13897] objdump (ppc64) performance has severely degraded in the binutils 2.22.52_0322

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

| View Threaded | Show Only this Message

http://sourceware.org/bugzilla/show_bug.cgi?id=13897

Nick Clifton <nickc at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING
                 CC|                            |nickc at redhat dot com

--- Comment #2 from Nick Clifton <nickc at redhat dot com> 2012-04-02 09:45:06 UTC ---
Hi John,

  Please could you try out the uploaded patch and let me know if it works for
you.

Cheers
  Nick

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@...
https://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug binutils/13897] objdump (ppc64) performance has severely degraded in the binutils 2.22.52_0322

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

| View Threaded | Show Only this Message

http://sourceware.org/bugzilla/show_bug.cgi?id=13897

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2012-04-11 14:16:18 UTC ---
CVSROOT:    /cvs/src
Module name:    src
Changes by:    nickc@...    2012-04-11 14:16:10

Modified files:
    bfd            : ChangeLog elf64-ppc.c

Log message:
    PR binutils/13897
    * elf64-ppc.c (opd_entry_value): When dealing with sections
    without relocs, keep the last section loaded in order to avoid
    unnecessary reloads.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&r1=1.5647&r2=1.5648
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf64-ppc.c.diff?cvsroot=src&r1=1.378&r2=1.379

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@...
https://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug binutils/13897] objdump (ppc64) performance has severely degraded in the binutils 2.22.52_0322

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

| View Threaded | Show Only this Message

http://sourceware.org/bugzilla/show_bug.cgi?id=13897

Nick Clifton <nickc at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Nick Clifton <nickc at redhat dot com> 2012-04-11 14:58:32 UTC ---
Fixed.

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@...
https://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug binutils/13897] objdump (ppc64) performance has severely degraded in the binutils 2.22.52_0322

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

| View Threaded | Show Only this Message

http://sourceware.org/bugzilla/show_bug.cgi?id=13897

--- Comment #5 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2012-06-01 12:27:05 UTC ---
CVSROOT:    /cvs/src
Module name:    src
Changes by:    amodra@...    2012-06-01 12:26:56

Modified files:
    bfd            : ChangeLog elf64-ppc.c

Log message:
    PR binutils/13897
    * elf64-ppc.c (opd_entry_value): Rewrite cache code.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&r1=1.5716&r2=1.5717
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf64-ppc.c.diff?cvsroot=src&r1=1.385&r2=1.386

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@...
https://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug binutils/13897] objdump (ppc64) performance has severely degraded in the binutils 2.22.52_0322

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

| View Threaded | Show Only this Message

http://sourceware.org/bugzilla/show_bug.cgi?id=13897

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |amodra at gmail dot com
         Resolution|FIXED                       |
         AssignedTo|unassigned at sourceware    |amodra at gmail dot com
                   |dot org                     |

--- Comment #6 from Alan Modra <amodra at gmail dot com> 2012-06-02 13:06:44 UTC ---
That last patch, while correcting the caching in opd_entry_value, makes
addr2line, objdump -S etc. as slow as it was before.  In fact, the cache makes
it even slower!  When you consider that opd_entry_value gets called from a loop
over symbols within elf_find_function, the reason is obvious: We sequentially
look at all function symbols on each call to elf_find_function so nothing can
be cached.  Well, there may be some benefit in caching the entire .opd section
to avoid making syscalls, but it turns out the section search in
opd_entry_value is the most expensive operation.  Investigating..

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@...
https://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug binutils/13897] objdump (ppc64) performance has severely degraded in the binutils 2.22.52_0322

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

| View Threaded | Show Only this Message

http://sourceware.org/bugzilla/show_bug.cgi?id=13897

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |ASSIGNED

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@...
https://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug binutils/13897] objdump (ppc64) performance has severely degraded in the binutils 2.22.52_0322

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

| View Threaded | Show Only this Message

http://sourceware.org/bugzilla/show_bug.cgi?id=13897

--- Comment #7 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2012-06-03 04:08:16 UTC ---
CVSROOT:    /cvs/src
Module name:    src
Changes by:    amodra@...    2012-06-03 04:08:07

Modified files:
    bfd            : ChangeLog elf-bfd.h elf.c elf64-ppc.c

Log message:
    PR binutils/13897
    * elf.c (elf_find_function): Cache last function sym info.
    (_bfd_elf_maybe_function_sym): Return function size, pass in
    section of interest.
    * elf-bfd.h (struct elf_backend_data <maybe_function_sym>): Likewise.
    (_bfd_elf_maybe_function_sym): Likewise.
    * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
    (opd_entry_value): Add in_code_sec param.  Revert caching code.
    Return -1 if in_code_sec and function found in wrong section.
    Update all calls.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&r1=1.5718&r2=1.5719
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf-bfd.h.diff?cvsroot=src&r1=1.340&r2=1.341
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf.c.diff?cvsroot=src&r1=1.556&r2=1.557
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf64-ppc.c.diff?cvsroot=src&r1=1.386&r2=1.387

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@...
https://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug binutils/13897] objdump (ppc64) performance has severely degraded in the binutils 2.22.52_0322

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

| View Threaded | Show Only this Message

http://sourceware.org/bugzilla/show_bug.cgi?id=13897

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #8 from Alan Modra <amodra at gmail dot com> 2012-06-03 04:09:14 UTC ---
Fixed.

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@...
https://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug binutils/13897] objdump (ppc64) performance has severely degraded in the binutils 2.22.52_0322

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

| View Threaded | Show Only this Message

http://sourceware.org/bugzilla/show_bug.cgi?id=13897

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #7 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2012-06-03 04:08:16 UTC ---
CVSROOT:    /cvs/src
Module name:    src
Changes by:    amodra@...    2012-06-03 04:08:07

Modified files:
    bfd            : ChangeLog elf-bfd.h elf.c elf64-ppc.c

Log message:
    PR binutils/13897
    * elf.c (elf_find_function): Cache last function sym info.
    (_bfd_elf_maybe_function_sym): Return function size, pass in
    section of interest.
    * elf-bfd.h (struct elf_backend_data <maybe_function_sym>): Likewise.
    (_bfd_elf_maybe_function_sym): Likewise.
    * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
    (opd_entry_value): Add in_code_sec param.  Revert caching code.
    Return -1 if in_code_sec and function found in wrong section.
    Update all calls.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&r1=1.5718&r2=1.5719
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf-bfd.h.diff?cvsroot=src&r1=1.340&r2=1.341
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf.c.diff?cvsroot=src&r1=1.556&r2=1.557
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf64-ppc.c.diff?cvsroot=src&r1=1.386&r2=1.387

--- Comment #8 from Alan Modra <amodra at gmail dot com> 2012-06-03 04:09:14 UTC ---
Fixed.

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@...
https://lists.gnu.org/mailman/listinfo/bug-binutils