comparison src/share/vm/runtime/sharedRuntime.cpp @ 4875:379b22e03c32

Merge
author jcoomes
date Fri, 03 Feb 2012 12:08:55 -0800
parents 0382d2b469b2
children 09d00c18e323
comparison
equal deleted inserted replaced
4866:527cf36f4a20 4875:379b22e03c32
1 /* 1 /*
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2012, 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.
884 assert(exception_kind == IMPLICIT_NULL || exception_kind == IMPLICIT_DIVIDE_BY_ZERO, "wrong implicit exception kind"); 884 assert(exception_kind == IMPLICIT_NULL || exception_kind == IMPLICIT_DIVIDE_BY_ZERO, "wrong implicit exception kind");
885 885
886 // for AbortVMOnException flag 886 // for AbortVMOnException flag
887 NOT_PRODUCT(Exceptions::debug_check_abort("java.lang.NullPointerException")); 887 NOT_PRODUCT(Exceptions::debug_check_abort("java.lang.NullPointerException"));
888 if (exception_kind == IMPLICIT_NULL) { 888 if (exception_kind == IMPLICIT_NULL) {
889 Events::log("Implicit null exception at " INTPTR_FORMAT " to " INTPTR_FORMAT, pc, target_pc); 889 Events::log_exception(thread, "Implicit null exception at " INTPTR_FORMAT " to " INTPTR_FORMAT, pc, target_pc);
890 } else { 890 } else {
891 Events::log("Implicit division by zero exception at " INTPTR_FORMAT " to " INTPTR_FORMAT, pc, target_pc); 891 Events::log_exception(thread, "Implicit division by zero exception at " INTPTR_FORMAT " to " INTPTR_FORMAT, pc, target_pc);
892 } 892 }
893 return target_pc; 893 return target_pc;
894 } 894 }
895 895
896 ShouldNotReachHere(); 896 ShouldNotReachHere();
1539 // so no update to the caller is needed. 1539 // so no update to the caller is needed.
1540 1540
1541 if (caller.is_compiled_frame() && !caller.is_deoptimized_frame()) { 1541 if (caller.is_compiled_frame() && !caller.is_deoptimized_frame()) {
1542 1542
1543 address pc = caller.pc(); 1543 address pc = caller.pc();
1544 Events::log("update call-site at pc " INTPTR_FORMAT, pc);
1545 1544
1546 // Default call_addr is the location of the "basic" call. 1545 // Default call_addr is the location of the "basic" call.
1547 // Determine the address of the call we a reresolving. With 1546 // Determine the address of the call we a reresolving. With
1548 // Inline Caches we will always find a recognizable call. 1547 // Inline Caches we will always find a recognizable call.
1549 // With Inline Caches disabled we may or may not find a 1548 // With Inline Caches disabled we may or may not find a
2677 CompileBroker::handle_full_code_cache(); 2676 CompileBroker::handle_full_code_cache();
2678 } 2677 }
2679 return nm; 2678 return nm;
2680 } 2679 }
2681 2680
2681 JRT_ENTRY_NO_ASYNC(void, SharedRuntime::block_for_jni_critical(JavaThread* thread))
2682 assert(thread == JavaThread::current(), "must be");
2683 // The code is about to enter a JNI lazy critical native method and
2684 // _needs_gc is true, so if this thread is already in a critical
2685 // section then just return, otherwise this thread should block
2686 // until needs_gc has been cleared.
2687 if (thread->in_critical()) {
2688 return;
2689 }
2690 // Lock and unlock a critical section to give the system a chance to block
2691 GC_locker::lock_critical(thread);
2692 GC_locker::unlock_critical(thread);
2693 JRT_END
2694
2682 #ifdef HAVE_DTRACE_H 2695 #ifdef HAVE_DTRACE_H
2683 // Create a dtrace nmethod for this method. The wrapper converts the 2696 // Create a dtrace nmethod for this method. The wrapper converts the
2684 // java compiled calling convention to the native convention, makes a dummy call 2697 // java compiled calling convention to the native convention, makes a dummy call
2685 // (actually nops for the size of the call instruction, which become a trap if 2698 // (actually nops for the size of the call instruction, which become a trap if
2686 // probe is enabled). The returns to the caller. Since this all looks like a 2699 // probe is enabled). The returns to the caller. Since this all looks like a