# HG changeset patch # User minqi # Date 1438323193 0 # Node ID a94d2d18e04bce113c6b5867eaa40a455f984c8b # Parent 54b9558a71a2446d3a7e430949a78afcc99f83bb# Parent 90ad2be7c11c499dcd679398ca62ad1c4ca15ed6 Merge diff -r 54b9558a71a2 -r a94d2d18e04b hotspot/src/os/linux/vm/os_linux.cpp --- 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(); } diff -r 54b9558a71a2 -r a94d2d18e04b hotspot/test/testlibrary/jdk/test/lib/Utils.java --- 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)); } /**