This is the next step of JDK-8198698 - Support Lambda proxy classes in dynamic CDS archive.
Design -- when -XX:DumpLoadedClassList is enabled, print out the constant pool entries related to LambdaMetafactory that are resolved during application execution. This will appear in the classlist like this (exact format TBD)
com/foo/HelloWorld indy_index: 4
com/foo/HelloWorld indy_index: 6
During -Xshare:dump, when we see such "indy_index" entries in the classfile, we will resolve constant pool #4 and #6. In doing so, Lambda proxy classes will be generated for these two constant pool entries, and can be cached in a way that's similar to JDK-8198698.