code review request for MacOS X compressed oops work around (7118648)
David Holmes
david.holmes at oracle.com
Tue Dec 6 22:08:30 PST 2011
On 7/12/2011 2:51 PM, Vladimir Kozlov wrote:
> Could you move the comment before #ifndef __APPLE__?
I second that.
If you didn't want the flag turned on at all you could use the
UNSUPPORTED_OPTION macro.
David
> Vladimir
>
> Daniel D. Daugherty wrote:
>> Greetings,
>>
>> The UseCompressedOops flag is enabled ergonomically in a 64-bit VM.
>> With MacOS X, we're seeing intermittent crashes in our automated
>> build/test system (JPRT) that look like this:
>>
>> Internal Error
>> (/private/tmp/jprt/P1/050642.jmelvin/source/src/share/vm/runtime/virtualspace.cpp:460),
>> pid=53634, tid=4531154944
>> # assert((_noaccess_prefix != 0) == (UseCompressedOops && _base !=
>> NULL && (size_t(_base + _size) > OopEncodingHeapMax) &&
>> Universe::narrow_oop_use_implicit_null_checks())) failed:
>> noaccess_prefix should be used only with non zero based compressed oops
>>
>> I have filed the following bug to track that failure mode:
>>
>> 7118647 3/3 compressed oops crashes on MacOS X with JPRT GCBasher test
>>
>> In order to make more reliable progress on getting MacOS X fully
>> enabled in JPRT, I'm planning to disable compressed oops by default
>> in the 64-bit MacOS X VM until 7118647 can be fixed.
>>
>> The work around is trivial so I'm including it here rather than
>> generate a webrev:
>>
>> diff -r a5a9db0e0203 src/share/vm/runtime/arguments.cpp
>> --- a/src/share/vm/runtime/arguments.cpp Tue Dec 06 07:23:42 2011 -0800
>> +++ b/src/share/vm/runtime/arguments.cpp Tue Dec 06 15:29:17 2011 -0800
>> @@ -1359,9 +1359,12 @@
>> // by ergonomics.
>> if (MaxHeapSize <= max_heap_for_compressed_oops()) {
>> #if !defined(COMPILER1) || defined(TIERED)
>> +#ifndef __APPLE__
>> + // disable UseCompressedOops by default on MacOS X until 7118647 is
>> fixed
>> if (FLAG_IS_DEFAULT(UseCompressedOops)) {
>> FLAG_SET_ERGO(bool, UseCompressedOops, true);
>> }
>> +#endif // !__APPLE__
>> #endif
>> #ifdef _WIN64
>> if (UseLargePages && UseCompressedOops) {
>>
>>
>> What the above code does is prevent the UseCompressedOops flag
>> from being set to true ergonomically on MacOS X. It can still be
>> set to true with the '-XX:+UseCompressedOops' option.
>>
>> I'm planning to push this fix to RT_Baseline for the HSX-23-B08
>> snapshot. Jim Melvin has already reviewed the fix so I just need
>> one more reviewer.
>>
>> Thanks, in advance, for any additional reviews.
>>
>> Dan
>>
More information about the macosx-port-dev
mailing list