jvm-hotspot

bootstrap class path not set in conjunction with -source 1.6

纵然是瞬间 提交于 2019-12-01 00:38:57
问题 I am upgrading my application from java 1.6 to 1.7. When I try to build using Maven 3.2.1, my build fails with below error msg: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project my-app5: Compilation failure: Compilation failure: [ERROR] could not parse error message: warning: [options] bootstrap class path not set in conjunction with -source 1.6 I am using java 1.7 hotspot and previously I was using 1.6 jrockit. My

Utility to access string pool content in JDK 8 HotSpot JVM

匆匆过客 提交于 2019-11-30 23:12:38
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 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.InstanceKlass; import sun.jvm.hotspot.oops.OopField; import sun.jvm.hotspot.runtime.VM; import sun.jvm.hotspot

Why is the Java G1 gc spending so much time scanning RS?

独自空忆成欢 提交于 2019-11-30 20:53:45
I'm currently evaluating the G1 garbage collector and how it performs for our application. Looking at the gc-log, I noticed a lot of collections have very long "Scan RS" phases: 7968.869: [GC pause (mixed), 10.27831700 secs] [Parallel Time: 10080.8 ms] (...) [Scan RS (ms): 4030.4 4034.1 4032.0 4032.0 Avg: 4032.1, Min: 4030.4, Max: 4034.1, Diff: 3.7] [Object Copy (ms): 6038.5 6033.3 6036.7 6037.1 Avg: 6036.4, Min: 6033.3, Max: 6038.5, Diff: 5.2] (...) [Eden: 19680M(19680M)->0B(20512M) Survivors: 2688M->2624M Heap: 75331M(111904M)->51633M(115744M)] [Times: user=40.49 sys=0.02, real=10.28 secs]

Identify Java jdwp Debugger Assigned (Ephemeral) Port

随声附和 提交于 2019-11-30 15:15:44
I am using the following JVM parameters to start-up a JVM with the hostpot debugger. -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=0 Note that I am assigning port zero, so that the JVM asks the OS for an ephemeral port. This is critical for my use-case, to make sure the JVM will not fail to start-up due to contention for some pre-defined port. As a result my JVM starts-up, and the following log entry is outputted to stdout : Listening for transport dt_socket at address: XXXX I would like to find some way to identify the debug port from inside or outside of the JVM, so it would be

How to get jmap histogram programmatically?

你。 提交于 2019-11-30 08:40:46
I would like to get the equivalent of the ouput of jmap -histo programmatically, from inside the monitored application. I see triggering a binary heap dump is possible through the HotSpot diagnostic bean, but I can't see how to get the histogram data. Is it possible ? It may be not the best example/code, but have a look at this (I think it's only working on Hotspot JVMs) 来源: https://stackoverflow.com/questions/9417038/how-to-get-jmap-histogram-programmatically

Java fatal error SIGSEGV with no added native code

最后都变了- 提交于 2019-11-30 06:43:16
I am getting an error message from the Java compiler that I don't understand. I've tested my code on OSX 10.6, 10.9, and Ubuntu 14.04, with both Java 6 and 7. When I run with the Eclipse debugger or from the interpreter (using -Xint option), everything runs fine. Otherwise, I get the following messages: Java 1.6: Invalid memory access of location 0x8 rip=0x1024e9660 Java 1.7: # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x000000010f7a8262, pid=20344, tid=18179 # # JRE version: Java(TM) SE Runtime Environment (7.0_60-b19) (build 1.7.0_60-b19) #

Complete list of JVM options [duplicate]

核能气质少年 提交于 2019-11-30 03:38:30
This question already has an answer here: Print All JVM Flags 2 answers 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? You can use java -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal -version to print all options and their defaults. If you have a debug build you can use this command to print comments for the various options as well: java -XX:+UnlockDiagnosticVMOptions -XX:

Why using parallel streams in static initializer leads to not stable deadlock

不羁岁月 提交于 2019-11-30 00:18:46
CAUTION: it is not a duplicate, please read topic сarefully https://stackoverflow.com/users/3448419/apangin quote: The real question is why the code sometimes works when it should not. The issue reproduces even without lambdas. This makes me think there might be a JVM bug. In the comments of https://stackoverflow.com/a/53709217/2674303 I tried to find out reasons why code behaves differently from one start to another and participants of that discussion made me piece of of advice to create a separated topic. Let's consider following source code: public class Test { static { System.out.println(

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

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 21:07:51
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:InitialHeapSize=62914560 -XX:+ManagementServer -XX:MarkStackSize=4194304 -XX:MaxHeapSize=1006632960 -XX

NewRatio parameter not working with CMS garbage collector

丶灬走出姿态 提交于 2019-11-29 14:55:45
I switched to CMS collector for my application and throughput of application decreased by half. From GC logs, I see a high frequency of minor GCs happening (aroung 10 per second ). I have allocated a heap size of 4G . The JVM be default is using very small size for young gen (less than 40MB ). I want to try out CMS via increasing the size of young gen. Can you point me to right JVM parameter for this. I tried -XX:NewRatio but JVM ignored this parameter and there was no change in young gen sizes My java version is java version "1.6.0_14" How did you set -XX:NewRatio , and on which JVM version?