-
Bug
-
Resolution: Fixed
-
P3
-
1.3.1
-
03
-
x86
-
windows_nt
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2046583 | 1.4.0 | Mandy Chung | P3 | Resolved | Fixed | beta3 |
OS: Win2K
JDK: 1.3.1
Enable JVMPI_EVENT_OBJECT_ALLOC, and disable it, and enable it again. Then this
event is not sent. But classc VM is OK. This poroblem is only HotSpot VM problem.
I implement the fix for bugid:4449231, but couldn't get the improvement.
------------------------------------------------------------------
#include "jvmpi.h"
JVMPI_Interface *jvmpi_interface;
#define CALL(f) (jvmpi_interface->f)
static void notify_event(JVMPI_Event *event)
{
switch(event->event_type) {
case JVMPI_EVENT_OBJECT_ALLOC:
print("object_alloc\n");
break;
default:
break;
}
}
JNIEXPORT jint JNICALL JVM_OnLoad(JavaVM *jvm, char *options, void *erserved)
{
if((*jvm)->GetEnv(jvm, (void **)&jvmpi_interface, JVMPI_VERSION_1) < 0)
return JNI_ERR;
jvmpi_interface->NotifyEvent = notify_event;
CALL(EnableEvent)(JVMPI_EVENT_OBJECT_ALLOC, NULL);
CALL(DisableEvent)(JVMPI_EVENT_OBJECT_ALLOC, NULL);
CALL(EnableEvent)(JVMPI_EVENT_OBJECT_ALLOC, NULL);
return JNI_OK;
}
--------------------------------------------------------------------
JDK: 1.3.1
Enable JVMPI_EVENT_OBJECT_ALLOC, and disable it, and enable it again. Then this
event is not sent. But classc VM is OK. This poroblem is only HotSpot VM problem.
I implement the fix for bugid:4449231, but couldn't get the improvement.
------------------------------------------------------------------
#include "jvmpi.h"
JVMPI_Interface *jvmpi_interface;
#define CALL(f) (jvmpi_interface->f)
static void notify_event(JVMPI_Event *event)
{
switch(event->event_type) {
case JVMPI_EVENT_OBJECT_ALLOC:
print("object_alloc\n");
break;
default:
break;
}
}
JNIEXPORT jint JNICALL JVM_OnLoad(JavaVM *jvm, char *options, void *erserved)
{
if((*jvm)->GetEnv(jvm, (void **)&jvmpi_interface, JVMPI_VERSION_1) < 0)
return JNI_ERR;
jvmpi_interface->NotifyEvent = notify_event;
CALL(EnableEvent)(JVMPI_EVENT_OBJECT_ALLOC, NULL);
CALL(DisableEvent)(JVMPI_EVENT_OBJECT_ALLOC, NULL);
CALL(EnableEvent)(JVMPI_EVENT_OBJECT_ALLOC, NULL);
return JNI_OK;
}
--------------------------------------------------------------------
- backported by
-
JDK-2046583 Future EnableEvent of OBJECT_ALLOC event is ignored once it's disabled
- Resolved