Accepted XX:UseSSE values for Java JVM?
I'd like to compare performance of an application across multiple SSE versions and have been unable to find the values that are accepted by this JVM flag. I'm testing 0, 1, 3, and 4. I'm most unsure about if 4 is accep开发者_开发问答ted (all examples I've seen are up to 3) and/or if it's variations (4.1-4.3) can be explicitly defined. Does anyone have any further info on this?
Use the source ;)
http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/39d920531a4d/src/cpu/x86/vm/vm_version_x86.cpp#l464
if (UseSSE < 4) { _cpuFeatures &= ~CPU_SSE4_1; _cpuFeatures &= ~CPU_SSE4_2; } if (UseSSE < 3) { _cpuFeatures &= ~CPU_SSE3; _cpuFeatures &= ~CPU_SSSE3; _cpuFeatures &= ~CPU_SSE4A; } if (UseSSE < 2) _cpuFeatures &= ~CPU_SSE2; if (UseSSE < 1) _cpuFeatures &= ~CPU_SSE;
Note that proves the JVM is aware to some extent about SSE, it might not generate really effective codes for newer versions. Your mileage may vary.
Check this: http://stas-blogspot.blogspot.gr/2011/07/most-complete-list-of-xx-options-for.html
It has the most complete documentation for XX JVM parameters (a bit outdated too). For XX:UseSSE it says up to 2.
精彩评论