1 /* |
1 /* |
2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
530 // debugging support |
530 // debugging support |
531 // tracing |
531 // tracing |
532 if (TraceExceptions) { |
532 if (TraceExceptions) { |
533 ttyLocker ttyl; |
533 ttyLocker ttyl; |
534 ResourceMark rm; |
534 ResourceMark rm; |
535 tty->print_cr("Exception <%s> (0x%x) thrown in compiled method <%s> at PC " PTR_FORMAT " for thread 0x%x", |
535 tty->print_cr("Exception <%s> (" INTPTR_FORMAT ") thrown in compiled method <%s> at PC " INTPTR_FORMAT " for thread " INTPTR_FORMAT "", |
536 exception->print_value_string(), (address)exception(), nm->method()->print_value_string(), pc, thread); |
536 exception->print_value_string(), p2i((address)exception()), nm->method()->print_value_string(), p2i(pc), p2i(thread)); |
537 } |
537 } |
538 // for AbortVMOnException flag |
538 // for AbortVMOnException flag |
539 NOT_PRODUCT(Exceptions::debug_check_abort(exception)); |
539 NOT_PRODUCT(Exceptions::debug_check_abort(exception)); |
540 |
540 |
541 // Clear out the exception oop and pc since looking up an |
541 // Clear out the exception oop and pc since looking up an |
986 unsigned char* byte_skip = (unsigned char*) (stub_location - 2); |
986 unsigned char* byte_skip = (unsigned char*) (stub_location - 2); |
987 unsigned char* being_initialized_entry_offset = (unsigned char*) (stub_location - 3); |
987 unsigned char* being_initialized_entry_offset = (unsigned char*) (stub_location - 3); |
988 address copy_buff = stub_location - *byte_skip - *byte_count; |
988 address copy_buff = stub_location - *byte_skip - *byte_count; |
989 address being_initialized_entry = stub_location - *being_initialized_entry_offset; |
989 address being_initialized_entry = stub_location - *being_initialized_entry_offset; |
990 if (TracePatching) { |
990 if (TracePatching) { |
991 tty->print_cr(" Patching %s at bci %d at address 0x%x (%s)", Bytecodes::name(code), bci, |
991 tty->print_cr(" Patching %s at bci %d at address " INTPTR_FORMAT " (%s)", Bytecodes::name(code), bci, |
992 instr_pc, (stub_id == Runtime1::access_field_patching_id) ? "field" : "klass"); |
992 p2i(instr_pc), (stub_id == Runtime1::access_field_patching_id) ? "field" : "klass"); |
993 nmethod* caller_code = CodeCache::find_nmethod(caller_frame.pc()); |
993 nmethod* caller_code = CodeCache::find_nmethod(caller_frame.pc()); |
994 assert(caller_code != NULL, "nmethod not found"); |
994 assert(caller_code != NULL, "nmethod not found"); |
995 |
995 |
996 // NOTE we use pc() not original_pc() because we already know they are |
996 // NOTE we use pc() not original_pc() because we already know they are |
997 // identical otherwise we'd have never entered this block of code |
997 // identical otherwise we'd have never entered this block of code |
1446 stringStream ss1, ss2; |
1446 stringStream ss1, ss2; |
1447 vframeStream vfst(thread); |
1447 vframeStream vfst(thread); |
1448 methodHandle inlinee = methodHandle(vfst.method()); |
1448 methodHandle inlinee = methodHandle(vfst.method()); |
1449 inlinee->print_short_name(&ss1); |
1449 inlinee->print_short_name(&ss1); |
1450 m->print_short_name(&ss2); |
1450 m->print_short_name(&ss2); |
1451 tty->print_cr("Predicate failed trap in method %s at bci %d inlined in %s at pc %x", ss1.as_string(), vfst.bci(), ss2.as_string(), caller_frame.pc()); |
1451 tty->print_cr("Predicate failed trap in method %s at bci %d inlined in %s at pc " INTPTR_FORMAT, ss1.as_string(), vfst.bci(), ss2.as_string(), p2i(caller_frame.pc())); |
1452 } |
1452 } |
1453 |
1453 |
1454 |
1454 |
1455 Deoptimization::deoptimize_frame(thread, caller_frame.id()); |
1455 Deoptimization::deoptimize_frame(thread, caller_frame.id()); |
1456 |
1456 |