RFR(S) 8193318: ELF decoder should be able to use external debug info file

Andrew Dinn adinn at redhat.com
Wed Mar 14 17:16:01 UTC 2018


On 14/03/18 16:42, Mikael Vidstedt wrote:
> 
>> On Mar 14, 2018, at 4:52 AM, coleen.phillimore at oracle.com wrote:
>>
>>
>> Hi, I looked at this and I really wasn't happy with all this extra code going into the JVM.  And I don't know this code.  There's a large hex table in this file:
>>
>> http://cr.openjdk.java.net/~zgu/8193318/webrev.00/src/hotspot/os/linux/decoder_linux.cpp.udiff.html <http://cr.openjdk.java.net/~zgu/8193318/webrev.00/src/hotspot/os/linux/decoder_linux.cpp.udiff.html>
> 
> I’m also curious - what is that code actually doing? Why is that hex table needed?
If you look throught the code Zhengyu is patching it is used in
gnu_debuglink_crc32 which gets called by verify_file_crc which is called
from LinuxElfDebugInfo::by_debug_link which is called by
ElfFile::load_debuginfo.

The point of calling verify_file_crc is to ensure that the crc stored in
the Elf debuginfo file matches the calue computed from the file
contents. The table is needed to do the crc computation.

The same table appears in the CRC intrinsic implementation in e.g. the
AArch64 directory (look in stubRoutines_aarch64.cpp). I guess it is also
in the equivalent x86 and sparc code. Hmm, looks like we now have an
os-specific copy too!

regards,


Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander


More information about the hotspot-runtime-dev mailing list