I could put it in Agent_Initialize(). It would be a little simpler since
I would not need to call and error check GetEnv() again. I initially had
done it there, but ran into the crash due to handle issues, so I moved
it to JNI_OnLoad. But ended up having the same problem there, and it was
due to specifying JVMTI_VERSION_1 on the GetEnv() call. I think possibly
the dispatch table is different and it was not doing the NewGlobalRef()
call properly. So Agent_Initialize() might work now that I'm specifying
JVMTI_VERSION_9.
thanks,
Chris
On 12/7/17 12:02 AM, serguei.spit...@oracle.com wrote:
Hi Chris,
This variant is not that simple as one would expect but it looks Ok to
me.
Thanks,
Serguei
On 12/6/17 23:44, Chris Plummer wrote:
New webrev:
https://bugs.openjdk.java.net/browse/JDK-8191229
http://cr.openjdk.java.net/~cjplummer/8191229/webrev.01/
testClass now initialized from JNI_OnLoad(), and use memset to clear
callbacks. Also updated to use JVMTI_VERSION_9 when calling GetEnv().
thanks,
Chris