This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/17822] New: Loading shared library is magnitude slower than run a program + dlopen/depend on the same library
- From: "myocytebd at sina dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 09 Jan 2015 14:45:20 +0000
- Subject: [Bug gdb/17822] New: Loading shared library is magnitude slower than run a program + dlopen/depend on the same library
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=17822
Bug ID: 17822
Summary: Loading shared library is magnitude slower than run a
program + dlopen/depend on the same library
Product: gdb
Version: 7.8
Status: NEW
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: myocytebd at sina dot com
Loading shared library is extremely slow, compared to load a program and dlopen
Platform:
Ubuntu 13.10, gdb-7.6
Ubuntu 14.10, gdb-7.8
Problem:
Use "file" command to directly load a shared library is extremely slow.
Magnitudes slower than loading a program that dlopen(), or simply depends on
the same library.
Details:
There is a (symbol-wise) light program programX, which at run-time, dlopen() a
few heavy libraries libA, libB, libC ...
1. gdb programX and run. It takes ~10 minutes to load all libraries.
2. gdb -ex "file libA" alone, takes > 1 hour, maybe infinitely. (I killed it)
(Loading individual shared library was used to generate gdb-index.)
"sudo perf top" top rankers are stable
8.87% libc-2.19.so [.] _IO_file_seekoff@@GLIBC_2.2.5
8.85% libc-2.19.so [.] __lseek_nocancel
8.27% [kernel] [k] system_call
7.31% libc-2.19.so [.] fseeko
6.75% libc-2.19.so [.] _IO_fread
6.63% [kernel] [k] system_call_after_swapgs
6.62% [kernel] [k] __fget_light
4.39% gdb [.] bfd_seek
3.85% [kernel] [k] ext4_llseek
3.66% gdb [.] _bfd_generic_get_section_contents
3.39% libc-2.19.so [.] _IO_file_xsgetn
3.38% [kernel] [k] sys_lseek
3.07% gdb [.] bfd_get_section_contents
1.88% gdb [.] bfd_bread
1.84% [kernel] [k] sysret_check
1.84% [kernel] [k] __fdget_pos
1.68% gdb [.] bfd_getl32
1.47% [kernel] [k] generic_file_llseek_size
1.22% libc-2.19.so [.] _IO_seekoff_unlocked
0.96% libc-2.19.so [.] __memcpy_sse2
0.73% gdb [.] 0x00000000002b31c0
0.62% libc-2.19.so [.] _IO_sgetn
0.61% libc-2.19.so [.] _IO_file_seek
0.55% [kernel] [k] copy_user_generic_string
0.50% [kernel] [k] system_call_fastpath
--
You are receiving this mail because:
You are on the CC list for the bug.