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
How does java guarateee reserved memory
Checking for memory usage by stack using this command: I can see that reserved memory is different from committed. Reserved is about 1MB (default for stack). Committed in fact is physical reserved. I read that java save memory for stack while is not totally used. Running command like top I can see just committed usage. What does java/SO do in
Why is the number of threads in a java process different from the actual size of non-heap memory?
The sentences may be strange due to my lack of English knowledge Thanks to everyone who reads the question. Hello? I am running a java process on Centos7 and monitoring it with jconsole, but the number of threads currently created is different in non-heap memory size. I know that one thread occupies 1mb by default, but even if 100thread is
How is the count of method executions that triggers the omitted exception stack frames calculated in JDK 8?
JDK version: If we write the following code: Part of the output is: That is, the stack frame is no longer printed after the exception occurs 21124 times. Let’s make a small change to the above code, pay attention to the parameters of the nextInt method: Part of the output is: That is, the stack frame is no longer printed
I don’t understand this opcode in JVM Implementation
I am writing a JVM. I was implementing all opcodes one by one, until I faced dup2. The oracle instruction set https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-6.html#jvms-6.5.dup2 says Duplicate the top one or two values on the operand stack and push the duplicated value or values back onto the operand stack in the original order How am I supposed to choose which operation to perform?
Criteria for default garbage collector Hotspot JVM 11/17
I found a source describing that the default gc used changes depending on the available resources. It seems that the jvm uses either g1gc or serial gc dependnig on hardware and os. The serial collector is selected by default on certain hardware and operating system configurations Can someone point out a more detailed source on what the specific criteria is
Where is the super reference in a Java instance method’s stack frame?
I read Bill Venner’s excellent Inside the Java Virtual Machine book, which, in Chapter 5 explores in detail, among other things, the composition of a JVM’s stack frame. (This chapter from the book also happens to be officially published here: https://www.artima.com/insidejvm/ed2/jvm8.html) Apart from this book I studied relatively much the runtime data areas of some JVM’s, especially their stack and
How to fix android build error – Could not create the Java Virtual Machine
Hi I am trying to build Android apk and I get the following errors when I run the shell script. Could you suggest what I can do to resolve this please. I have latest JAVA installed Error I get is Answer You are using two JVM options that are no longer available in recent Java versions: The MaxPermSize option has
Make a Java class visible from any ClassLoader
I’m using a Java Agent (Agent.class) to transform a method in a program (Program.class) in a way that includes a call to the Agent class. I’ve inspected the class loaders and their parents of both Agent and Program classes, and their hierarchy looks like this: Agent.class: AppClassLoader <- PlatformClassLoader <- null Program.class: URLClassLoader <- PlatformClassLoader <- null When the Program
Does an unhandled runtime exception crash the whole server?
Will an unhandled runtime exception stop the whole server (i.e. Spring Boot application) or just the specific HTTP request ? It is true that an unhandled runtime exception will instantly shut down normal Java application, right ? Answer Will an unhandled runtime exception stop the whole server (i.e. Spring Boot application) or just the specific HTTP request ? There is