8032827: NMT: missing virtual memory tagging in os::workaround_expand_exec_shield_cs_limit()
authorzgu
Tue, 28 Jan 2014 08:55:00 -0500
changeset 22542 62913331d480
parent 22537 ee91b0428fa7
child 22543 7c65ca499b9b
8032827: NMT: missing virtual memory tagging in os::workaround_expand_exec_shield_cs_limit() Summary: Fixed missing virtual memory type tagging in os::workaround_expand_exec_shield_cs_limit() function Reviewed-by: hseigel, coleenp
hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
--- a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	Mon Jan 27 10:57:52 2014 +0100
+++ b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	Tue Jan 28 08:55:00 2014 -0500
@@ -49,6 +49,7 @@
 #include "runtime/stubRoutines.hpp"
 #include "runtime/thread.inline.hpp"
 #include "runtime/timer.hpp"
+#include "services/memTracker.hpp"
 #include "utilities/events.hpp"
 #include "utilities/vmError.hpp"
 
@@ -906,6 +907,9 @@
   if ( (codebuf == NULL) || (!os::commit_memory(codebuf, page_size, true)) ) {
     return; // No matter, we tried, best effort.
   }
+
+  MemTracker::record_virtual_memory_type((address)codebuf, mtInternal);
+
   if (PrintMiscellaneous && (Verbose || WizardMode)) {
      tty->print_cr("[CS limit NX emulation work-around, exec code at: %p]", codebuf);
   }