MetaSpace and StackMapTable
john bergin
john.bergin at gmail.com
Wed Jun 10 20:03:36 UTC 2020
Hi all.
I'm generating a bunch of classes at run-time with ASM (which automatically
generates StackMapTable attributes) and when all the classes are
loaded the *MethodAll
*(bytecodes, StackMapTable, ...) column from *jmap -clstats *tells me that
all classes account for about 100MB. When I generate the same classes with
ASM but tell it *not* to compute the StackMapTable attributes and I switch
class verification off (-noverify) *MethodAll* reduces to 55MB.
I'm interested to know:
- does the JVM free memory held in MetaSpace by StackMapTable attributes
after class verification and a full GC? My testing shows it doesn't.
- is it possible to generate one StackMapTable entry for each method that
would satisfy the verifier? I had a quick look at the code and it doesn't
seem possible *ClassVerifier::verify_stackmap_table *
http://hg.openjdk.java.net/jdk8/jdk8/hotspot/file/87ee5ee27509/src/share/vm/classfile/verifier.cpp
Thanks,
John.
More information about the discuss
mailing list