< prev index next >

src/hotspot/share/code/relocInfo.cpp

Print this page
@@ -20,10 +20,12 @@
   * or visit www.oracle.com if you need additional information or have any
   * questions.
   *
   */
  
+ #include "ci/ciUtilities.hpp"
+ #include "code/aotCodeCache.hpp"
  #include "code/codeCache.hpp"
  #include "code/compiledIC.hpp"
  #include "code/nmethod.hpp"
  #include "code/relocInfo.hpp"
  #include "memory/resourceArea.hpp"

@@ -770,10 +772,18 @@
      set_value(_target);
    }
    // If target is nullptr, this is  an absolute embedded reference to an external
    // location, which means  there is nothing to fix here.  In either case, the
    // resulting target should be an "external" address.
+ #ifdef ASSERT
+   if (AOTCodeCache::is_on()) {
+     // AOTCode needs relocation info for card table base which may point to CodeCache
+     if (is_card_table_address(target())) {
+       return;
+     }
+   }
+ #endif
    postcond(src->section_index_of(target()) == CodeBuffer::SECT_NONE);
    postcond(dest->section_index_of(target()) == CodeBuffer::SECT_NONE);
  }
  
  

@@ -862,12 +872,12 @@
        if (code() != nullptr || r->oop_is_immediate()) {
          oop_addr  = r->oop_addr();
          raw_oop   = *oop_addr;
          oop_value = r->oop_value();
        }
-       st->print(" | [oop_addr=" INTPTR_FORMAT " *=" INTPTR_FORMAT "]",
-                  p2i(oop_addr), p2i(raw_oop));
+       st->print(" | [oop_addr=" INTPTR_FORMAT " *=" INTPTR_FORMAT " index=%d]",
+                  p2i(oop_addr), p2i(raw_oop), r->oop_index());
        // Do not print the oop by default--we want this routine to
        // work even during GC or other inconvenient times.
        if (WizardMode && oop_value != nullptr) {
          st->print("oop_value=" INTPTR_FORMAT ": ", p2i(oop_value));
          if (oopDesc::is_oop(oop_value)) {

@@ -885,12 +895,12 @@
        if (code() != nullptr || r->metadata_is_immediate()) {
          metadata_addr  = r->metadata_addr();
          raw_metadata   = *metadata_addr;
          metadata_value = r->metadata_value();
        }
-       st->print(" | [metadata_addr=" INTPTR_FORMAT " *=" INTPTR_FORMAT "]",
-                  p2i(metadata_addr), p2i(raw_metadata));
+       st->print(" | [metadata_addr=" INTPTR_FORMAT " *=" INTPTR_FORMAT " index=%d]",
+                  p2i(metadata_addr), p2i(raw_metadata), r->metadata_index());
        if (metadata_value != nullptr) {
          st->print("metadata_value=" INTPTR_FORMAT ": ", p2i(metadata_value));
          metadata_value->print_value_on(st);
        }
        break;

@@ -929,11 +939,11 @@
            st->print(" Stub::%s", desc->name());
          }
        } else {
          CodeBlob* cb = CodeCache::find_blob(dest);
          if (cb != nullptr) {
-           st->print(" %s", cb->name());
+           st->print(" Blob::%s", cb->name());
          } else {
            ResourceMark rm;
            const int buflen = 1024;
            char* buf = NEW_RESOURCE_ARRAY(char, buflen);
            int offset;
< prev index next >