# HG changeset patch # User Christian Haeubl # Date 1367843971 -7200 # Node ID 314814fa0223b773b0fd0caf3184be8fabe873ab # Parent c9e9ce8ce16ad4bdc12a5fb3e6486b6ae50f3dd4 record deopts on the root method diff -r c9e9ce8ce16a -r 314814fa0223 src/share/vm/runtime/deoptimization.cpp --- 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;