8160350: cannot truss jdk9 [ solaris ]
authorkbarrett
Thu, 07 Jul 2016 15:40:36 -0400
changeset 39701 76ceace16591
parent 39700 003b3610d1d5
child 39702 ea7e9375bb93
8160350: cannot truss jdk9 [ solaris ] Summary: Removed no longer needed code to enable or test for vtime support. Reviewed-by: kbarrett, dcubed, gthornbr Contributed-by: alan.burlison@oracle.com
hotspot/src/os/solaris/vm/os_solaris.cpp
--- a/hotspot/src/os/solaris/vm/os_solaris.cpp	Wed Jul 06 12:01:07 2016 +0000
+++ b/hotspot/src/os/solaris/vm/os_solaris.cpp	Thu Jul 07 15:40:36 2016 -0400
@@ -1320,36 +1320,8 @@
 }
 
 bool os::supports_vtime() { return true; }
-
-bool os::enable_vtime() {
-  int fd = ::open("/proc/self/ctl", O_WRONLY);
-  if (fd == -1) {
-    return false;
-  }
-
-  long cmd[] = { PCSET, PR_MSACCT };
-  int res = ::write(fd, cmd, sizeof(long) * 2);
-  ::close(fd);
-  if (res != sizeof(long) * 2) {
-    return false;
-  }
-  return true;
-}
-
-bool os::vtime_enabled() {
-  int fd = ::open("/proc/self/status", O_RDONLY);
-  if (fd == -1) {
-    return false;
-  }
-
-  pstatus_t status;
-  int res = os::read(fd, (void*) &status, sizeof(pstatus_t));
-  ::close(fd);
-  if (res != sizeof(pstatus_t)) {
-    return false;
-  }
-  return status.pr_flags & PR_MSACCT;
-}
+bool os::enable_vtime() { return false; }
+bool os::vtime_enabled() { return false; }
 
 double os::elapsedVTime() {
   return (double)gethrvtime() / (double)hrtime_hz;