Details
-
Bug
-
Resolution: Fixed
-
P4
-
hs25, 9, 10
-
b21
-
generic
-
generic
Description
On Intel SandyBridge Linux x86_64, I tried to increase the AllocatePrefetchDistance by adding:
-XX:AllocatePrefetchDistance=256 -XX:AllocatePrefetchLines=4
But the final flag indicates:
intx AllocatePrefetchDistance := 192 {product}
intx AllocatePrefetchInstr = 0 {product}
intx AllocatePrefetchLines := 4 {product}
intx AllocatePrefetchStepSize = 64 {product}
intx AllocatePrefetchStyle = 1 {product}
In vm_version_x86.hpp:
AllocatePrefetchDistance = allocate_prefetch_distance();
AllocatePrefetchStyle = allocate_prefetch_style();
if( is_intel() && cpu_family() == 6 && supports_sse3() ) {
if( AllocatePrefetchStyle == 2 ) { // watermark prefetching on Core
#ifdef _LP64
AllocatePrefetchDistance = 384;
#else
AllocatePrefetchDistance = 320;
#endif
}
if( supports_sse4_2() && supports_ht() ) { // Nehalem based cpus
AllocatePrefetchDistance = 192;
AllocatePrefetchLines = 4;
#ifdef COMPILER2
if (AggressiveOpts && FLAG_IS_DEFAULT(UseFPUForSpilling)) {
FLAG_SET_DEFAULT(UseFPUForSpilling, true);
}
#endif
}
}
assert(AllocatePrefetchDistance % AllocatePrefetchStepSize == 0, "invalid value");
AllocatePrefetchDistance is decided by the platform, not from command line
-XX:AllocatePrefetchDistance=256 -XX:AllocatePrefetchLines=4
But the final flag indicates:
intx AllocatePrefetchDistance := 192 {product}
intx AllocatePrefetchInstr = 0 {product}
intx AllocatePrefetchLines := 4 {product}
intx AllocatePrefetchStepSize = 64 {product}
intx AllocatePrefetchStyle = 1 {product}
In vm_version_x86.hpp:
AllocatePrefetchDistance = allocate_prefetch_distance();
AllocatePrefetchStyle = allocate_prefetch_style();
if( is_intel() && cpu_family() == 6 && supports_sse3() ) {
if( AllocatePrefetchStyle == 2 ) { // watermark prefetching on Core
#ifdef _LP64
AllocatePrefetchDistance = 384;
#else
AllocatePrefetchDistance = 320;
#endif
}
if( supports_sse4_2() && supports_ht() ) { // Nehalem based cpus
AllocatePrefetchDistance = 192;
AllocatePrefetchLines = 4;
#ifdef COMPILER2
if (AggressiveOpts && FLAG_IS_DEFAULT(UseFPUForSpilling)) {
FLAG_SET_DEFAULT(UseFPUForSpilling, true);
}
#endif
}
}
assert(AllocatePrefetchDistance % AllocatePrefetchStepSize == 0, "invalid value");
AllocatePrefetchDistance is decided by the platform, not from command line
Attachments
Issue Links
- relates to
-
JDK-8182711 Re/Introduce private interface for HW-specific prefetch options in SPARC VM_Version.
-
- Resolved
-