jvm-hotspot

OpenJDK vs Java HotspotVM

北战南征 提交于 2019-12-04 16:28:10
问题 Are OpenJDK VM and Oracle Hotspot VM still two different JVMs? I can't seem to find any somewhat official documentation on anything about OpenJDK VM. Even in OpenJDK homepage there is an HotSpot Group which develops HotSpot VM. The HotSpot group is comprised of developers involved in the design, implementation, and maintanence of the HotSpot virtual machine However if I check java -version on my Windows machine it prints out Java HotSpot(TM) 64-Bit Server VM But on my Ubuntu VPS OpenJDK 64

Java8 metaspace & heap usage

∥☆過路亽.° 提交于 2019-12-04 16:18:39
问题 I have this code to generate class dynamically and load it import javassist.CannotCompileException; import javassist.ClassPool; public class PermGenLeak { private static final String PACKAGE_NAME = "com.jigarjoshi.permgenleak."; public static void main(String[] args) throws CannotCompileException, InterruptedException { for (int i = 0; i < Integer.MAX_VALUE; i++) { ClassPool pool = ClassPool.getDefault(); pool.makeClass(PACKAGE_NAME + i).toClass(); Thread.sleep(3); } } } I launched this class

JDK9 Hotspot debug using gdb, causing SIGSEGV Segmentation fault in eclipse/Ubuntu terminal

怎甘沉沦 提交于 2019-12-04 15:51:23
I am trying to debug JDK9. I want to trace source code and see the control flow of JDK/Hotspot code. I use gdb and Eclipse but there is a problem SIGSEGV Segmentation fault . I follow Buildme.md from JDK official document to configure JDK9, bash ./configure --with-debug-level=slowdebug --with-target-bits=64 --disable-warnings-as-errors Then, make all I get my customized debug version: /images/jdk/bin/java -version openjdk version "9-internal" OpenJDK Runtime Environment (build 9-internal+0-adhoc.xfwu.9dev) OpenJDK 64-Bit Server VM (build 9-internal+0-adhoc.xfwu.9dev, mixed mode) The following

Is it possible to do Hotswapping of ATG classes

半世苍凉 提交于 2019-12-04 15:31:58
The deployment we follow is that we use runAssembler.bat to build an ear file and deploy it in a app server. We are using weblogic and jboss for testing purposes of the modules we built. However for every small change, we need to run runAssembler and build a new ear and deploy it in app server and restart the server. I would like to find out if anyone figured out a way to do Hotswapping of class files which are generated by the code we write in ATG environment in either weblogic or jboss. radimpe By attaching your IDE to your Application server on the Debug port it is generally possible to do

Default for XX:MaxDirectMemorySize

筅森魡賤 提交于 2019-12-04 15:12:55
问题 What is the default value for XX:MaxDirectMemorySize? 回答1: From http://www.docjar.com/html/api/sun/misc/VM.java.html i see: 163 // A user-settable upper limit on the maximum amount of allocatable direct 164 // buffer memory. This value may be changed during VM initialization if 165 // "java" is launched with "-XX:MaxDirectMemorySize=<size>". 166 // 167 // The initial value of this field is arbitrary; during JRE initialization 168 // it will be reset to the value specified on the command line,

Utility to access string pool content in JDK 8 HotSpot JVM

只愿长相守 提交于 2019-12-03 21:25:21
问题 Is there any utility or script, either using java or native code, to see list of all strings present in String Pool in JDK 8 HotSpot JVM, without having lot of performance impact on JVM? Alternatively can I have a listener hooked up whenever a new string is being added into JVM? Thanks, Harish 回答1: You can easily make such yourself utility using HotSpot Serviceability Agent which is included in JDK by default. import sun.jvm.hotspot.memory.SystemDictionary; import sun.jvm.hotspot.oops

Complete list of JVM options [duplicate]

这一生的挚爱 提交于 2019-12-03 18:49:02
问题 This question already has answers here : Print All JVM Flags (2 answers) Closed 7 months ago . Besides official documentation I have found only this post. But it is quite old and incomplete (only -XX options available). For example, I couldn't find -XX:AutoBoxCacheMax option in none of them. Where the complete list can be found if it exists? 回答1: You can use java -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal -version to print all options and their defaults. If you have a debug build you

'Eden space' name origin in Garbage Collection

假装没事ソ 提交于 2019-12-03 16:17:05
问题 In Garbage Collection terminology, why is it called 'Eden Space'? Just like that. I'm still getting familiar with the terminology and I cannot understand why it has such name. 回答1: Eden space is where objects are created. Life for them is all happy but eventually they're chased out by a cherub into the wilderness of the young and later the old generation. They are never allowed back in Eden space, they have to stay in the rough world of continuous tenuring until the Grim Collector comes for

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

一曲冷凌霜 提交于 2019-12-03 12:28:33
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 thread, or is word tearing a danger? JLS: Inconclusive This property exists for 32-bit primitives and 64

What is a de-reflection optimization in HotSpot JIT and how does it implemented?

北战南征 提交于 2019-12-03 12:04:36
Watching Towards a Universal VM presentation, I studied this slide, which lists all the optimisations that HotSpot JIT does: In the language-specific techniques section there is a de-reflection. I tried to find some information about it accross the Internet, but failed. I understood that this optimization eliminates reflection costs in some way, but I'm interested in details. Can someone clarify this, or give some useful links? Yes, there is an optimization to reduce Reflection costs, though it is implemented mostly in Class Library rather than in JVM. Before Java 1.4 Method.invoke worked