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

Issue 2510353005: Move ProcessHeap::isLowEndDevice to MemoryCoordinator (Closed)

Created:
4 years, 1 month ago by whywhat
Modified:
4 years, 1 month ago
Reviewers:
haraken, sof
CC:
Mads Ager (chromium), blink-reviews, chromium-reviews, gavinp+loader_chromium.org, Nate Chapin, kouhei+heap_chromium.org, loading-reviews+fetch_chromium.org, oilpan-reviews, tyoshino+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move ProcessHeap::isLowEndDevice to MemoryCoordinator Since this is just moving code around, both me and haraken@ agreed that it couldn't be the real reason behind the blink_heap_unittests failures. Hence relanding https://codereview.chromium.org/2503433003 BUG=None TEST=Run the failing tests locally (on Linux) Committed: https://crrev.com/a3fa4889e144bcee7491380c0364c46eb9fa4da4 Cr-Commit-Position: refs/heads/master@{#433613}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -10 lines) Patch
M third_party/WebKit/Source/core/fetch/MemoryCache.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/MemoryCoordinator.h View 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/MemoryCoordinator.cpp View 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/heap/Heap.h View 2 chunks +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/Heap.cpp View 3 chunks +0 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/HeapPage.cpp View 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 24 (9 generated)
whywhat
Please, take a look.
4 years, 1 month ago (2016-11-18 19:15:23 UTC) #3
sof
Strange one; lgtm to retry.
4 years, 1 month ago (2016-11-18 20:17:26 UTC) #6
haraken
LGTM
4 years, 1 month ago (2016-11-19 11:43:36 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2510353005/1
4 years, 1 month ago (2016-11-21 16:57:58 UTC) #11
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 1 month ago (2016-11-21 19:53:07 UTC) #13
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/a3fa4889e144bcee7491380c0364c46eb9fa4da4 Cr-Commit-Position: refs/heads/master@{#433613}
4 years, 1 month ago (2016-11-21 19:58:22 UTC) #15
piman
A revert of this CL (patchset #1 id:1) has been created in https://codereview.chromium.org/2522653002/ by piman@chromium.org. ...
4 years, 1 month ago (2016-11-21 20:34:59 UTC) #16
whywhat
well, okay, I'm out of options :) are the tests flaky? why don't they run ...
4 years, 1 month ago (2016-11-21 20:40:41 UTC) #17
sof
On 2016/11/21 20:40:41, whywhat wrote: > well, okay, I'm out of options :) > > ...
4 years, 1 month ago (2016-11-21 21:07:18 UTC) #18
piman
On 2016/11/21 21:07:18, sof wrote: > On 2016/11/21 20:40:41, whywhat wrote: > > well, okay, ...
4 years, 1 month ago (2016-11-21 21:15:17 UTC) #19
piman
On 2016/11/21 21:15:17, piman wrote: > On 2016/11/21 21:07:18, sof wrote: > > On 2016/11/21 ...
4 years, 1 month ago (2016-11-21 21:41:54 UTC) #20
whywhat
On 2016/11/21 at 21:41:54, piman wrote: > On 2016/11/21 21:15:17, piman wrote: > > On ...
4 years, 1 month ago (2016-11-21 21:43:57 UTC) #21
sof
On 2016/11/21 21:43:57, whywhat wrote: > On 2016/11/21 at 21:41:54, piman wrote: > > On ...
4 years, 1 month ago (2016-11-21 22:00:23 UTC) #22
whywhat
On 2016/11/21 at 22:00:23, sigbjornf wrote: > On 2016/11/21 21:43:57, whywhat wrote: > > On ...
4 years, 1 month ago (2016-11-22 17:48:43 UTC) #23
sof
4 years, 1 month ago (2016-11-22 18:47:23 UTC) #24
Message was sent while issue was closed.
On 2016/11/22 17:48:43, whywhat wrote:
> On 2016/11/21 at 22:00:23, sigbjornf wrote:
> > On 2016/11/21 21:43:57, whywhat wrote:
> > > On 2016/11/21 at 21:41:54, piman wrote:
> > > > On 2016/11/21 21:15:17, piman wrote:
> > > > > On 2016/11/21 21:07:18, sof wrote:
> > > > > > On 2016/11/21 20:40:41, whywhat wrote:
> > > > > > > well, okay, I'm out of options :)
> > > > > > > 
> > > > > > > are the tests flaky?
> > > > > > > why don't they run on the trybots?
> > > > > > 
> > > > > > Could it be that the test is touching MemoryCoordinator::instance()
> for
> > > the
> > > > > > first time? => It causes a heap allocation, which makes the
allocated
> > > object
> > > > > > sizes that the test expects, not match up.
> > > > > 
> > > > > The revert appears to not have helped... investigating more. I will
> reland
> > > once
> > > > > we found the cause if this is unrelated.
> > > > 
> > > > Nevermind, it's a display issue on the waterfall, I checked that the
> revert
> > > does fix things locally, and that the bots that still have problems
haven't
> > > actually picked up the revert. So this CL is likely the culprit.
> > > 
> > > Were you able to reproduce the failure locally? What platform? The tests
> passed
> > > for me on Linux.
> > 
> > The worker tests are failing after the main thread has shut down, I reckon
--
> accessing MemoryCoordinator::instance() from a non-main thread isn't safe.
> > 
> > I suggest you expose
> > 
> >    static bool MemoryCoordinator::isLowMemoryDevice();
> > 
> > instead & don't involve the (heap allocated) singleton.
> 
> The purpose of this change is also for being able to override the bool in
tests
> via Internals.cpp. How would I initialize a static bool with
> base::SysInfo::IsLowEndDevice unless it's overridden?
> 

This would be a static predicate, so it could consult whatever initialized local
static state to accomplish that.

base::SysInfo does some of this already for its low-end predicate, consulting
command-line switches.

Powered by Google App Engine
This is Rietveld 408576698