< prev index next >

src/hotspot/share/cds/lambdaFormInvokers.cpp

Print this page
*** 22,10 ***
--- 22,11 ---
   *
   */
  
  #include "precompiled.hpp"
  #include "cds/archiveBuilder.hpp"
+ #include "cds/cdsConfig.hpp"
  #include "cds/lambdaFormInvokers.hpp"
  #include "cds/metaspaceShared.hpp"
  #include "cds/regeneratedClasses.hpp"
  #include "classfile/classLoadInfo.hpp"
  #include "classfile/classFileStream.hpp"

*** 88,10 ***
--- 89,13 ---
      log_info(cds)("Regenerate MethodHandle Holder classes...done");
    }
  };
  
  void LambdaFormInvokers::regenerate_holder_classes(TRAPS) {
+   if (!CDSConfig::is_dumping_regenerated_lambdaform_invokers()) {
+     return;
+   }
    PrintLambdaFormMessage plm;
    if (_lambdaform_lines == nullptr || _lambdaform_lines->length() == 0) {
      log_info(cds)("Nothing to regenerate for holder classes");
      return;
    }

*** 165,11 ***
        int len = h_bytes->length();
        // make a copy of class bytes so GC will not affect us.
        char *buf = NEW_RESOURCE_ARRAY(char, len);
        memcpy(buf, (char*)h_bytes->byte_at_addr(0), len);
        ClassFileStream st((u1*)buf, len, nullptr, ClassFileStream::verify);
!       regenerate_class(class_name, st, CHECK);
      }
    }
  }
  
  void LambdaFormInvokers::regenerate_class(char* class_name, ClassFileStream& st, TRAPS) {
--- 169,13 ---
        int len = h_bytes->length();
        // make a copy of class bytes so GC will not affect us.
        char *buf = NEW_RESOURCE_ARRAY(char, len);
        memcpy(buf, (char*)h_bytes->byte_at_addr(0), len);
        ClassFileStream st((u1*)buf, len, nullptr, ClassFileStream::verify);
!       if (!ArchiveInvokeDynamic /* disabled for ArchiveInvokeDynamic because of JDK-8310831 */) {
+         regenerate_class(class_name, st, CHECK);
+       }
      }
    }
  }
  
  void LambdaFormInvokers::regenerate_class(char* class_name, ClassFileStream& st, TRAPS) {
< prev index next >