Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Issue 24269003: Add methods to enable configuration of ResourceConstraints based on limits derived at runtime. (Closed)

Created:
7 years, 3 months ago by rmcilroy
Modified:
7 years, 2 months ago
CC:
v8-dev, svenpanne
Visibility:
Public.

Description

Add methods to enable configuration of ResourceConstraints based on limits derived at runtime. Adds ConfigureResourceConstraintsForCurrentPlatform and SetDefaultResourceConstraintsForCurrentPlatform which configure the heap based on the available physical memory, rather than hard-coding by platform as previous. This change also adds OS::TotalPhysicalMemory to platform.h. BUG=292928 R=danno@chromium.org, hpayer@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=16964

Patch Set 1 #

Total comments: 15

Patch Set 2 : Move device-specific defaults into ConfigureResourceConstraintsForCurrentPlatform #

Total comments: 12

Patch Set 3 : Address Hannes comments. #

Patch Set 4 : Move platform code into platform-posix #

Total comments: 5

Patch Set 5 : Split code out of api.cc to defaults.cc #

Total comments: 7

Patch Set 6 : /s/uintptr_t/uint64_t #

Unified diffs Side-by-side diffs Delta from patch set Stats (+132 lines, -69 lines) Patch
M include/v8.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A + include/v8-defaults.h View 1 2 3 1 chunk +20 lines, -21 lines 0 comments Download
M include/v8-testing.h View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M src/d8.cc View 1 2 3 chunks +3 lines, -0 lines 0 comments Download
A + src/defaults.cc View 1 2 3 4 5 1 chunk +38 lines, -24 lines 0 comments Download
M src/globals.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M src/heap.cc View 1 2 3 4 2 chunks +8 lines, -20 lines 0 comments Download
M src/platform.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M src/platform-posix.cc View 1 2 3 4 5 1 chunk +42 lines, -0 lines 0 comments Download
M src/platform-win32.cc View 1 2 3 4 5 1 chunk +12 lines, -0 lines 0 comments Download
M tools/gyp/v8.gyp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
rmcilroy
7 years, 3 months ago (2013-09-19 13:01:20 UTC) #1
Hannes Payer (out of office)
https://codereview.chromium.org/24269003/diff/1/src/heap.cc File src/heap.cc (right): https://codereview.chromium.org/24269003/diff/1/src/heap.cc#newcode75 src/heap.cc:75: #if defined(ANDROID) || V8_TARGET_ARCH_MIPS I never liked the ifdef ...
7 years, 3 months ago (2013-09-19 14:50:57 UTC) #2
rmcilroy
https://codereview.chromium.org/24269003/diff/1/src/heap.cc File src/heap.cc (right): https://codereview.chromium.org/24269003/diff/1/src/heap.cc#newcode75 src/heap.cc:75: #if defined(ANDROID) || V8_TARGET_ARCH_MIPS On 2013/09/19 14:50:57, Hannes Payer ...
7 years, 3 months ago (2013-09-19 15:01:34 UTC) #3
Hannes Payer (out of office)
https://codereview.chromium.org/24269003/diff/1/src/heap.cc File src/heap.cc (right): https://codereview.chromium.org/24269003/diff/1/src/heap.cc#newcode75 src/heap.cc:75: #if defined(ANDROID) || V8_TARGET_ARCH_MIPS On 2013/09/19 15:01:34, rmcilroy wrote: ...
7 years, 3 months ago (2013-09-19 16:25:28 UTC) #4
rmcilroy
https://codereview.chromium.org/24269003/diff/1/src/heap.cc File src/heap.cc (right): https://codereview.chromium.org/24269003/diff/1/src/heap.cc#newcode75 src/heap.cc:75: #if defined(ANDROID) || V8_TARGET_ARCH_MIPS On 2013/09/19 16:25:28, Hannes Payer ...
7 years, 3 months ago (2013-09-19 19:46:11 UTC) #5
danno
I don't think adding more #ifdefs to V8 or adding memory_constrained is the right way ...
7 years, 3 months ago (2013-09-20 07:12:32 UTC) #6
rmcilroy
On 2013/09/20 07:12:32, danno wrote: > I don't think adding more #ifdefs to V8 or ...
7 years, 3 months ago (2013-09-20 11:25:19 UTC) #7
rmcilroy
As discussed this morning, I've moved this to a API call which sets device specific ...
7 years, 3 months ago (2013-09-23 17:25:46 UTC) #8
Benedikt Meurer
On 2013/09/23 17:25:46, rmcilroy wrote: > As discussed this morning, I've moved this to a ...
7 years, 3 months ago (2013-09-23 20:40:00 UTC) #9
Hannes Payer (out of office)
I think this is a good first step in the right direction. Currently we base ...
7 years, 3 months ago (2013-09-24 06:39:34 UTC) #10
Hannes Payer (out of office)
https://codereview.chromium.org/24269003/diff/12001/src/api.cc File src/api.cc (right): https://codereview.chromium.org/24269003/diff/12001/src/api.cc#newcode636 src/api.cc:636: bool ConfigureResourceConstraintsForCurrentPlatform( We had another discussion about that function ...
7 years, 3 months ago (2013-09-24 07:31:00 UTC) #11
rmcilroy
> Can we adjust the title and the description of the CL? Done. > Please ...
7 years, 3 months ago (2013-09-24 10:50:46 UTC) #12
rmcilroy
https://codereview.chromium.org/24269003/diff/12001/src/api.cc File src/api.cc (right): https://codereview.chromium.org/24269003/diff/12001/src/api.cc#newcode636 src/api.cc:636: bool ConfigureResourceConstraintsForCurrentPlatform( On 2013/09/24 07:31:00, Hannes Payer wrote: > ...
7 years, 3 months ago (2013-09-24 10:50:55 UTC) #13
Hannes Payer (out of office)
https://codereview.chromium.org/24269003/diff/12001/src/heap.cc File src/heap.cc (right): https://codereview.chromium.org/24269003/diff/12001/src/heap.cc#newcode74 src/heap.cc:74: code_range_size_(512*MB), On 2013/09/24 10:50:55, rmcilroy wrote: > On 2013/09/24 ...
7 years, 3 months ago (2013-09-24 11:27:16 UTC) #14
danno
The general approach seems OK, although I still wish that this could be better separated ...
7 years, 3 months ago (2013-09-24 11:52:24 UTC) #15
rmcilroy
> Yes, please put this in another file to make it clear that > it's ...
7 years, 3 months ago (2013-09-24 13:00:07 UTC) #16
Hannes Payer (out of office)
LGTM from my side, just one nit. https://codereview.chromium.org/24269003/diff/18001/src/globals.h File src/globals.h (right): https://codereview.chromium.org/24269003/diff/18001/src/globals.h#newcode251 src/globals.h:251: const bool ...
7 years, 3 months ago (2013-09-24 13:43:43 UTC) #17
Benedikt Meurer
https://codereview.chromium.org/24269003/diff/18001/src/platform-posix.cc File src/platform-posix.cc (right): https://codereview.chromium.org/24269003/diff/18001/src/platform-posix.cc#newcode105 src/platform-posix.cc:105: uintptr_t OS::TotalPhysicalMemory() { Shouldn't this return an uint64_t? Otherwise ...
7 years, 3 months ago (2013-09-24 13:47:14 UTC) #18
rmcilroy
https://codereview.chromium.org/24269003/diff/18001/src/globals.h File src/globals.h (right): https://codereview.chromium.org/24269003/diff/18001/src/globals.h#newcode251 src/globals.h:251: const bool kIs64BitArch = true; On 2013/09/24 13:43:44, Hannes ...
7 years, 3 months ago (2013-09-24 14:39:23 UTC) #19
Hannes Payer (out of office)
https://codereview.chromium.org/24269003/diff/18001/src/globals.h File src/globals.h (right): https://codereview.chromium.org/24269003/diff/18001/src/globals.h#newcode251 src/globals.h:251: const bool kIs64BitArch = true; On 2013/09/24 14:39:23, rmcilroy ...
7 years, 3 months ago (2013-09-24 15:32:15 UTC) #20
rmcilroy
On 2013/09/24 15:32:15, Hannes Payer wrote: > https://codereview.chromium.org/24269003/diff/18001/src/globals.h > File src/globals.h (right): > > https://codereview.chromium.org/24269003/diff/18001/src/globals.h#newcode251 ...
7 years, 2 months ago (2013-09-25 12:10:44 UTC) #21
rmcilroy
On 2013/09/25 12:10:44, rmcilroy wrote: > On 2013/09/24 15:32:15, Hannes Payer wrote: > > https://codereview.chromium.org/24269003/diff/18001/src/globals.h ...
7 years, 2 months ago (2013-09-25 13:02:54 UTC) #22
danno
lgtm
7 years, 2 months ago (2013-09-25 13:07:00 UTC) #23
Hannes Payer (out of office)
7 years, 2 months ago (2013-09-26 13:31:47 UTC) #24
Message was sent while issue was closed.
Committed patchset #6 manually as r16964 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698