763 questions
0 votes
0 answers
131 views
About JVM's tiered compilation sequence, does isolated method optimization occur before inlining?
The tiered steps provided by Oracle are: It seems to me that... I'd be a reasonable assumption to think that optimizations should occur with methods in isolation (detached from its call-site context),...
0 votes
0 answers
31 views
What is the difference between the btos and ztos in TosState?
enum TosState { // Describes the TOS (Top of Stack) cache contents btos = 0, // byte, bool TOS cached ztos = 1, // byte, bool TOS cached ctos = 2, // ...
20 votes
1 answer
2k views
Why does this simple and small Java code runs 30x faster in all Graal JVMs but not on any Oracle JVMs?
I'm not compiling anything to native, in other words, I'm not using native-image from GraalVM. I'm just running the same Java class (same Java bytecode) with GraalVM and then running the same Java ...
1 vote
0 answers
139 views
How jvm covers all scenarios to avoid not giving away stored value in reference variable
In java, a reference variable contains object reference which is some kind of wrapper over raw addr or pointer or some sort of mapping and during dereferencing this mapping is used to navigate to the ...
0 votes
1 answer
101 views
Unexpected `NoClassDefFoundError` when optional library is not on classpath, but related code is not executed
I am trying to use the Google Closure Compiler from Java code, but want it to be an optional dependency (present at build time, but may not be around when deployed). The problem I'm having is that I'm ...
1 vote
2 answers
206 views
Where to find the implementation of java.lang.invoke.VarHandle.compareAndSet()?
In java.lang.invoke.VarHandle.java, there is a method compareAndSet which is defined like that: public final native @MethodHandle.PolymorphicSignature @IntrinsicCandidate boolean compareAndSet(Object.....
0 votes
0 answers
87 views
get the exception context address from a crashed process using its handle
we are able to launch a dump collection tool for jni crashes using jvm option -XX:OnError. But like we get a jit address passed to the jit debugger in win32 app crashes we dont get it from jvm. Is ...
0 votes
0 answers
101 views
Classlist file in class data sharing in java 21
I want to create CDS archive for my application running in Kubernetes using the classlist creation approach. But I want to save a pod restart that is required for creating classlist. Is there some ...
-1 votes
1 answer
299 views
Will jvm release memory?
I am a Java developer, using jdk 1.8. My application runs in k8s. The memory limit of each pod is 2.5g. When my application runs for a period of time, a full gc occurs, but the memory will not be ...
0 votes
1 answer
858 views
Using UseCompressedOops?
I observe some performance problems on switching from 32GB to 64GB memory for my appliction. I have following configured: java.arg.2=-Xms14g java.arg.3=-Xmx54g From here Compressed oops is supported ...
2 votes
1 answer
78 views
Java native access violation is not triggering the windows jit debugger
I created a null dereference in C++ code that is called from java exe. AeDebug registry key is set with notepad (for testing.) However, the app crash does not launch notepad. Attached windbg and found ...
1 vote
2 answers
162 views
OpenJDK Tracking ReentrantLock lock and unlock
I am doing runtime instrumentation using the interpreter. My focus now is adding a function call before any ReEntractLock lock() and unlock() function. For reference, this is the Test.java: class Test ...
0 votes
1 answer
173 views
Why are there extra logs in /tmp under -XX:+LogCompilation?
When logging compilation on hotspot when running under -XX:+LogCompilation -XX:LogFile=/path/to/file.log logs get written to /path/to/file.log which is good, but also different (much more) logs are ...
0 votes
1 answer
149 views
Why do we need Thread.sleep after calling System.gc in JDK native memory usage scenario?
After my research on the source code implementation details of System.gc in Java17 ,i found that System.gcwill eventually trigger two gc types: full gc (stop the world), when we use SerialGC, ...
0 votes
1 answer
103 views
Interpreter resolve get/put method only resolves the first access to a field
I am trying to log every access to a field/static variable for an analysis tool I'm building, so far I have found this interpreter rt function, void InterpreterRuntime::resolve_get_put(JavaThread* ...