HI, all

  This bug is filed after this bug
  8010992: Remove calls to global ::operator new[] and new
  was anti-delta'ed due to testing failure on JVMTI. Now it takes both.

  http://cr.openjdk.java.net/~minqi/8012902/webrev/

ObjectMonitor is an class which should not inherit from any class, but is has subclass in Jvmti, JvmtiRawMonitor. In previous changeset, ObjectMonitor is created through NEW_C_HEAP_OBJ/ARRAY macros, but JvmtiRawMonitor was missed. This is why when it is 'new'ed failed on disabled global operator new in debug mode. To prevent using more complex form of marco NEW_C_HEAP_OBJ/ARRAY operator new and new[] added to ObjectMonitor so JvmtiRawMonitor will inherit for them.

HandleMark should be a StackObj but we create the first one in Thread ctor in heap, so it did not have StackObj as parent. Added oerator new and new [] to it though in fact it is used as StackObj. Same treatment for MemRegion too, it is an _ValueObj (in Linux, it did not inherit from any). Adding operator new and new[] is mainly avoid using macro involving alloc/dealloc and ctor/dtor complexity.

The make files, vm.make and fastdebug.make changed under BSD is for one problem which is not clear: jdk code called operator new in hotspot library. This only happens on Darwin. Exposure of CATCH_OPERATOR_NEW_USAGE giving an warning when first time global operator new and new [] called.

  Tested with JPRT, vm.quick, jtreg.

  Thanks
  Yumin

Reply via email to