Is there any tool to visualize the status of GC on a specific object? Answer If you can access the object, it is trivially not collectable. The JVMTI system (Java Virtual Machine Tool Interface) lets other processes link up to a JVM and get stats from it. It’s what debuggers and profilers use; visualvm (ships with most JDKs) can do
Tag: jvm
Should the volatile modifier be added to the object wake-up condition variable?
Please check the sample code below: The above code can run normally, which is very easy to understand, but why the following code can also run normally? I think that in a multi-threaded execution environment, each thread copies the fActiveTestDeathCount variable. If there is no additional volatile modifier, this variable is invisible to other threads, and the program should not
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?
what is the “JVMTI_ERROR_NONE”? [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 1 year ago. This post was edited and submitted for review 1 year ago and failed to reopen the
Minor question about Segmented Code Cache (http://openjdk.java.net/jeps/197)
I see that this JEP (http://openjdk.java.net/jeps/197) introduced 3 types of code caches. The most obvious one to me is -XX:NonNMethodCodeHeapSize. This is the one that deals with JVM internal data. What I do not understand is what is the difference between NonProfiledCodeHeapSize and ProfiledCodeHeapSize. That document says that: Tiered compilation also introduces a new compiled code type: instrumented compiled code
Install CA root certificate at runtime in JRE 1.8.0_51
I’m working with JRE 1.8.0_51 (I cannot change this), which does not include the root certificate for Let’s Encrypt in lib/security/cacerts (it is added in 1.8.0_141) I need to add the certificate at runtime, and I have found this code to do that: This runs without throwing any error, but causes one of following things to happen: The LE certificate
Java Bytecode Error : Expecting to find object/array on stack
I am compiling a simple language into JVM Bytecode and having some issues with Java object method calls. The verifier gives the error below java.lang.VerifyError: (class: Test_1, method: main signature: ()V) Expecting to find object/array on stack and below is the generated Java source code from my bytecodes by IntelliJ which is exactly what I am trying to do. Creating
What is the difference between Address and Reference in Java?
First of all, I know that Java is call by value. However, in a certain article, there is no such thing as an address in Java, and you should use the word reference. In my opinion, both words are interpreted with the same meaning. Am I wrong? What is the difference between address and reference, and do you have such
OpenJDK 8 interpreter debug
I want to see how the JVM interpreter works. Can I track function calls using NetBeans or GDB? And how will it be more convenient to do this? I’m interested in starting HelloWorld with the -Xint option and see what steps are taken and see the interpreter source code. I mean not only the result of the interpreter, but also
How to modify the command line arguments of the Maven test execution phase of a project from my own Maven library?
I’d like to create a Maven library which will be a helper tool for testing so it will only be used during the testing phase, just like Hamcrest, AssertJ etc. This library needs a Java agent to properly function and this Java agent needs to be loaded at startup and not during runtime (so via the command line option -javaagent)?