harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "johnnylj98" <johnnyl...@gmail.com>
Subject [DRLVM][JVMTI]a bug when running SpecJVM98 _201_compress
Date Wed, 25 Nov 2009 16:27:53 GMT
Hi all,
I'm doing some tuning work for Harmony running SpecJVM98.
I write a JVMTI agent to catch VMDeath event and do something at the end of JVM's life, but
that doesn't work(the same agent work well for hotspot).

my agent likes bellow:
...
static void JNICALL
callbackVMDeath(jvmtiEnv *jvmti, JNIEnv *jni)
{
      assert(false);
printf("vm death\n");
}
JNIEXPORT void JNICALL Agent_OnUnload(JavaVM *jvm)
{
assert(false);
printf("unload!");
}
JNIEXPORT jint JNICALL Agent_OnLoad(JavaVM *jvm, char *options, void *reserved)  
{
...
error = jvmti->SetEventNotificationMode(JVMTI_ENABLE,JVMTI_EVENT_VM_DEATH, (jthread)NULL);
callbacks.VMDeath = &callbackVMDeath;
error = jvmti->SetEventCallbacks(&callbacks,(jint)sizeof(callbacks));
...
}
...
The program ends correctly. This is really strange. Can anyone try this case and explain for
me?

Thanks a lot.

2009-11-26 



johnnylj98 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message