rui314 / mold

Mold: A Modern Linker 🦠
MIT License
13.69k stars 448 forks source link

Very slow symbol lookup speed with gdb #1278

Closed user202729 closed 1 week ago

user202729 commented 3 weeks ago

To reproduce:

Any idea why? (could also be gdb's fault though)

Searching on gdb's bug database, there is https://sourceware.org/bugzilla/show_bug.cgi?id=30008 which talks about gdb being unable to read gdb_index generated by mold (the issue is still open). i

rui314 commented 1 week ago

What is your mold version? I tried that on Ubuntu 20.04 and Ubuntu 24.04 in Docker, and I couldn't see the difference (e.g. 2.287s vs. 0m2.169s.)

user202729 commented 1 week ago

@rui314 Latest master (at the time of reporting).

Any idea how might I debug it? (I try running gdb under perf record to make a flamegraph maybe?)


My g++ version is 11.4.0 and gdb version is 12.1, I'm using Ubuntu 22.4. But you tried it on both surrounding Ubuntu versions and can't reproduce it...

user202729 commented 1 week ago

Strangely enough, the issue is no longer reproducible for me.

Guess I'll close it for now.