jvm-hotspot

What does the UseCompressedOops JVM flag do and when should I use it?

一笑奈何 提交于 2019-11-27 10:54:41
What does the HotSpot JVM flag -XX:+UseCompressedOops do and when should I use it? What sort of performance and memory-usage differences will I see when using it on a 64-bit Java instance (vs. not using it)? Most HotSpot JVM in the last year have had it on by default. This option allows references to be 32-bit in a 64-bit JVM and access close to 32 GB of heap. (more than 32-bit pointers can) (You can have near unlimited off heap memory as well). This can save a significant amount of memory and potentially improve performance. If you want to use this option I suggest you update to a version

Advanced Code Hot Swapping in JDK 8?

◇◆丶佛笑我妖孽 提交于 2019-11-27 10:34:16
问题 I am looking for better HotSwapping in the JavaVM. Being able to only apply method body changes is okay but quite limiting. The options available is JRebel and a discontinued project called Dynamic Code Evolution Virtual Machine (DCEVM). There is a JEP 159 out there that was written by the core developper of DCEVM. A blog post from 2011 mentioned that the developers of DCEVM now work for Oracle to integrate this into the JDK. Do we have this kind of support for JDK 8 beta already or was it

How do i know which default settings are enabled for Sun JVM?

半腔热情 提交于 2019-11-27 10:08:21
问题 i want to try CompressedOops on my JVM. No I wonder if it might be enabled by default. I run this jvm on debian/squeeze: $ java -version java version "1.6.0_22" Java(TM) SE Runtime Environment (build 1.6.0_22-b04) Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode) Some people say it is enabled by default, some say it is not: from: http://forums.yourkit.com/viewtopic.php?f=3&t=3185 Yes, you are right, I also checked it and Compressed Oops is not activated by default in Java6u21 64

Java 8 reserves minimum 1G for Metaspace despite (Max)MetaspaceSize

泪湿孤枕 提交于 2019-11-27 10:01:42
问题 Java 8 reserves 1G for Metaspace just after it starts. It means that minimum metaspace size is 1G. But I set up MetaspaceSize to 300m and MaxMetaspaceSize to 400m. Why Java reserves more then I allow? Java Version $ java -version java version "1.8.0_45" Java(TM) SE Runtime Environment (build 1.8.0_45-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode) VM Flags $ jcmd 21689 VM.flags 21689: -XX:CICompilerCount=3 -XX:ConcGCThreads=1 -XX:G1HeapRegionSize=1048576 -XX

-XX:MaxPermSize with or without -XX:PermSize

依然范特西╮ 提交于 2019-11-27 06:24:53
We've run into a Java.lang.OutOfMemoryError: PermGen space error and looking at the tomcat JVM params, other than the -Xms and -Xmx params we also specify -XX:MaxPermSize=128m . After a bit of profiling I can see occasionally garbage collection happening on the PermGen space saving it from running full. My question is: other than increasing the -XX:MaxPermSize what would be the difference if I specify as well -XX:PermSize ? I know the total memory then would be Xmx+maxPermSize but is there any other reason why -XX:PermSize should not be there when -XX:MaxPermSize is specified? Please do share

JRE 32bit vs 64bit

做~自己de王妃 提交于 2019-11-27 04:24:24
问题 I've been using Java for a while now, and my typical ritual of setting up a new dev machine requires the norm of downloading and installing the latest JDK from Oracle's site. This prompted an unusual question today, does it matter if I use the 32bit or 64bit JRE bundle? From thinking back on it, I've installed both versions before and my normal toolchain plugs happily in (Eclipse). In my day-to-day programming, I do not recall ever having to change something or think about something in a

AES-NI intrinsics enabled by default?

喜夏-厌秋 提交于 2019-11-27 04:23:17
问题 Oracle has this to say about Java 8 with regards to AES-NI: Hardware intrinsics were added to use Advanced Encryption Standard (AES). The UseAES and UseAESIntrinsics flags are available to enable the hardware-based AES intrinsics for Intel hardware. The hardware must be 2010 or newer Westmere hardware. For example, to enable hardware AES, use the following flags: -XX:+UseAES -XX:+UseAESIntrinsics To disable hardware AES use the following flags: -XX:-UseAES -XX:-UseAESIntrinsics But it does

Android application Wi-Fi device - AP connectivity

穿精又带淫゛_ 提交于 2019-11-27 04:13:50
问题 I am building an application which can transfer data between a mobile and a Wi-Fi device... The mobile has got the AP enabled (through code) and another device connects to this specific network... How can I detect through code to see the details of the devices connected to the network(AP)?** Is there a solution for this? I have seen an application called Wifi Hot spot in HTC Desire that does this functionality of showing the IP addresses of the devices connected to the network. How can this

What are ReservedCodeCacheSize and InitialCodeCacheSize?

泄露秘密 提交于 2019-11-27 03:05:54
Can someone please explain what the JVM option ReservedCodeCacheSize and InitialCodeCacheSize are? Specifically when/why would I want to change it? How do I decide what the right size is? This is what the docs say: -XX:ReservedCodeCacheSize=32m Reserved code cache size (in bytes) - maximum code cache size. [Solaris 64-bit, amd64, and -server x86: 2048m; in 1.5.0_06 and earlier, Solaris 64-bit and and64: 1024m.] jeha ReservedCodeCacheSize (and InitialCodeCacheSize ) is an option for the (just-in-time) compiler of the Java Hotspot VM. Basically it sets the maximum size for the compiler's code

Is there any instruction reordering done by the Hotspot JIT compiler that can be reproduced?

风流意气都作罢 提交于 2019-11-27 02:39:37
问题 As we know, some JIT allows reordering for object initialization, for example, someRef = new SomeObject(); can be decomposed into below steps: objRef = allocate space for SomeObject; //step1 call constructor of SomeObject; //step2 someRef = objRef; //step3 JIT compiler may reorder it as below: objRef = allocate space for SomeObject; //step1 someRef = objRef; //step3 call constructor of SomeObject; //step2 namely, step2 and step3 can be reordered by JIT compiler. Even though this is