equal
deleted
inserted
replaced
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. |
2714 if (java_throwable == NULL) { |
2714 if (java_throwable == NULL) { |
2715 THROW(vmSymbols::java_lang_NullPointerException()); |
2715 THROW(vmSymbols::java_lang_NullPointerException()); |
2716 } |
2716 } |
2717 oop java_thread = JNIHandles::resolve_non_null(jthread); |
2717 oop java_thread = JNIHandles::resolve_non_null(jthread); |
2718 JavaThread* receiver = java_lang_Thread::thread(java_thread); |
2718 JavaThread* receiver = java_lang_Thread::thread(java_thread); |
2719 Events::log("JVM_StopThread thread JavaThread " INTPTR_FORMAT " as oop " INTPTR_FORMAT " [exception " INTPTR_FORMAT "]", receiver, (address)java_thread, throwable); |
2719 Events::log_exception(JavaThread::current(), |
|
2720 "JVM_StopThread thread JavaThread " INTPTR_FORMAT " as oop " INTPTR_FORMAT " [exception " INTPTR_FORMAT "]", |
|
2721 receiver, (address)java_thread, throwable); |
2720 // First check if thread is alive |
2722 // First check if thread is alive |
2721 if (receiver != NULL) { |
2723 if (receiver != NULL) { |
2722 // Check if exception is getting thrown at self (use oop equality, since the |
2724 // Check if exception is getting thrown at self (use oop equality, since the |
2723 // target object might exit) |
2725 // target object might exit) |
2724 if (java_thread == thread->threadObj()) { |
2726 if (java_thread == thread->threadObj()) { |