diff src/share/vm/code/nmethod.hpp @ 1937:4853c5cad3aa

More deoptmization tracing.
author Thomas Wuerthinger <wuerthinger@ssw.jku.at>
date Thu, 23 Dec 2010 22:14:31 +0100
parents d5d065957597
children 06f017f7daa7
line wrap: on
line diff
--- a/src/share/vm/code/nmethod.hpp	Thu Dec 23 18:13:28 2010 +0100
+++ b/src/share/vm/code/nmethod.hpp	Thu Dec 23 22:14:31 2010 +0100
@@ -579,7 +579,10 @@
   // Deopt
   // Return true is the PC is one would expect if the frame is being deopted.
   bool is_deopt_pc      (address pc) { return is_deopt_entry(pc) || is_deopt_mh_entry(pc); }
-  bool is_deopt_entry   (address pc) { return pc == deopt_handler_begin(); }
+
+  // (tw) When using C1X, the address might be off by 5 (because this is the size of the call instruction.
+  // (tw) TODO: Replace this by a more general mechanism.
+  bool is_deopt_entry   (address pc) { return pc == deopt_handler_begin() || (UseC1X && pc == deopt_handler_begin() + 5); }
   bool is_deopt_mh_entry(address pc) { return pc == deopt_mh_handler_begin(); }
   // Accessor/mutator for the original pc of a frame before a frame was deopted.
   address get_original_pc(const frame* fr) { return *orig_pc_addr(fr); }