public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [RFA/JVMTI] Update jvmti.h
@ 2006-08-31 22:05 Keith Seitz
  2006-08-31 22:27 ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Keith Seitz @ 2006-08-31 22:05 UTC (permalink / raw)
  To: Java Patch List

[-- Attachment #1: Type: text/plain, Size: 688 bytes --]

Hi,

I would like to update our local copy of jvmti.h with the latest and 
greatest that was committed to classpath. This includes adding a new 
include file, jvmti_md.h (just like jni_md.h), which is empty right now 
(but won't be for long).

This will allow me to submit the (long-ago promised) event notification 
mechanism for JVMTI environments. I promise that patch will really 
require reviewing! :-)

Okay?
Keith

classpath/ChangeLog.gcj
2006-08-31  Keith Seitz  <keiths@redhat.com>

         * include/jvmti.h: Update from Classpath to get latest fixes and
         improvements.

ChangeLog
2006-08-31  Keith Seitz  <keiths@redhat.com>

         * include/jvmti_md.h: New file.


[-- Attachment #2: jvmti-update.patch --]
[-- Type: text/x-patch, Size: 4778 bytes --]

Index: classpath/include/jvmti.h
===================================================================
--- classpath/include/jvmti.h	(revision 116604)
+++ classpath/include/jvmti.h	(working copy)
@@ -45,6 +45,8 @@
 #define _CLASSPATH_JVMTI_H
 #include <jni.h>
 
+#include "jvmti_md.h"
+
 /* The VM might define JVMTI base types */
 #ifndef _CLASSPATH_VM_JVMTI_TYPES_DEFINED
 
@@ -79,7 +81,7 @@
 #ifdef __cplusplus
 typedef struct _Jv_JVMTIEnv jvmtiEnv;
 #else
-typedef const struct _Jv_jvmtiEnv jvmtiEnv;
+typedef const struct _Jv_jvmtiEnv *jvmtiEnv;
 #endif
 
 /*
@@ -140,7 +142,7 @@
   JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED = 70,
   JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED = 71,
   JVMTI_ERROR_MUST_POSSESS_CAPABILITY = 99,
-  JVMTI_ERROR_ILLEGAL_ARGUMENT = 103,
+  JVMTI_ERROR_ILLEGAL_ARGUMENT = 103
 } jvmtiError;
 
 /*
@@ -283,7 +285,7 @@
   JVMTI_EVENT_EXCEPTION_CATCH = 59,
   JVMTI_EVENT_SINGLE_STEP =  60,
   JVMTI_EVENT_FRAME_POP = 61,
-  JVMTI_EVENT_BERAKPOINT = 62,
+  JVMTI_EVENT_BREAKPOINT = 62,
   JVMTI_EVENT_FIELD_ACCESS = 63,
   JVMTI_EVENT_FIELD_MODIFICATION = 64,
   JVMTI_EVENT_METHOD_ENTRY = 65,
@@ -658,7 +660,8 @@
 				      jthread thread);
 
   jvmtiError (JNICALL *StopThread) (jvmtiEnv *env,
-				    jthread thread);
+				    jthread thread,
+                                    jobject exception);
 
   jvmtiError (JNICALL *InterruptThread) (jvmtiEnv *env,
 					 jthread thread);
@@ -790,7 +793,8 @@
 					jrawMonitorID monitor);
 
   jvmtiError (JNICALL *RawMonitorWait) (jvmtiEnv *env,
-					jrawMonitorID monitor);
+					jrawMonitorID monitor,
+                                        jlong millis);
 
   jvmtiError (JNICALL *RawMonitorNotify) (jvmtiEnv *env,
 					  jrawMonitorID monitor);
@@ -844,7 +848,7 @@
 
   jvmtiError (JNICALL *GetSourceFileName) (jvmtiEnv *env,
 					   jclass klass,
-					   char *source_name_ptr);
+					   char **source_name_ptr);
 
   jvmtiError (JNICALL *GetClassModifiers) (jvmtiEnv *env,
 					   jclass klass,
@@ -1249,8 +1253,8 @@
   jvmtiError ResumeThread (jthread thread)
   { return p->ResumeThread (this, thread); }
 
-  jvmtiError StopThread (jthread thread)
-  { return p->StopThread (this, thread); }
+  jvmtiError StopThread (jthread thread, jobject exception)
+  { return p->StopThread (this, thread, exception); }
 
   jvmtiError InterruptThread (jthread thread)
   { return p->InterruptThread (this, thread); }
@@ -1360,8 +1364,8 @@
   jvmtiError RawMonitorExit (jrawMonitorID monitor)
   { return p->RawMonitorExit (this, monitor); }
 
-  jvmtiError RawMonitorWait (jrawMonitorID monitor)
-  { return p->RawMonitorWait (this, monitor); }
+  jvmtiError RawMonitorWait (jrawMonitorID monitor, jlong millis)
+  { return p->RawMonitorWait (this, monitor, millis); }
 
   jvmtiError RawMonitorNotify (jrawMonitorID monitor)
   { return p->RawMonitorNotify (this, monitor); }
@@ -1400,7 +1404,7 @@
   jvmtiError GetClassStatus (jclass klass, jint *status_ptr)
   { return p->GetClassStatus (this, klass, status_ptr); }
 
-  jvmtiError GetSourceFileName (jclass klass, char *source_name_ptr)
+  jvmtiError GetSourceFileName (jclass klass, char **source_name_ptr)
   { return p->GetSourceFileName (this, klass, source_name_ptr); }
 
   jvmtiError GetClassModifiers (jclass klass, jint *modifiers_ptr)
Index: include/jvmti_md.h
===================================================================
--- include/jvmti_md.h	(revision 0)
+++ include/jvmti_md.h	(revision 0)
@@ -0,0 +1,32 @@
+/* jvmti_md.h
+   Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+ 
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License. */
+
+#ifndef __GCJ_JVMTI_MD_H__
+#define __GCJ_JVMTI_MD_H__
+
+// nothing
+
+#endif /* __GCJ_JVMTI_MD_H__ */

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFA/JVMTI] Update jvmti.h
  2006-08-31 22:05 [RFA/JVMTI] Update jvmti.h Keith Seitz
@ 2006-08-31 22:27 ` Tom Tromey
  2006-08-31 22:41   ` Keith Seitz
  2006-08-31 23:20   ` Keith Seitz
  0 siblings, 2 replies; 4+ messages in thread
From: Tom Tromey @ 2006-08-31 22:27 UTC (permalink / raw)
  To: Keith Seitz; +Cc: Java Patch List

>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:

Keith> I would like to update our local copy of jvmti.h with the latest and
Keith> greatest that was committed to classpath. This includes adding a new
Keith> include file, jvmti_md.h (just like jni_md.h), which is empty right
Keith> now (but won't be for long).

Go for it.
This is always fine provided it doesn't break anything :-).
No reason for this kind of thing to block you ...

Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFA/JVMTI] Update jvmti.h
  2006-08-31 22:27 ` Tom Tromey
@ 2006-08-31 22:41   ` Keith Seitz
  2006-08-31 23:20   ` Keith Seitz
  1 sibling, 0 replies; 4+ messages in thread
From: Keith Seitz @ 2006-08-31 22:41 UTC (permalink / raw)
  To: Java Patch List

Tom Tromey wrote:

> Go for it.

Committed.

Thanks,
Keith

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFA/JVMTI] Update jvmti.h
  2006-08-31 22:27 ` Tom Tromey
  2006-08-31 22:41   ` Keith Seitz
