changeset 3381:3b1b50b3ad62

7157141: crash in 64 bit with corrupted oops Reviewed-by: kvn, iveresov
author never
date Mon, 02 Apr 2012 16:05:56 -0700
parents 8a074526ffca
children acd6a3802609
files src/cpu/x86/vm/assembler_x86.cpp src/cpu/x86/vm/x86_64.ad src/share/vm/memory/barrierSet.hpp src/share/vm/memory/cardTableModRefBS.cpp src/share/vm/memory/cardTableModRefBS.hpp src/share/vm/utilities/vmError.cpp
diffstat 6 files changed, 20 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/x86/vm/assembler_x86.cpp	Thu May 10 15:44:19 2012 +0200
+++ b/src/cpu/x86/vm/assembler_x86.cpp	Mon Apr 02 16:05:56 2012 -0700
@@ -528,10 +528,12 @@
     if (which == end_pc_operand)  return ip + (is_64bit ? 8 : 4);
     // these asserts are somewhat nonsensical
 #ifndef _LP64
-    assert(which == imm_operand || which == disp32_operand, "");
+    assert(which == imm_operand || which == disp32_operand,
+           err_msg("which %d is_64_bit %d ip " INTPTR_FORMAT, which, is_64bit, ip));
 #else
     assert((which == call32_operand || which == imm_operand) && is_64bit ||
-           which == narrow_oop_operand && !is_64bit, "");
+           which == narrow_oop_operand && !is_64bit,
+           err_msg("which %d is_64_bit %d ip " INTPTR_FORMAT, which, is_64bit, ip));
 #endif // _LP64
     return ip;
 
--- a/src/cpu/x86/vm/x86_64.ad	Thu May 10 15:44:19 2012 +0200
+++ b/src/cpu/x86/vm/x86_64.ad	Mon Apr 02 16:05:56 2012 -0700
@@ -3361,15 +3361,6 @@
   interface(CONST_INTER);
 %}
 
-operand immP_poll() %{
-  predicate(n->get_ptr() != 0 && n->get_ptr() == (intptr_t)os::get_polling_page());
-  match(ConP);
-
-  // formats are generated automatically for constants and base registers
-  format %{ %}
-  interface(CONST_INTER);
-%}
-
 // Pointer Immediate
 operand immN() %{
   match(ConN);
@@ -5718,16 +5709,6 @@
   ins_pipe(ialu_reg);
 %}
 
-instruct loadConP_poll(rRegP dst, immP_poll src) %{
-  match(Set dst src);
-  format %{ "movq    $dst, $src\t!ptr" %}
-  ins_encode %{
-    AddressLiteral polling_page(os::get_polling_page(), relocInfo::poll_type);
-    __ lea($dst$$Register, polling_page);
-  %}
-  ins_pipe(ialu_reg_fat);
-%}
-
 instruct loadConP31(rRegP dst, immP31 src, rFlagsReg cr)
 %{
   match(Set dst src);
--- a/src/share/vm/memory/barrierSet.hpp	Thu May 10 15:44:19 2012 +0200
+++ b/src/share/vm/memory/barrierSet.hpp	Mon Apr 02 16:05:56 2012 -0700
@@ -181,6 +181,8 @@
   // within the heap, this function tells whether they are met.
   virtual bool is_aligned(HeapWord* addr) = 0;
 
+  // Print a description of the memory for the barrier set
+  virtual void print_on(outputStream* st) const = 0;
 };
 
 #endif // SHARE_VM_MEMORY_BARRIERSET_HPP
--- a/src/share/vm/memory/cardTableModRefBS.cpp	Thu May 10 15:44:19 2012 +0200
+++ b/src/share/vm/memory/cardTableModRefBS.cpp	Mon Apr 02 16:05:56 2012 -0700
@@ -711,6 +711,11 @@
 }
 #endif
 
+void CardTableModRefBS::print_on(outputStream* st) const {
+  st->print_cr("Card table byte_map: [" INTPTR_FORMAT "," INTPTR_FORMAT "] byte_map_base: " INTPTR_FORMAT,
+               _byte_map, _byte_map + _byte_map_size, byte_map_base);
+}
+
 bool CardTableModRefBSForCTRS::card_will_be_scanned(jbyte cv) {
   return
     CardTableModRefBS::card_will_be_scanned(cv) ||
--- a/src/share/vm/memory/cardTableModRefBS.hpp	Thu May 10 15:44:19 2012 +0200
+++ b/src/share/vm/memory/cardTableModRefBS.hpp	Mon Apr 02 16:05:56 2012 -0700
@@ -469,6 +469,9 @@
     return _byte_map + card_index;
   }
 
+  // Print a description of the memory for the barrier set
+  virtual void print_on(outputStream* st) const;
+
   void verify();
   void verify_guard();
 
--- a/src/share/vm/utilities/vmError.cpp	Thu May 10 15:44:19 2012 +0200
+++ b/src/share/vm/utilities/vmError.cpp	Mon Apr 02 16:05:56 2012 -0700
@@ -684,6 +684,12 @@
        // extended (i.e., more detailed) version.
        Universe::print_on(st, true /* extended */);
        st->cr();
+
+       Universe::heap()->barrier_set()->print_on(st);
+       st->cr();
+
+       st->print_cr("Polling page: " INTPTR_FORMAT, os::get_polling_page());
+       st->cr();
      }
 
   STEP(195, "(printing code cache information)" )