mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 01:54:47 +02:00
8189941: Implementation JEP 312: Thread-local handshake
Introduce a way to execute a callback on threads without performing a global VM safepoint. Make it both possible and cheap to stop individual threads and not just all threads or none. Co-authored-by: Mikael Gerdin <mikael.gerdin@oracle.com> Co-authored-by: Erik Osterlund <erik.osterlund@oracle.com> Reviewed-by: mdoerr, neliasso, acorn, aph, coleenp, dholmes
This commit is contained in:
parent
fdee542113
commit
104ecb2dd1
73 changed files with 1847 additions and 325 deletions
|
@ -4805,20 +4805,6 @@ jint os::init_2(void) {
|
|||
|
||||
Linux::fast_thread_clock_init();
|
||||
|
||||
// Allocate a single page and mark it as readable for safepoint polling
|
||||
address polling_page = (address) ::mmap(NULL, Linux::page_size(), PROT_READ, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
|
||||
guarantee(polling_page != MAP_FAILED, "os::init_2: failed to allocate polling page");
|
||||
|
||||
os::set_polling_page(polling_page);
|
||||
log_info(os)("SafePoint Polling address: " INTPTR_FORMAT, p2i(polling_page));
|
||||
|
||||
if (!UseMembar) {
|
||||
address mem_serialize_page = (address) ::mmap(NULL, Linux::page_size(), PROT_READ | PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
|
||||
guarantee(mem_serialize_page != MAP_FAILED, "mmap Failed for memory serialize page");
|
||||
os::set_memory_serialize_page(mem_serialize_page);
|
||||
log_info(os)("Memory Serialize Page address: " INTPTR_FORMAT, p2i(mem_serialize_page));
|
||||
}
|
||||
|
||||
// initialize suspend/resume support - must do this before signal_sets_init()
|
||||
if (SR_initialize() != 0) {
|
||||
perror("SR_initialize failed");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue