RFR(s): 8234086: VM operation can be simplified

David Holmes david.holmes at oracle.com
Tue Nov 19 13:27:33 UTC 2019


Hi Robbin,

On 19/11/2019 9:05 pm, Robbin Ehn wrote:
> Hi all, please review.

Preliminary comments ... so ...

+class VM_Operation : public StackObj {
   public:
    enum Mode {
      _safepoint,       // blocking,        safepoint, vm_op C-heap 
allocated
-    _no_safepoint,    // blocking,     no safepoint, vm_op C-Heap allocated
-    _concurrent,      // non-blocking, no safepoint, vm_op C-Heap allocated
-    _async_safepoint  // non-blocking,    safepoint, vm_op C-Heap allocated
+    _no_safepoint    // blocking,     no safepoint, vm_op C-Heap allocated
    };


You are basically getting rid of concurrent and async_safepoint VM op 
capability. Okay. But you're also making all VM ops StackObj so all 
those "VM op C-heap allocated" comments are no longer correct. Also many 
of the comments around the VM ops you have changed from async to 
sync,and from C-heap to stackobj, are also no longer correct.

Please update.

Thanks,
David
-----

> CMS was the last real user of the more advantage features of VM operation.
> VM operation can be simplified to always be an stack object and thus 
> either be
> of safepoint or no safepoint type.
> 
> VM_EnableBiasedLocking is executed once by watcher thread, if needed 
> (default not used). Making it synchrone doesn't matter.
> VM_ThreadStop is executed by a JavaThread, that thread should stop for 
> the safepoint anyways, no real point in not stopping direct.
> VM_ScavengeMonitors is only used to trigger a safepoint cleanup, the VM 
> op is not needed. Arguably this thread should actually stop here, since 
> we are about to safepoint.
> 
> There is also a small cleanup in vmThread.cpp where an unused method is 
> removed.
> And the extra safepoint is removed:
> "// We want to make sure that we get to a safepoint regularly"
> No we don't :)
> 
> Issue:
> https://bugs.openjdk.java.net/browse/JDK-8234086
> Change-set:
> http://cr.openjdk.java.net/~rehn/8234086/v1/webrev/index.html
> 
> Tested scavenge manually, passes t1-2.
> 
> Thanks, Robbin


More information about the hotspot-runtime-dev mailing list