简体   繁体   中英

What's the defined_classes in a Java thread dump?

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.

This attribute gives the number of classes defined by this thread.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM