changeset 9570:314814fa0223

record deopts on the root method
author Christian Haeubl <haeubl@ssw.jku.at>
date Mon, 06 May 2013 14:39:31 +0200
parents c9e9ce8ce16a
children f0ef8f58a1d9
files src/share/vm/runtime/deoptimization.cpp
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/runtime/deoptimization.cpp	Mon May 06 13:03:37 2013 +0200
+++ b/src/share/vm/runtime/deoptimization.cpp	Mon May 06 14:39:31 2013 +0200
@@ -1344,8 +1344,15 @@
     // Ensure that we can record deopt. history:
     bool create_if_missing = ProfileTraps;
 
+    methodHandle profiled_method;
+#ifdef GRAALVM
+    profiled_method = nm->method();
+#else
+    profiled_method = trap_method;
+#endif
+
     MethodData* trap_mdo =
-      get_method_data(thread, trap_method, create_if_missing);
+      get_method_data(thread, profiled_method, create_if_missing);
 
     // Log a message
     Events::log_deopt_message(thread, "Uncommon trap: reason=%s action=%s pc=" INTPTR_FORMAT " method=%s @ %d",
@@ -1538,7 +1545,6 @@
     bool inc_recompile_count = false;
     ProfileData* pdata = NULL;
     if (ProfileTraps && update_trap_state && trap_mdo != NULL) {
-      assert(trap_mdo == get_method_data(thread, trap_method, false), "sanity");
       uint this_trap_count = 0;
       bool maybe_prior_trap = false;
       bool maybe_prior_recompile = false;