< prev index next >

src/hotspot/share/classfile/systemDictionaryShared.cpp

Print this page
*** 51,10 ***
--- 51,11 ---
  #include "oops/instanceKlass.hpp"
  #include "oops/klass.inline.hpp"
  #include "oops/objArrayOop.inline.hpp"
  #include "oops/oop.inline.hpp"
  #include "oops/typeArrayOop.inline.hpp"
+ #include "prims/jvmtiExport.hpp"
  #include "runtime/handles.inline.hpp"
  #include "runtime/java.hpp"
  #include "runtime/javaCalls.hpp"
  #include "runtime/mutexLocker.hpp"
  #include "utilities/hashtable.inline.hpp"

*** 68,10 ***
--- 69,11 ---
  DEBUG_ONLY(bool SystemDictionaryShared::_no_class_loading_should_happen = false;)
  bool SystemDictionaryShared::_dump_in_progress = false;
  
  class DumpTimeSharedClassInfo: public CHeapObj<mtClass> {
    bool                         _excluded;
+   bool                         _is_early_klass;
  public:
    struct DTLoaderConstraint {
      Symbol* _name;
      char _loader_type1;
      char _loader_type2;

*** 112,10 ***
--- 114,11 ---
      _is_archived_lambda_proxy = false;
      _id = -1;
      _clsfile_size = -1;
      _clsfile_crc32 = -1;
      _excluded = false;
+     _is_early_klass = JvmtiExport::is_early_phase();
      _verifier_constraints = NULL;
      _verifier_constraint_flags = NULL;
      _loader_constraints = NULL;
    }
  

*** 167,10 ***
--- 170,14 ---
    bool is_excluded() {
      // _klass may become NULL due to DynamicArchiveBuilder::set_to_null
      return _excluded || _failed_verification || _klass == NULL;
    }
  
+   // Was this class loaded while JvmtiExport::is_early_phase()==true
+   bool is_early_klass() {
+     return _is_early_klass;
+   }
    void set_failed_verification() {
      _failed_verification = true;
    }
  
    bool failed_verification() {

*** 1270,10 ***
--- 1277,15 ---
    } else {
      return false;
    }
  }
  
+ bool SystemDictionaryShared::is_early_klass(InstanceKlass* ik) {
+   DumpTimeSharedClassInfo* info = _dumptime_table->get(ik);
+   return (info != NULL) ? info->is_early_klass() : false;
+ }
+ 
  void SystemDictionaryShared::warn_excluded(InstanceKlass* k, const char* reason) {
    ResourceMark rm;
    log_warning(cds)("Skipping %s: %s", k->name()->as_C_string(), reason);
  }
  

*** 2138,12 ***
  
  #if INCLUDE_CDS_JAVA_HEAP
  
  class ArchivedMirrorPatcher {
    static void update(Klass* k) {
!     if (k->has_raw_archived_mirror()) {
!       oop m = HeapShared::materialize_archived_object(k->archived_java_mirror_raw_narrow());
        if (m != NULL) {
          java_lang_Class::update_archived_mirror_native_pointers(m);
        }
      }
    }
--- 2150,12 ---
  
  #if INCLUDE_CDS_JAVA_HEAP
  
  class ArchivedMirrorPatcher {
    static void update(Klass* k) {
!     if (k->has_archived_mirror_index()) {
!       oop m = k->archived_java_mirror();
        if (m != NULL) {
          java_lang_Class::update_archived_mirror_native_pointers(m);
        }
      }
    }
< prev index next >