Question How to get a rolling recording into disk, with a maximum age? Context When something goes bad in my server, I want to be able to dump the profiling information of the hours prior and analyse it, to know what went wrong. As I don’t know when things will go bad, the JDK should be continuously saving the events
Tag: jvm-hotspot
In Hotspot JVM, why CDS needs Compressed Oops?
I read this post “https://malloc.se/blog/zgc-jdk15”, and last index is about Class Data Sharing. In this index, This feature(means CDS) only work when the Compressed Oops feature was enable(-XX:+UseCompressedOops). I know about CDS and Compress Oops a little, but I cant understand about their relationship. Answer CDS (Class Data Sharing) does not need Compressed OOPs. However, before JDK 15, it worked
what’s the benefit of using Serviceability Agent when debuging HotspotJVM under linux?
in linux, the Hotspot Serviceability Agent is implemented by ptrace, which will stop the debugee process. Since it has side effect on target JVM, why not just simply attach to that JVM? If SA has no impact on target JVM, then it’s very useful. But the truth is not. So I’m wonder what’s the meaning of using SA in linux?
JVM code cache exceeds ReservedCodeCacheSize
I have a java app running in a docker with flags on OpenJDK8: and I’ve noticed that Code Cache memory allocation reported by Native Memory Tracking tool exceeds 240MB (default ReservedCodeCacheSize value): which is ~ 254MB reserved memory. Here’s printed flag and java version: My question is if this is expected behavior? If yes, then is it possible to calculate
Difference between “native” keyword and @HotSpotIntrinsicCandidate annotation
Why use one over another and vice-versa? Which is more performant? Answer The javadoc comments for the @HotSpotIntrinsicCandidate annotation say the following: “The @HotSpotIntrinsicCandidate annotation is specific to the HotSpot Virtual Machine. It indicates that an annotated method may be (but is not guaranteed to be) intrinsified by the HotSpot VM. A method is intrinsified if the HotSpot VM replaces
How to properly set the G1GC options for a server with 22G heap
I’m setting up a new JAVA server, the heap size is set to 22G, and would use the G1GC algorithm. I’ve read all the oracle documents, and believe this is what we need, but still have a few questions: 1> What -XX:G1HeapRegionSize should be ? Must the number be a power of two? If so, should I set 8M to
Determining whether a particular JDK Method typically has an intrinsic implementation
Short of the reading the OpenJDK source code (which I’m not averse to) is there a reasonably comprehensive (or ‘official’) list of intrinsic operations within the Hotspot JVM (say for Intel)? For example, what’s the quickest way to determine whether Math.abs() will generally be converted directly to a few native instructions wherever it is used? Answer The relevant part of