Open
Description
What kind of issue is this?
- Feature Request. Start by telling us what problem you’re trying to solve. Often a solution
already exists! Don’t send pull requests to implement new features without first getting our
support. Sometimes we leave features out on purpose to keep the project small.
We are using default method to omit some default parameters, but we met lots of class loading/unloading in our environment(1.8.0_121, G1GC). Looks like after each young gc will make it recreate LambdaForm$BMH
or LambdaForm$DMH
in next request. I enabled -XX:+TraceClassLoading and -XX:+TraceClassUnloading.
[Unloading class java.lang.invoke.LambdaForm$BMH/2110450308 0x00000007c1746c28]
[Unloading class java.lang.invoke.LambdaForm$BMH/1598730347 0x00000007c1746828]
[Unloading class java.lang.invoke.LambdaForm$BMH/1380181431 0x00000007c1746428]
[Unloading class java.lang.invoke.LambdaForm$BMH/1090809169 0x00000007c1746028]
[Unloading class java.lang.invoke.LambdaForm$BMH/1828313973 0x00000007c1745c28]
[Unloading class java.lang.invoke.LambdaForm$DMH/1545216975 0x00000007c1745828]
[Unloading class java.lang.invoke.LambdaForm$DMH/829703186 0x00000007c1745428]
...
Maybe it needs to cache like serviceMethodCache?
--
Update with test case(Test in jdk1.8.0_162):
https://gist.github.com/kojilin/cd13940f2f8b2a06220b20efe7eab264
run with -XX:+TraceClassLoading -XX:+TraceClassUnloading
unloadingCase
will have many[Loaded java.lang.invoke.LambdaForm$DMH/
and if we force it to run GC, it will have lots of[Unloading class java.lang.invoke.LambdaForm$BMH
.safeCase
won't have that problem.
Metadata
Metadata
Assignees
Labels
No labels