Skip to content

Commit a308a2f

Browse files
author
Matt Loring
committed
deps: cherry-pick 081fce3 from V8 upstream
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: #10342 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]>
1 parent 729fecf commit a308a2f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

deps/v8/include/v8-version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 5
1212
#define V8_MINOR_VERSION 4
1313
#define V8_BUILD_NUMBER 500
14-
#define V8_PATCH_LEVEL 44
14+
#define V8_PATCH_LEVEL 45
1515

1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)

deps/v8/src/base/platform/time.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ bool TimeTicks::IsHighResolutionClockWorking() {
639639

640640
bool ThreadTicks::IsSupported() {
641641
#if (defined(_POSIX_THREAD_CPUTIME) && (_POSIX_THREAD_CPUTIME >= 0)) || \
642-
defined(V8_OS_MACOSX) || defined(V8_OS_ANDROID)
642+
defined(V8_OS_MACOSX) || defined(V8_OS_ANDROID) || defined(V8_OS_SOLARIS)
643643
return true;
644644
#elif defined(V8_OS_WIN)
645645
return IsSupportedWin();
@@ -655,6 +655,8 @@ ThreadTicks ThreadTicks::Now() {
655655
#elif(defined(_POSIX_THREAD_CPUTIME) && (_POSIX_THREAD_CPUTIME >= 0)) || \
656656
defined(V8_OS_ANDROID)
657657
return ThreadTicks(ClockNow(CLOCK_THREAD_CPUTIME_ID));
658+
#elif V8_OS_SOLARIS
659+
return ThreadTicks(gethrvtime() / Time::kNanosecondsPerMicrosecond);
658660
#elif V8_OS_WIN
659661
return ThreadTicks::GetForThread(::GetCurrentThread());
660662
#else

0 commit comments

Comments
 (0)