1.1 --- a/src/share/vm/runtime/deoptimization.cpp Wed Feb 01 10:36:58 2012 +0100 1.2 +++ b/src/share/vm/runtime/deoptimization.cpp Wed Feb 01 07:59:01 2012 -0800 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -339,7 +339,6 @@ 1.11 1.12 #ifdef ASSERT 1.13 assert(cb->is_deoptimization_stub() || cb->is_uncommon_trap_stub(), "just checking"); 1.14 - Events::log("fetch unroll sp " INTPTR_FORMAT, unpack_sp); 1.15 #endif 1.16 #else 1.17 intptr_t* unpack_sp = stub_frame.sender(&dummy_map).unextended_sp(); 1.18 @@ -577,6 +576,8 @@ 1.19 tty->print_cr("DEOPT UNPACKING thread " INTPTR_FORMAT " vframeArray " INTPTR_FORMAT " mode %d", thread, array, exec_mode); 1.20 } 1.21 #endif 1.22 + Events::log(thread, "DEOPT UNPACKING pc=" INTPTR_FORMAT " sp=" INTPTR_FORMAT " mode %d", 1.23 + stub_frame.pc(), stub_frame.sp(), exec_mode); 1.24 1.25 UnrollBlock* info = array->unroll_block(); 1.26 1.27 @@ -981,6 +982,7 @@ 1.28 #endif // COMPILER2 1.29 1.30 vframeArray* Deoptimization::create_vframeArray(JavaThread* thread, frame fr, RegisterMap *reg_map, GrowableArray<compiledVFrame*>* chunk) { 1.31 + Events::log(thread, "DEOPT PACKING pc=" INTPTR_FORMAT " sp=" INTPTR_FORMAT, fr.pc(), fr.sp()); 1.32 1.33 #ifndef PRODUCT 1.34 if (TraceDeoptimization) { 1.35 @@ -1026,7 +1028,6 @@ 1.36 1.37 // Compare the vframeArray to the collected vframes 1.38 assert(array->structural_compare(thread, chunk), "just checking"); 1.39 - Events::log("# vframes = %d", (intptr_t)chunk->length()); 1.40 1.41 #ifndef PRODUCT 1.42 if (TraceDeoptimization) { 1.43 @@ -1124,8 +1125,6 @@ 1.44 1.45 gather_statistics(Reason_constraint, Action_none, Bytecodes::_illegal); 1.46 1.47 - EventMark m("Deoptimization (pc=" INTPTR_FORMAT ", sp=" INTPTR_FORMAT ")", fr.pc(), fr.id()); 1.48 - 1.49 // Patch the nmethod so that when execution returns to it we will 1.50 // deopt the execution state and return to the interpreter. 1.51 fr.deoptimize(thread); 1.52 @@ -1239,6 +1238,10 @@ 1.53 // before we are done with it. 1.54 nmethodLocker nl(fr.pc()); 1.55 1.56 + // Log a message 1.57 + Events::log_deopt_message(thread, "Uncommon trap %d fr.pc " INTPTR_FORMAT, 1.58 + trap_request, fr.pc()); 1.59 + 1.60 { 1.61 ResourceMark rm; 1.62 1.63 @@ -1249,7 +1252,6 @@ 1.64 DeoptAction action = trap_request_action(trap_request); 1.65 jint unloaded_class_index = trap_request_index(trap_request); // CP idx or -1 1.66 1.67 - Events::log("Uncommon trap occurred @" INTPTR_FORMAT " unloaded_class_index = %d", fr.pc(), (int) trap_request); 1.68 vframe* vf = vframe::new_vframe(&fr, ®_map, thread); 1.69 compiledVFrame* cvf = compiledVFrame::cast(vf); 1.70