< prev index next >
src/hotspot/os/solaris/os_solaris.cpp
Print this page
rev 51957 : 8224221: add memprotect calls to event log
Reviewed-by: dholmes, mdoerr
*** 2702,2711 ****
--- 2702,2712 ----
}
static bool solaris_mprotect(char* addr, size_t bytes, int prot) {
assert(addr == (char*)align_down((uintptr_t)addr, os::vm_page_size()),
"addr must be page aligned");
+ Events::log(NULL, "Protecting memory [" INTPTR_FORMAT "," INTPTR_FORMAT "] with protection modes %x", p2i(addr), p2i(addr+bytes), prot);
int retVal = mprotect(addr, bytes, prot);
return retVal == 0;
}
// Protect memory (Used to pass readonly pages through
*** 4302,4318 ****
--- 4303,4321 ----
return JNI_OK;
}
// Mark the polling page as unreadable
void os::make_polling_page_unreadable(void) {
+ Events::log(NULL, "Protecting polling page " INTPTR_FORMAT " with PROT_NONE", p2i(_polling_page));
if (mprotect((char *)_polling_page, page_size, PROT_NONE) != 0) {
fatal("Could not disable polling page");
}
}
// Mark the polling page as readable
void os::make_polling_page_readable(void) {
+ Events::log(NULL, "Protecting polling page " INTPTR_FORMAT " with PROT_READ", p2i(_polling_page));
if (mprotect((char *)_polling_page, page_size, PROT_READ) != 0) {
fatal("Could not enable polling page");
}
}
< prev index next >