Rinning jstack -e
produces a dump like this (at least in Java 19):
"Thread-0" #25 [23276] prio=5 os_prio=0 cpu=0.00ms elapsed=593.30s allocated=6720B defined_classes=1 tid=0x0000023dafe60b20 nid=23276 waiting for monitor entry [0x000000796a4ff000]
What does "defined_classes" mean here?
This output is coming from the enhancement JDK-8200720. Its implementation defines this values as follow:
- defined_classes=... : The number of classes defined by this thread
This might hint to a thread that loads too many classes.
It was added in commit d1b24f2ceca5 on 25 Jun 2018.