< prev index next >

src/hotspot/share/oops/cpCache.cpp

Print this page
*** 21,11 ***
   * questions.
   *
   */
  
  #include "precompiled.hpp"
- #include "cds/archiveBuilder.hpp"
  #include "cds/cdsConfig.hpp"
  #include "cds/heapShared.hpp"
  #include "classfile/resolutionErrors.hpp"
  #include "classfile/systemDictionary.hpp"
  #include "classfile/systemDictionaryShared.hpp"
--- 21,10 ---

*** 171,11 ***
          method->name() != vmSymbols::object_initializer_name()) {
        do_resolve = false;
      }
      if (invoke_code == Bytecodes::_invokestatic) {
        assert(method->method_holder()->is_initialized() ||
!              method->method_holder()->is_init_thread(JavaThread::current()),
               "invalid class initialization state for invoke_static");
  
        if (!VM_Version::supports_fast_class_init_checks() && method->needs_clinit_barrier()) {
          // Don't mark invokestatic to method as resolved if the holder class has not yet completed
          // initialization. An invokestatic must only proceed if the class is initialized, but if
--- 170,12 ---
          method->name() != vmSymbols::object_initializer_name()) {
        do_resolve = false;
      }
      if (invoke_code == Bytecodes::_invokestatic) {
        assert(method->method_holder()->is_initialized() ||
!              method->method_holder()->is_init_thread(JavaThread::current()) ||
+              (CDSConfig::is_dumping_archive() && VM_Version::supports_fast_class_init_checks()),
               "invalid class initialization state for invoke_static");
  
        if (!VM_Version::supports_fast_class_init_checks() && method->needs_clinit_barrier()) {
          // Don't mark invokestatic to method as resolved if the holder class has not yet completed
          // initialization. An invokestatic must only proceed if the class is initialized, but if

*** 358,10 ***
--- 358,22 ---
          return klass->method_at_vtable(method_entry->table_index());
        }
      }
    }
    return nullptr;
+ #if 0
+  else {
+     assert(is_field_entry(), "must be a field entry");
+     st->print_cr(" - F1:  [   " PTR_FORMAT "]", (intptr_t)_f1);
+     st->print_cr(" - F2:  [   " PTR_FORMAT "]", (intptr_t)_f2);
+     st->print_cr(" - flag values: [%02x|0|1|0|0|0|%01x|%01x|0|0|%04x]",
+                  flag_state(), is_final(), is_volatile(), field_index());
+     st->print_cr(" - tos: %s\n - final: %d\n - volatile: %d\n - field index: %04x",
+                  type2name(as_BasicType(flag_state())), is_final(), is_volatile(), field_index());
+   }
+   st->print_cr("                 -------------");
+ #endif
  }
  
  ConstantPoolCache* ConstantPoolCache::allocate(ClassLoaderData* loader_data,
                                       const intStack& invokedynamic_map,
                                       const GrowableArray<ResolvedIndyEntry> indy_entries,

*** 383,34 ***
  // Record the GC marking cycle when redefined vs. when found in the loom stack chunks.
  void ConstantPoolCache::record_gc_epoch() {
    _gc_epoch = CodeCache::gc_epoch();
  }
  
- #if INCLUDE_CDS
- void ConstantPoolCache::remove_unshareable_info() {
-   assert(CDSConfig::is_dumping_archive(), "sanity");
-   // <this> is the copy to be written into the archive. It's in the ArchiveBuilder's "buffer space".
-   // However, this->_initial_entries was not copied/relocated by the ArchiveBuilder, so it's
-   // still pointing to the array allocated inside save_for_archive().
-   if (_resolved_indy_entries != nullptr) {
-     for (int i = 0; i < _resolved_indy_entries->length(); i++) {
-       resolved_indy_entry_at(i)->remove_unshareable_info();
-     }
-   }
-   if (_resolved_field_entries != nullptr) {
-     for (int i = 0; i < _resolved_field_entries->length(); i++) {
-       resolved_field_entry_at(i)->remove_unshareable_info();
-     }
-   }
-   if (_resolved_method_entries != nullptr) {
-     for (int i = 0; i < _resolved_method_entries->length(); i++) {
-       resolved_method_entry_at(i)->remove_unshareable_info();
-     }
-   }
- }
- #endif // INCLUDE_CDS
- 
  void ConstantPoolCache::deallocate_contents(ClassLoaderData* data) {
    assert(!is_shared(), "shared caches are not deallocated");
    data->remove_handle(_resolved_references);
    set_resolved_references(OopHandle());
    MetadataFactory::free_array<u2>(data, _reference_map);
--- 395,10 ---
< prev index next >