changeset 8788:9370b1fc828e

Merge
author minqi
date Fri, 31 Jul 2015 06:13:13 +0000
parents 3d2f377c9a21 626fe6fdc7e5
children 29e04e68ff8c
files
diffstat 2 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/os/linux/vm/os_linux.cpp	Wed Jul 29 15:08:42 2015 -0700
+++ b/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/test/testlibrary/jdk/test/lib/Utils.java	Wed Jul 29 15:08:42 2015 -0700
+++ b/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));
     }
 
     /**