Learn how to inspect the contents of the Java Metaspace region!

Опубликовано: 09 Сентябрь 2026
на канале: yCrash
1,527
10

Sometimes your application might run into 'java.lang.OutOfMemoryError: Metaspace'. In such circumstances you might want to see what are the contents loaded in the Metaspace region of the JVM. In nutshell, the Metaspace region in the JVM memory contains the class metadata definitions that are required to execute your application. In this video, let's explore the options that are available to see the classes that are loaded into the Metaspace.

If you liked this video, you'll love our Java Performance Masterclass. Learn more:
https://ycrash.io/java-performance-tr...

- - - - - - - - - - - - - -

Topics covered:

00:10 - Different regions of JVM memory
00:43 - What is Metaspace?
01:50 - Metadata definitions
03:53 - 1st approach (-verbose:class)
05:05 - 2nd approach (-Xlog:class+load)
05:52 - 3rd approach (jcmd GC.class_histogram)
07:28 - 4th approach (Programmatic approach)
08:14 - 5th approach (Heap Dump analysis)

- - - - - - - - - - - - - -

Links shared in the video:

Metadata definitions:
https://docs.oracle.com/javase/specs/...

BuggyApp program:
https://buggyapp.ycrash.io/

Open source Guava library:
https://github.com/google/guava

HOW TO CAPTURE JAVA HEAP DUMPS? – 7 OPTIONS:
https://blog.heaphero.io/2017/10/13/h...

- - - - - - - - - - - - - -

Read more in this blog:
https://blog.ycrash.io/2022/07/29/ins...

- - - - - - - - - - - - - -

Our Tools:

yCrash: https://yCrash.io/
GCeasy: https://gceasy.io/
HeapHero: https://heaphero.io/
fastThread Tool: https://fastthread.io/

- - - - - - - - - - - - - -

SRE Community:

Need help in troubleshooting your performance problems?
Post here: https://answers.ycrash.io/

- - - - - - - - - - - - - -

Follow us on:

LinkedIn:   / ycrash  
Instagram:   / ycrash_rca  
Facebook:   / tier1app  
Twitter:   / tier1app  

- - - - - - - - - - - - - -

Related videos:

Troubleshooting Microservice’s OutOfMemoryError - Metaspace:
   • How to troubleshoot Microservice’s OutOfMe...  

JVM Memory regions:
   • JVM Memory Explained Simply: A Visual Guid...  

- - - - - - - - - - - - - -

#Metaspace | #javapermgenspacevsmetaspace | #permgentometaspaceinjava8 | #java8frompermgentometaspace | #metaspaceandpermgenspace | #permgenvsmetaspace | #metaspacevsheap | #javalangoutofmemoryerrormetaspace | #creatinganinstanceofaclassjava | #memoryfundamentalspart1ofjavamemorymanagement | #oopsconcepts | #cryptoprojectof2020 | #javacollectionsinterviewquestions | #controlstatementsjava | #corejavainterviewquestion