[9] RFR (M): 8149741: Don't refer to stub entry points by index in external_word relocations
Vladimir Kozlov
vladimir.kozlov at oracle.com
Thu Feb 18 03:52:35 UTC 2016
Nice clean up!
On 2/17/16 7:21 AM, Vladimir Ivanov wrote:
> 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/
Good.
>
> 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/
Good.
>
> Different cleanups in StubCodeDesc implementation. Simplified iteration
> over the list and PrintStubCode support.
>
> (3) http://cr.openjdk.java.net/~vlivanov/8149741/webrev.00.index/
Casts should be the same:
(uintptr_t)target >= (uint)os::vm_page_size()
Why in assembler_windows_x86.cpp you used NULL_WORD and not simple NULL?
NULL_WORD is used for integer values and NULL for pointers
which is this case.
Thanks,
Vladimir K
>
> 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