4 ms·
I believe, Oracle JVM uses polling? This is the class responsible for safepoints: https://github.com/openjdk/jdk/blob/4b544f93ad0e2beae4c80e060cae727d143151ac/
by cyberax 1y ago
I believe, Oracle JVM uses polling?
This is the class responsible for safepoints:
https://github.com/openjdk/jdk/blob/4b544f93ad0e2beae4c80e060cae727d143151ac/src/hotspot/share/runtime/safepointMechanism.hpp#L38 https://github.com/openjdk/jdk/blob/4b544f93ad0e2beae4c80e06...
And this is one of the implementations:
https://github.com/openjdk/jdk/blob/4b544f93ad0e2beae4c80e060cae727d143151ac/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp#L3773 https://github.com/openjdk/jdk/blob/4b544f93ad0e2beae4c80e06...
The arming code: https://github.com/openjdk/jdk/blob/4b544f93ad0e2beae4c80e060cae727d143151ac/src/hotspot/share/runtime/safepointMechanism.cpp#L94 https://github.com/openjdk/jdk/blob/4b544f93ad0e2beae4c80e06...
I might be missing something, but I'd be terribly surprised if VM games are worth it.
- pizlonator 1y agoThat JVM totally uses the page protection trick. Look at the code that talks about polling page.
- cyberax 1y agoD'oh. I don't know how I missed it. It's right there around the line 69. Nice. Well, I'm definitely surprised it works.