Hi all,

I tried to use JVMTI agent which hooks ResourceExhausted event and 
-XX:ExitOnOutOfMemoryError together.
The process was exited when OutOfMemoryError was occurred, but 
ResourceExhausted event was not fired.

I checked HotSpot implementation, -XX:*OutOfMemoryError is processed before 
JVMTI event processing.

http://hg.openjdk.java.net/jdk/jdk/file/d999a1a11485/src/hotspot/share/gc/shared/memAllocator.cpp#l125

IMHO ResourceExhausted should be called before -XX:*OutOfMemoryError.
If it is a bug, I will file it to JBS and fix it.


Thanks,

Yasumasa

Reply via email to