# HG changeset patch # User dsamersoff # Date 1464084187 0 # Node ID a7d6ba3bcfa57c9d6d1ce96e3a51930abb704c98 # Parent 503088078afa14648dec71fcac9b0ab03aba9f01# Parent c86a9e9079fb90d8b7a2c28b400b090690c405b2 Merge diff -r 503088078afa -r a7d6ba3bcfa5 hotspot/src/share/vm/gc/shared/threadLocalAllocBuffer.cpp --- a/hotspot/src/share/vm/gc/shared/threadLocalAllocBuffer.cpp Tue May 24 12:56:41 2016 +0300 +++ b/hotspot/src/share/vm/gc/shared/threadLocalAllocBuffer.cpp Tue May 24 10:03:07 2016 +0000 @@ -216,8 +216,10 @@ _global_stats = new GlobalTLABStats(); - // Need extra space at the end of TLAB, otherwise prefetching - // instructions will fault (due to accessing memory outside of heap). +#ifdef COMPILER2 + // If the C2 compiler is present, extra space is needed at the end of + // TLABs, otherwise prefetching instructions generated by the C2 + // compiler will fault (due to accessing memory outside of heap). // The amount of space is the max of the number of lines to // prefetch for array and for instance allocations. (Extra space must be // reserved to accommodate both types of allocations.) @@ -227,11 +229,14 @@ // AllocatePrefetchInstr==1). To be on the safe side, however, // extra space is reserved for all combinations of // AllocatePrefetchStyle and AllocatePrefetchInstr. + // + // If the C2 compiler is not present, no space is reserved. // +1 for rounding up to next cache line, +1 to be safe int lines = MAX2(AllocatePrefetchLines, AllocateInstancePrefetchLines) + 2; _reserve_for_allocation_prefetch = (AllocatePrefetchDistance + AllocatePrefetchStepSize * lines) / (int)HeapWordSize; +#endif // During jvm startup, the main (primordial) thread is initialized // before the heap is initialized. So reinitialize it now. diff -r 503088078afa -r a7d6ba3bcfa5 hotspot/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java --- a/hotspot/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java Tue May 24 12:56:41 2016 +0300 +++ b/hotspot/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java Tue May 24 10:03:07 2016 +0000 @@ -90,14 +90,6 @@ excludeTestMaxRange("CICompilerCount"); /* - * JDK-8156679 - * Temporarily exclude from range testing as the range is not - * valid for all platforms - */ - excludeTestRange("AllocatePrefetchLines"); - excludeTestRange("AllocateInstancePrefetchLines"); - - /* * JDK-8136766 * Temporarily remove ThreadStackSize from testing because Windows can set it to 0 * (for default OS size) but other platforms insist it must be greater than 0