RFR: 8280784: VM_Cleanup unnecessarily processes all thread oops

Stefan Karlsson stefank at openjdk.java.net
Thu Jan 27 16:19:33 UTC 2022


On Thu, 27 Jan 2022 16:02:09 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> While looking at ZGC latencies in a benchmark with >20000 Java threads, I noticed that the Cleanup VM operation could take up to 500 ms. It turned out that the time was spent processing the oops in all Java threads. Since none of the safepoint cleanup tasks use the oops in the threads, I propose that we stop processing the oops in this VM Operation.
>
> Looks fine, but doesn't that apply to other "empty" VMOps: `VM_None`, `VM_ForceSafepoint`, `VM_ThreadSuspend`, etc? Probably some code commoning is in order there...

@shipilev Yeah, probably. None of the listed VM operations seemed time-sensitive to me, so I left them as-is. But I'll try to unify this and re-run the tests.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7246


More information about the hotspot-dev mailing list