This is the mail archive of the java-patches@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: JVMPI




Tom wrote:
> The user can make nested calls to these functions.  I think we have to
> track this in boehm.cc, since it isn't handled in the GC itself.

Right - I forgot about that.

> These functions must also be defined in nogc.cc.

Ok.
  
> Anthony> + extern void (*_Jv_JVMPI_Notify_OBJECT_ALLOC) (JVMPI_Event *event);
> Anthony> + extern void (*_Jv_JVMPI_Notify_THREAD_END) (JVMPI_Event *event);
> Anthony> + extern void (*_Jv_JVMPI_Notify_THREAD_START) (JVMPI_Event *event);
> 
> Could we declare these in a header somewhere?

Ok.

> Also, why call these instead of just calling through the global
> JVMPI_Interface structure?

The way I've done it, each event can have a different notify callback.
The JVMPI_Interface structure can only hold one.  I didn't find any
documentation explaining whether or not you can have different notify
callbacks, so I just picked which one would be most useful.

> Anthony> + #pragma weak JNI_OnLoad
> Anthony> +   extern jint JNI_OnLoad (JavaVM *, void *) __attribute__((weak));
> 
> Interesting approach :-).
> Do we know that one or the other of these will always work?

No.  I don't remember why I did this.  I think maybe only the #pragma
was actually working because jni.h's JNI_OnLoad prototype doesn't have
the weak attribute and was overriding the one in this file.

> One last thing: we should install jvmpi.h in the same place we install
> jni.h.

Oops.  Yes.

Thanks,

AG

-- 
Anthony Green                                                        Red Hat
                                                       Sunnyvale, California

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]