[9] RFR (M): 8149741: Don't refer to stub entry points by index in external_word relocations
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Wed Feb 17 15:21:49 UTC 2016
http://cr.openjdk.java.net/~vlivanov/8149741/webrev.00/
https://bugs.openjdk.java.net/browse/JDK-8149741
As a followup on the discussion about using indexes instead of raw
addresses in external relocations [1], here's the request for removal of
the corresponding logic.
To ease reviewing I splitted the changes into 3 groups:
(1) http://cr.openjdk.java.net/~vlivanov/8149741/webrev.00.removal/
Get rid of runtime_address_to_index/index_to_runtime_address functions
and adjust pack_data_to/unpack_data in external_word_Relocation to
operate on raw addresses.
(2) http://cr.openjdk.java.net/~vlivanov/8149741/webrev.00.cleanup/
Different cleanups in StubCodeDesc implementation. Simplified iteration
over the list and PrintStubCode support.
(3) http://cr.openjdk.java.net/~vlivanov/8149741/webrev.00.index/
Cleaned up some outdated usages of ExternalAddress. Its constructor
adjusts relocation type according to address. For NULL address it
doesn't create a relocation and there's no need in special cases then.
Also, I looked through all ExternalAddress usages, but didn't find any
places where values which aren't external addresses are used [2]. So, I
converted is_reloc_index check into an assert in
external_word_Relocation::can_be_relocated(). Let me know if you see any
problems with that.
Testing: hotspot regression tests, JPRT.
Thanks!
Best regards,
Vladimir Ivanov
[1]
http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2016-February/021354.html
[2]
static relocInfo::relocType reloc_for_target(address target) {
// Sometimes ExternalAddress is used for values which aren't
// exactly addresses, like the card table base.
// external_word_type can't be used for values in the first page
// so just skip the reloc in that case.
return external_word_Relocation::can_be_relocated(target) ?
relocInfo::external_word_type : relocInfo::none;
}
More information about the hotspot-compiler-dev
mailing list