Merge
authorminqi
Fri, 31 Jul 2015 06:13:13 +0000
changeset 32075 a94d2d18e04b
parent 32074 54b9558a71a2 (current diff)
parent 32071 90ad2be7c11c (diff)
child 32076 1c9c9d5945b8
Merge
--- a/hotspot/src/os/linux/vm/os_linux.cpp	Wed Jul 29 15:08:42 2015 -0700
+++ b/hotspot/src/os/linux/vm/os_linux.cpp	Fri Jul 31 06:13:13 2015 +0000
@@ -653,8 +653,7 @@
   OSThread* osthread = thread->osthread();
   Monitor* sync = osthread->startThread_lock();
 
-  // thread_id is kernel thread id (similar to Solaris LWP id)
-  osthread->set_thread_id(os::Linux::gettid());
+  osthread->set_thread_id(os::current_thread_id());
 
   if (UseNUMA) {
     int lgrp_id = os::numa_get_group_id();
@@ -1424,7 +1423,8 @@
   return n;
 }
 
-intx os::current_thread_id() { return (intx)pthread_self(); }
+// thread_id is kernel thread id (similar to Solaris LWP id)
+intx os::current_thread_id() { return os::Linux::gettid(); }
 int os::current_process_id() {
   return ::getpid();
 }
--- a/hotspot/test/testlibrary/jdk/test/lib/Utils.java	Wed Jul 29 15:08:42 2015 -0700
+++ b/hotspot/test/testlibrary/jdk/test/lib/Utils.java	Fri Jul 31 06:13:13 2015 +0000
@@ -314,9 +314,8 @@
      */
     public static String fileAsString(String filename) throws IOException {
         Path filePath = Paths.get(filename);
-        return Files.exists(filePath)
-            ? Files.lines(filePath).collect(Collectors.joining(NEW_LINE))
-            : null;
+        if (!Files.exists(filePath)) return null;
+        return new String(Files.readAllBytes(filePath));
     }
 
     /**