]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* java/lang/natThread.cc (finish_): Add JVMTI ThreadEnd notification.
authorkseitz <kseitz@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Jan 2007 22:05:10 +0000 (22:05 +0000)
committerkseitz <kseitz@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Jan 2007 22:05:10 +0000 (22:05 +0000)
        (_Jv_NotifyThreadStart): Add JVMTI ThreadStart notification.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120877 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/java/lang/natThread.cc

index 0ee504a0b6a69da1933ed560f1d754b602918690..64ce665ef4dcda33a8fa5f36f751ec918b0c20a1 100644 (file)
@@ -1,3 +1,8 @@
+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>
 
        * configure.ac: Use multi.m4 from aclocal rather than custom
index 9e2f7dd674d9241fbe7caf1df4cffd6644e7f286..8a09f4f1a0f8ee15f828842566138d60bbba0555 100644 (file)
@@ -27,6 +27,8 @@ details.  */
 #include <java/lang/NullPointerException.h>
 
 #include <jni.h>
+#include <jvmti.h>
+#include "jvmti-int.h"
 
 #ifdef ENABLE_JVMPI
 #include <jvmpi.h>
@@ -215,6 +217,9 @@ java::lang::Thread::finish_ ()
   nt->park_helper.deactivate ();
   group->removeThread (this);
 
+  if (JVMTI_REQUESTED_EVENT (ThreadEnd))
+    _Jv_JVMTI_PostEvent (JVMTI_EVENT_THREAD_END, this, nt->jni_env);
+
 #ifdef ENABLE_JVMPI  
   if (_Jv_JVMPI_Notify_THREAD_END)
     {
@@ -253,6 +258,12 @@ java::lang::Thread::finish_ ()
 static void
 _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
       if (_Jv_JVMPI_Notify_THREAD_START)
        {