@ 2006-08-31 23:20   ` Keith Seitz
  1 sibling, 0 replies; 4+ messages in thread
From: Keith Seitz @ 2006-08-31 23:20 UTC (permalink / raw)
  To: tromey; +Cc: Java Patch List

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]

Tom Tromey wrote:

> This is always fine provided it doesn't break anything :-).

Well it did! I forgot the attached as part of the patch which I've 
committed that as obvious.

Doh!

updated ChangeLog
2006-08-31  Keith Seitz  <keiths@redhat.com>

         * include/jvmti_md.h: New file.

         * jvmti.cc (_Jv_JVMTI_RawMonitorWait): Add millis parameter.
         Pass millis to _Jv_CondWait.

[-- Attachment #2: jvmti_cc-update.patch --]
[-- Type: text/x-patch, Size: 685 bytes --]

Index: jvmti.cc
===================================================================
--- jvmti.cc	(revision 116604)
+++ jvmti.cc	(working copy)
@@ -156,11 +156,12 @@
 }
 
 static jvmtiError JNICALL
-_Jv_JVMTI_RawMonitorWait (MAYBE_UNUSED jvmtiEnv *env, jrawMonitorID monitor)
+_Jv_JVMTI_RawMonitorWait (MAYBE_UNUSED jvmtiEnv *env, jrawMonitorID monitor,
+			  jlong millis)
 {
   if (monitor == NULL)
     return JVMTI_ERROR_INVALID_MONITOR;
-  int r = _Jv_CondWait (&monitor->condition, &monitor->mutex, 0, 0);
+  int r = _Jv_CondWait (&monitor->condition, &monitor->mutex, millis, 0);
   if (r == _JV_NOT_OWNER)
     return JVMTI_ERROR_NOT_MONITOR_OWNER;
   if (r == _JV_INTERRUPTED)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-08-31 23:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-31 22:05 [RFA/JVMTI] Update jvmti.h Keith Seitz
2006-08-31 22:27 ` Tom Tromey
2006-08-31 22:41   ` Keith Seitz
2006-08-31 23:20   ` Keith Seitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).