--- old/src/cpu/x86/vm/vm_version_x86.cpp 2017-06-08 08:26:38.431732860 -0700 +++ new/src/cpu/x86/vm/vm_version_x86.cpp 2017-06-08 08:26:38.301721099 -0700 @@ -1291,27 +1291,37 @@ } #endif // COMPILER2 - if( AllocatePrefetchInstr == 3 && !supports_3dnow_prefetch() ) AllocatePrefetchInstr=0; - if( !supports_sse() && supports_3dnow_prefetch() ) AllocatePrefetchInstr = 3; + if (FLAG_IS_DEFAULT(AllocatePrefetchInstr)) { + if (AllocatePrefetchInstr == 3 && !supports_3dnow_prefetch()) { + FLAG_SET_DEFAULT(AllocatePrefetchInstr, 0); + } else if (!supports_sse() && supports_3dnow_prefetch()) { + FLAG_SET_DEFAULT(AllocatePrefetchInstr, 3); + } + } // Allocation prefetch settings intx cache_line_size = prefetch_data_size(); - if( cache_line_size > AllocatePrefetchStepSize ) - AllocatePrefetchStepSize = cache_line_size; + if (FLAG_IS_DEFAULT(AllocatePrefetchDistance) && + (cache_line_size > AllocatePrefetchStepSize)) { + FLAG_SET_DEFAULT(AllocatePrefetchStepSize, cache_line_size); + } AllocatePrefetchDistance = allocate_prefetch_distance(); AllocatePrefetchStyle = allocate_prefetch_style(); if (is_intel() && cpu_family() == 6 && supports_sse3()) { - if (AllocatePrefetchStyle == 2) { // watermark prefetching on Core + if (FLAG_IS_DEFAULT(AllocatePrefetchDistance) && + (AllocatePrefetchStyle == 2)) { // watermark prefetching on Core #ifdef _LP64 - AllocatePrefetchDistance = 384; + FLAG_SET_DEFAULT(AllocatePrefetchDistance, 384); #else - AllocatePrefetchDistance = 320; + FLAG_SET_DEFAULT(AllocatePrefetchDistance, 320); #endif } if (supports_sse4_2() && supports_ht()) { // Nehalem based cpus - AllocatePrefetchDistance = 192; + if (FLAG_IS_DEFAULT(AllocatePrefetchDistance)) { + FLAG_SET_DEFAULT(AllocatePrefetchDistance, 192); + } if (FLAG_IS_DEFAULT(AllocatePrefetchLines)) { FLAG_SET_DEFAULT(AllocatePrefetchLines, 4); }