From b9034177ac73e508769e4f72bde1ceacd80e2fbf Mon Sep 17 00:00:00 2001 From: Matt Loring Date: Mon, 19 Dec 2016 10:58:43 -0800 Subject: [PATCH] deps: cherry-pick 081fce3 from V8 upstream MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message: ThreadTicks::Now support for Solaris BUG=v8:5739 Review-Url: https://codereview.chromium.org/2576903004 Cr-Commit-Position: refs/heads/master@{#41771} PR-URL: https://github.com/nodejs/node/pull/10342 Reviewed-By: Michaƫl Zasso Reviewed-By: Ali Ijaz Sheikh --- deps/v8/include/v8-version.h | 2 +- deps/v8/src/base/platform/time.cc | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index df187b8307a6f6..009a3b10425ee4 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 5 #define V8_MINOR_VERSION 4 #define V8_BUILD_NUMBER 500 -#define V8_PATCH_LEVEL 44 +#define V8_PATCH_LEVEL 45 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/src/base/platform/time.cc b/deps/v8/src/base/platform/time.cc index 76a820955fb98d..6b483382f02ea7 100644 --- a/deps/v8/src/base/platform/time.cc +++ b/deps/v8/src/base/platform/time.cc @@ -639,7 +639,7 @@ bool TimeTicks::IsHighResolutionClockWorking() { bool ThreadTicks::IsSupported() { #if (defined(_POSIX_THREAD_CPUTIME) && (_POSIX_THREAD_CPUTIME >= 0)) || \ - defined(V8_OS_MACOSX) || defined(V8_OS_ANDROID) + defined(V8_OS_MACOSX) || defined(V8_OS_ANDROID) || defined(V8_OS_SOLARIS) return true; #elif defined(V8_OS_WIN) return IsSupportedWin(); @@ -655,6 +655,8 @@ ThreadTicks ThreadTicks::Now() { #elif(defined(_POSIX_THREAD_CPUTIME) && (_POSIX_THREAD_CPUTIME >= 0)) || \ defined(V8_OS_ANDROID) return ThreadTicks(ClockNow(CLOCK_THREAD_CPUTIME_ID)); +#elif V8_OS_SOLARIS + return ThreadTicks(gethrvtime() / Time::kNanosecondsPerMicrosecond); #elif V8_OS_WIN return ThreadTicks::GetForThread(::GetCurrentThread()); #else