In some JVMs, there is a segment of memory called the "codecache" where compiled bytecode is stored.
Questions tagged [jvm-codecache]
11 questions
6
votes
1 answer
Java update from 11.0.11 to 11.0.13 changes JVM code cache behavior and results in more process cpu usage and strange profiled nmethods memory usage
We run a complex clustered application with Java 11.0.11 and -XX:ReservedCodeCacheSize=375m with the same load profile attached 24/7 without any restarts.
After we updated AdoptOpenJDK jdk-11.0.11+9 to Temurin jdk-11.0.13+8, both using…

Josef
- 219
- 2
- 5
5
votes
1 answer
why is the java code cache size growing?
I have this basic program which does nothing but sit there waiting for input:
import java.io.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Basic {
public static void main(String[]…

Alexander Bird
- 38,679
- 42
- 124
- 159
4
votes
1 answer
JVM Compile Time vs Code Cache
I've been benchmarking my app and analyzing it with JMC. I've noticed that under load, it performs quite a bit of JIT compiling. If I send a large amount of transactions per second, the compile time spikes. The compile time always grows…

stan
- 4,885
- 5
- 49
- 72
3
votes
1 answer
JVM JIT deoptimization after idle
I use Java primarily for writing pet projects, which are idle most of the time. And after being idle for hours/days response time increases to seconds (up to 10s), then slowly decreases back to 200-300ms.
As far as I understand, this happens because…

Dmitry Romanov
- 33
- 5
3
votes
2 answers
How to get non-heap "code cache" details using jstat
I want to find the non-heap memory code cache details of a remote JVM (JDK 8) running on windows from my windows machine. I can get the details using jconsole. But, what i need is to get the values using jstat command. GUI monitoring tools doesn't…

VISHNU
- 73
- 1
- 9
1
vote
1 answer
Does Java 9+ Segmented Code Cache Require Java 9+Compilation?
Our software is still supporting clients with JVM 8 deployments, and so we are still compiling with Java 8. I am trying to find out if the Segmented Code Cache JEP197 introduced in Java 9 works on older compilations - or requires the source code to…

aaronm
- 11
- 2
0
votes
0 answers
C2 compileThread takes long time, and the k8s pod 's cpu up to 100%
some the k8s pod's cpu suddenly increase to 100% , and i find out the C2 compileThread takes long time;
"C2 CompilerThread0" #6 daemon prio=9 os_prio=0 tid=0x00007f6c9416b800 nid=0xf runnable [0x0000000000000000]
java.lang.Thread.State:…
0
votes
0 answers
is there a method or a way to get CodeBlob size?
My Java application's codecache is nearly full, so I use VM.getVM().getCodeCache().iterate() dump codecache info. Then call CodeBlob.getSize() count total size.
However codeBolbs' total size is not equals to JVM
How to get…

user12730122
- 15
- 5
0
votes
2 answers
Can I have a classloader find Java classes dynamically?
I want to select different implementations of classes dynamically, based on a runtime condition. Let's say I have a class with fully qualified class name C. My running system may have many definitions of class C, each of which is in its own jar. I…

fool4jesus
- 2,147
- 3
- 23
- 34
0
votes
2 answers
Is there a Linux Command Line that shows JVM Code Cache usage at the moment?
We are receiving some error in one of our Java application that is running on Tomcat 7. I am looking for a command line that can show us the value of Code Cache at any moment. Is there any command like jstat that can print out the Code Cache…

Sam
- 43
- 6
0
votes
0 answers
When is the JVM's JIT CodeCache reclaimed? Does anyone know?
I recently encountered a JIT error: Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled.This caused my application to run slowly. My JDK version is Oracle JDK1.7.0_79. The default CodeCache size is 48m and I…

Alder
- 1