Commit 6ef43f56 by Keith Seitz Committed by Keith Seitz

natThread.cc (finish_): Add JVMTI ThreadEnd notification.

        * java/lang/natThread.cc (finish_): Add JVMTI ThreadEnd notification.
        (_Jv_NotifyThreadStart): Add JVMTI ThreadStart notification.

From-SVN: r120877
parent a6803416
2007-01-17 Keith Seitz <keiths@redhat.com>
* java/lang/natThread.cc (finish_): Add JVMTI ThreadEnd notification.
(_Jv_NotifyThreadStart): Add JVMTI ThreadStart notification.
2007-01-16 Jack Howarth <howarth@bromo.med.uc.edu> 2007-01-16 Jack Howarth <howarth@bromo.med.uc.edu>
* configure.ac: Use multi.m4 from aclocal rather than custom * configure.ac: Use multi.m4 from aclocal rather than custom
......
...@@ -27,6 +27,8 @@ details. */ ...@@ -27,6 +27,8 @@ details. */
#include <java/lang/NullPointerException.h> #include <java/lang/NullPointerException.h>
#include <jni.h> #include <jni.h>
#include <jvmti.h>
#include "jvmti-int.h"
#ifdef ENABLE_JVMPI #ifdef ENABLE_JVMPI
#include <jvmpi.h> #include <jvmpi.h>
...@@ -215,6 +217,9 @@ java::lang::Thread::finish_ () ...@@ -215,6 +217,9 @@ java::lang::Thread::finish_ ()
nt->park_helper.deactivate (); nt->park_helper.deactivate ();
group->removeThread (this); group->removeThread (this);
if (JVMTI_REQUESTED_EVENT (ThreadEnd))
_Jv_JVMTI_PostEvent (JVMTI_EVENT_THREAD_END, this, nt->jni_env);
#ifdef ENABLE_JVMPI #ifdef ENABLE_JVMPI
if (_Jv_JVMPI_Notify_THREAD_END) if (_Jv_JVMPI_Notify_THREAD_END)
{ {
...@@ -253,6 +258,12 @@ java::lang::Thread::finish_ () ...@@ -253,6 +258,12 @@ java::lang::Thread::finish_ ()
static void static void
_Jv_NotifyThreadStart (java::lang::Thread* thread) _Jv_NotifyThreadStart (java::lang::Thread* thread)
{ {
if (JVMTI_REQUESTED_EVENT (ThreadStart))
{
natThread *nt = reinterpret_cast<natThread *> (thread->data);
_Jv_JVMTI_PostEvent (JVMTI_EVENT_THREAD_START, thread, nt->jni_env);
}
#ifdef ENABLE_JVMPI #ifdef ENABLE_JVMPI
if (_Jv_JVMPI_Notify_THREAD_START) if (_Jv_JVMPI_Notify_THREAD_START)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment