[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug default/25042] abidw aborts on clang compiled gdbm shared library



https://sourceware.org/bugzilla/show_bug.cgi?id=25042

--- Comment #4 from dodji at redhat dot com ---
"mark at klomp dot org" <sourceware-bugzilla@sourceware.org> writes:

> I see compare_dies_string_attribute_value () does, so it can do a pointer
> comparison instead of doing a full string comparison.

[...]

Right we really need that optimization because we do type de-duplication
at the DWARF level. 

> How much "speedup" do you get from that "optimization"?

String comparisons dominates the profile when doing type de-duplication.
I don't recall the speed-up right now (I've worked on tons of speed
optimizations left and right, all guided by careful profiling), but
suffice it to say that the string comparison was absolutely necessary to
make the speed of the de-duplication (at the DWARF level) be acceptable
at the time.  The de-duplication itself being a major size optimization.

This is of course in the context of huge C binaries like the linux
kernel.  I haven't implemented this for C++ binaries yet, but at some
point I think it'll be necessary to look into it as we still have bugs
open about libabigail being slow on huge C++ binaries.

> But I think the logic there is broken, especially when dealing with
> split-dwarf DWO files.

Well, libabigail doesn't yet support DWO files, so I wouldn't worry
about that at this point.

When we do support split-dwarf DWO files, then my understanding is that
type de-duplication would then be un-necessary because the
de-duplication would have been done by the DWARF emitter already, by
construction.  At that point, this optimization will be unnecessary,
hopefully.

But until then and for all the cases where we need to support non-DWO
files, I think this optimization will be necessary.  Anyhow, this
comparison speed-up is encapsulated at one place so when it becomes
unnecessary, it's easy to do away with.

So should we really worry about this?

-- 
You are receiving this mail because:
You are on the CC list for the bug.