jvm-hotspot

Just in Time Compilation - Storing vs Doing always [duplicate]

不打扰是莪最后的温柔 提交于 2019-12-22 10:09:44
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Why doesn't the JVM cache JIT compiled code? I understand that JIT compilation is compilation to native code using hotspot mechanisms, which can be very very fast as it is optimization to the OS, Hardwards, etc. My question is, why does Java not store that JIT complied code somewhere in file and use the same for future purposes? This can reduce the 'initial warm-up' time as well. Please let me know what I am

Why do hotspot generated compiled methods stash eax high up the stack before execution?

耗尽温柔 提交于 2019-12-22 07:50:52
问题 When looking at generated assembly code from OpenJDK's HotSpot, there is part of the prologue that copies the %eax value to a location further up the stack (rsp-0x14000) , and I don't understand why it's doing that: [Disassembling for mach='i386:x86-64'] [Entry Point] [Verified Entry Point] [Constants] # {method} {0x0000000120f0f410} 'add' '(JJ)J' in 'Test' # parm0: rsi:rsi = long # parm1: rdx:rdx = long # [sp+0x40] (sp of caller) 0x000000010cd8a3e0: mov %eax,-0x14000(%rsp) 0x000000010cd8a3e7

how to disable inlining optimization with sun jvm?

我只是一个虾纸丫 提交于 2019-12-22 05:47:09
问题 I need to do some experiments showing the effect of inlining on my code. Anybody knows how to disable inlining with sun jvm? I searched http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html and got to know -XX:InlineSmallCode=n can control the threshold of the inlining candidates. So will -xx:InlineSmallCode=0 work? 回答1: I would try -XX:MaxInlineSize=0 instead. The description for InlineSmallCode seems a bit unclear as to whether or not it applies to all inlinings. You

Performance of Collections.emptyList and empty ArrayList with JIT compiler

时间秒杀一切 提交于 2019-12-22 05:24:56
问题 Is there a performance difference between using Collections.emptyList() or an empty ArrayList , especially when using a JIT compiler? I could imagine that - for example - the JIT compiler doesn't do inlining or static method calls because the executed method depends on the type. Edit I know that Collections.emptyList() returns an immutable list while ArrayList is mutable object. What I mean is that if I pass one or the other to a method as a parameter and the method doesn't modify the list

Higher memory consumption in Java 8 than Java 7

为君一笑 提交于 2019-12-21 05:30:09
问题 I'm developing a JavaFX desktop application using Java 7. The application I'm developing uses 10-12 background threads which gets system information or makes HTTP request. I also use some JNA and JNI code. When i limit the heap size to 40 MB, it's fairly enough and the application runs without a problem with total ~100 MB memory. However since Oracle is dropping support for Java 7 in April, I decided to upgrade the application to Java 8, the upgrade went smoothly, not much code change

Where to download Hotspot JVM? Different from Oracle's JVM?

若如初见. 提交于 2019-12-21 05:26:07
问题 I read a few posts about JVM at Stack Overflow and would like to download a binary copy of the Hotspot JVM, yet I am not able to find it on http://www.java.net. Beside that, what is the difference between Hotspot JVM and JVMs found at Oracle Is Oracle JVM good for a production website? 回答1: Overview: This SO question may clear up your questions regarding "What is JVM, Hotspot and OpenJDK". Basically: JVM means Java Virtual Machine . The JVM is the underlying runtime that executes java

Value integrity guarantee for concurrent long writes in 64-bit OpenJDK 7/8

痞子三分冷 提交于 2019-12-21 04:07:13
问题 Note: this question isn't related to volatile, AtomicLong, or any perceived deficiency in the described use case. The property I am trying to prove or rule out is as follows: Given the following: a recent 64-bit OpenJDK 7/8 (preferably 7, but 8 also helpful) a multiprocessing Intel-base system a non-volatile long primitive variable multiple unsynchronized mutator threads an unsynchronized observer thread Is the observer always guaranteed to encounter intact values as written by a mutator

Oracle's Server JRE Contains JDK?

与世无争的帅哥 提交于 2019-12-20 19:08:23
问题 I've just downloaded Oracle's Server JRE for Java SE 7 (link) The file I downloaded was server-jre-7u45-linux-x64.tar.gz . When I extracted this file I was surprised to find a directory named jdk1.7.0_45 was created containing the full java JDK. Not what I expected from a JRE install. What is going on here? 回答1: The answer is in the description of the packages on the parent page: JDK: (Java Development Kit). For Java Developers. Includes a complete JRE plus tools for developing, debugging,

How to disable minidump (mdmp) files generation with Java Hotspot JVM on Windows

痴心易碎 提交于 2019-12-20 17:43:11
问题 Currently I have a deployed executable jar file that creates large (7+ Gb) minidump files when it crashes. I would like to have a text representation of what caused the crash, not a binary file of the JVM state. I've tried using the information found in this CodeRanch post and the documentation that I've found in the Java documentation doesn't seem to help. I also referenced this question but there's no definitive answer. Is there a typical way this is done that I'm not aware of? 回答1: I found

What is Klass & KlassKlass

浪子不回头ぞ 提交于 2019-12-20 08:59:43
问题 What is Klass & KlassKlass in JVM Hotspot Implementation? As far as I understood from the article Presenting the Perm Generation, Klass is the internal representation of a Java class (let's say A ) & it will hold the basic information about the structure of the class including the bytecode. It will be stored as an object itself. Every object of the class A will have a pointer to the internal representation Klass present in PermGen KlassKlass is the internal representation of the Klass class