[9] RFR (XS): 8151623: Zap freed Metaspace chunks in non-product binaries
Jon Masamitsu
jon.masamitsu at oracle.com
Thu Mar 10 22:48:08 UTC 2016
On 03/10/2016 02:15 PM, Vladimir Ivanov wrote:
> Jon, something like the following?
> http://cr.openjdk.java.net/~vlivanov/8151623/webrev.02/
Yes, like that.
The change in the Metachunk constructor changes semantics in that
the original code mangled the whole chunk, not just the payload. I'd
prefer that the original code is left. The little bit of code
duplication is
OK.
http://cr.openjdk.java.net/~vlivanov/8151623/webrev.02/src/share/vm/memory/metachunk.hpp.frames.html
Please use the style "word_value" instead of "wordValue".
If there is a mistake in the mangling of a Metablock, that would
show up when the Metaspace shrinks. Can you check that the testing
has some Metaspace shrinking. I think that -Xlog:gc*=trace would
show the needed output.
Jon
>
> Best regards,
> Vladimir Ivanov
>
> On 3/11/16 12:40 AM, Jon Masamitsu wrote:
>> Vladimir,
>>
>> http://cr.openjdk.java.net/~vlivanov/8151623/webrev.00/src/share/vm/memory/metachunk.cpp.frames.html
>>
>>
>>
>> Did you consider adding the "wordValue" parameter
>>
>> 101 static void overwrite_chunk_payload(Metachunk* chunk, juint
>> wordValue) {
>>
>> to the original Metachunk::mangle() so that it becomes
>>
>> 101 void Metachunk::mangle(juint wordValue) { ... 106
>> Copy::fill_to_words(start, size, wordValue);
>>
>>
>> Jon
>>
>> On 03/10/2016 10:55 AM, Vladimir Ivanov wrote:
>>> http://cr.openjdk.java.net/~vlivanov/8151623/webrev.00
>>> https://bugs.openjdk.java.net/browse/JDK-8151623
>>>
>>> Zap freed Metaspace chunks in non-product binaries to catch stray
>>> accesses to unloaded classes.
>>>
>>> Testing: JPRT, RBT (in progress): hotspot/test:hotspot_all,
>>> jdk/test:tier1 & tier2, vm.parallel_class_loading.testlist,
>>> vm.gc.testlist, BigApps w/ fastdebug binaries.
>>>
>>> Thanks!
>>>
>>> Best regards,
>>> Vladimir Ivanov
>>
More information about the hotspot-dev
mailing list