Platform Architecture team snippet

39 views
Skip to first unread message

Kentaro Hara

unread,
May 29, 2016, 9:22:38 PM5/29/16
to blink-dev
Hi

Highlights:

- Finalized the design of Memory Coordinator!
- Visualized renderer's memory in a time series manner.
- Supported [SameObject].


Oilpan:

(keishi) Finished landing the infrastructure for the per-thread heap.

(keishi) Trying to enable the per-thread heap for database threads. Before enabling, we want to add a runtime verification to confirm that all cross-thread pointers are correctly wrapped with CrossThreadPersistents. Implementing the verification.

(sigbjornf) Fixed a bunch of crashes & stability issues. In particular, fixed subtle issues caused by a CrossThreadPersistent created by a non-attached thread while attached threads are running a stop-the-world GC.

(yhirano) Moving ResourceClient's hierarchy to Oilpan's heap.

TRIM:

(chrisha, haraken) Mostly finalized a design of Memory Coordinator (design doc).

(bashi) Designing concrete renderer-side APIs for Memory Coordinator v0. The idea is to make various memory components (e.g., FontCacheData, Oilpan, Skia cache etc) MemoryCoordinatorClients. MemoryCoordinatorClient provides Throttle()/UnThrottle() and Purge(). Throttle()/UnThrottle() is called in foreground renderers. Purge() is called in background renderers when the renderers are about to get suspended. Each MemoryCoordinatorClient must reduce a reasonable amount of memory when Throttle()/UnThrottle()/Purge() is requested.

(tasak) Developed a tool to visualize renderer's memory in a time series manner. Collected memory results on real-world websites with a lot of user interactions. The results are summarized in this document. If you're busy, you can just take a quick look at this visualization :)


(hajimehoshi) Landed the first cut of purge + suspend but we found that V8 tasks are still fired in the suspended renderer. It looks like that many V8 tasks live in task queues we've not yet suspended. hajimehoshi@ is investigating what tasks are in what task queues and what task queues we need to suspend (and what task queues are safe to suspend).

(keishi) Started collecting memory snapshots from a real world using deep reports. Our initial goal is to understand memory snapshots when a critical memory notification is dispatched.

Onion soup:

(yutak) Getting very close to replacing OwnPtrs with unique_ptrs. Removed OwnPtr::release(). Renamed OwnPtr::clear() with OwnPtr::reset().

(esprehn) Making WTF::StringView's API be more like base::StringPiece (CL).

(bashi) Removed WebMemoryDumpProvider.

V8 binding:


(yukishiino) Noticed that V8HiddenValue::getHiddenValue is slow, and this is causing performance issues in WebGL. yukishiino@ invented V8PrivateProperty, which is a faster version of V8HiddenValue. We will replace V8HiddenValue with V8PrivateProperty.

(esprehn, peria) v8::String::Externalize() is consuming a lot of time in various benchmarks. esprehn@ came up with an interesting idea to avoid the overhead; i.e., don't externalize v8 strings as long as the v8 strings are in the new space of V8's heap (i.e., externalize only long-living v8 strings). peria@ started experimenting with the optimization.

(peria) Correctly implemented named properties on the HTMLDocument object per the spec. This enabled us to remove hacky code that injects HTMLDocument's properties during HTML parsing. However, the CL added some overhead to an interceptor of HTMLDocument and caused an unacceptable performance regression. Reverted the CL and investigating.

(iclelland) Implementing [OriginTrials] attributes/methods. The idea is to split the DOM interface instantiation into two phases: 1) install context-independent attributes/methods and 2) install context-independent attributes/methods (such as [OriginTrials] and [RuntimeEnabled]).

(dominicc) Implementing Custom Element's constructor. V8 binding is complicated...

(hlopko) Implementing traceWrapper(). [SetWrapperReferenceTo/From] was gone (behind a flag) and almost all tests are passing!

(peria) Refactoring SerializedScriptValue's implementation in preparation for optimizing postMessage().


Threading:

(haraken) Discussed per-frame scheduling (i.e., associate all tasks with frames and implement a more flexible per-frame task scheduler) with MTV people. Started writing a design document.

(hiroshige) Cleaning up pointer types used in WTF::bind().

(flackr, yhirano, haraken) Changing the lifetime of CompositorWorker's backing thread (CL).

(nhiroki) Removed a part of v8::Isolate::TerminateExecution()s used in worker shutdown sequence. Our goal is to minimize scenarios where we need to send v8::Isolate::TerminateExecution(). Then we can remove the complexity of MaybeLocal handles from the binding layer.



--
Kentaro Hara, Tokyo, Japan
Reply all
Reply to author
Forward
0 new messages