comparison src/share/vm/runtime/deoptimization.cpp @ 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 b9a918201d47
children f0ef8f58a1d9
comparison
equal deleted inserted replaced
9569:c9e9ce8ce16a 9570:314814fa0223
1342 gather_statistics(reason, action, trap_bc); 1342 gather_statistics(reason, action, trap_bc);
1343 1343
1344 // Ensure that we can record deopt. history: 1344 // Ensure that we can record deopt. history:
1345 bool create_if_missing = ProfileTraps; 1345 bool create_if_missing = ProfileTraps;
1346 1346
1347 methodHandle profiled_method;
1348 #ifdef GRAALVM
1349 profiled_method = nm->method();
1350 #else
1351 profiled_method = trap_method;
1352 #endif
1353
1347 MethodData* trap_mdo = 1354 MethodData* trap_mdo =
1348 get_method_data(thread, trap_method, create_if_missing); 1355 get_method_data(thread, profiled_method, create_if_missing);
1349 1356
1350 // Log a message 1357 // Log a message
1351 Events::log_deopt_message(thread, "Uncommon trap: reason=%s action=%s pc=" INTPTR_FORMAT " method=%s @ %d", 1358 Events::log_deopt_message(thread, "Uncommon trap: reason=%s action=%s pc=" INTPTR_FORMAT " method=%s @ %d",
1352 trap_reason_name(reason), trap_action_name(action), fr.pc(), 1359 trap_reason_name(reason), trap_action_name(action), fr.pc(),
1353 trap_method->name_and_sig_as_C_string(), trap_bci); 1360 trap_method->name_and_sig_as_C_string(), trap_bci);
1536 // to use the MDO to detect hot deoptimization points and control 1543 // to use the MDO to detect hot deoptimization points and control
1537 // aggressive optimization. 1544 // aggressive optimization.
1538 bool inc_recompile_count = false; 1545 bool inc_recompile_count = false;
1539 ProfileData* pdata = NULL; 1546 ProfileData* pdata = NULL;
1540 if (ProfileTraps && update_trap_state && trap_mdo != NULL) { 1547 if (ProfileTraps && update_trap_state && trap_mdo != NULL) {
1541 assert(trap_mdo == get_method_data(thread, trap_method, false), "sanity");
1542 uint this_trap_count = 0; 1548 uint this_trap_count = 0;
1543 bool maybe_prior_trap = false; 1549 bool maybe_prior_trap = false;
1544 bool maybe_prior_recompile = false; 1550 bool maybe_prior_recompile = false;
1545 pdata = query_update_method_data(trap_mdo, trap_bci, reason, true, 1551 pdata = query_update_method_data(trap_mdo, trap_bci, reason, true,
1546 //outputs: 1552 //outputs: