LambdaForm caches deliberately keep LF instances using SoftReferences.

The motivation is:
  (1) LFs are heavily shared;
(2) LFs are expensive to construct (LF interpreter is turned off by default now); it involves the following steps: new LF instance + compile to bytecode + class loading.

So, keeping a LF instance for a while usually pays off, especially during startup/warmup. There should be some heap/metaspace pressure to get them cleared.

As a workaround, try -XX:SoftRefLRUPolicyMSPerMB=0 to make soft references behave as weak.

On 1/6/17 8:32 PM, Charles Oliver Nutter wrote:
Anyone else encountered this?

https://github.com/jruby/jruby/issues/4391

Not sure the problem relates to j.l.i & LFs since the report says indy in jruby is turned off. For heavy usages of indy/j.l.i 1000s of LFs are expected (<5k). The question is how does the count change over time.

Best regards,
Vladimir Ivanov



We have a user reporting metaspace getting filled up with LambdaForm
classes that have no instances. I would not expect this to happen given
that they're generated via AnonymousClassloader and we would need to
hold a reference to them to keep them alive.

I'm trying to get a heap dump from this user. If anyone has other
suggestions, feel free to comment on the issue.

- Charlie


_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to