RFR: 8334866: Improve Speed of ElfDecoder source search [v4]

Kerem Kat krk at openjdk.org
Fri Oct 24 14:30:50 UTC 2025


On Wed, 22 Oct 2025 11:26:05 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> src/hotspot/share/utilities/elfFile.cpp line 695:
>> 
>>> 693:   } else {
>>> 694:     DWARF_LOG_INFO("Falling back to linear scan of .debug_aranges for '%s'", filepath());
>>> 695:     DebugAranges debug_aranges(this);
>> 
>> This honestly looks like we want to pull `DebugAranges` up to be a permanent member of `DwarfFIle`, and put the cache there? This would also resolve fairly awkward passing `ArangeCache&` around, since `DebugAranges` itself would do most of the heavy-lifting, including managing its own (internal) cache. Is there anything in the way of doing so?
>
> I was about to ask the same. Since we have an easy caching mechanism and `.debug_aranges` does not change, we could hide the cache inside `DebugAranges`. Then from the `DwarfFile` point of view, it does not need to care about how the queries to `DebugAranges` are actually answered and we have a better separation of concerns.

Thanks, makes it simpler. I am moving them around.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27337#discussion_r2460767815


More information about the hotspot-dev mailing list