Oilpan’s Performance
& Shipping Plan
haraken@chromium.org
Oilpan team
Current status
Agenda
Quick overview of Oilpan
What is Oilpan?
What is Oilpan?
Oilpan GC
Oilpan GC
A relationship between Oilpan GC & V8 GC
A relationship between Oilpan GC & V8 GC
Precise GC & Conservative GC
class A : public GarbageCollected<A> {
void foo() {
B* b = …; // This pointer is found conservatively
}
void trace(Visitor* visitor) { visitor->trace(m_b); }
Member<B> m_b; // This pointer is traced precisely
};
Precise GC & Conservative GC
Precise GC & Conservative GC
Summary
Performance & Memory results
Metrics
Success criteria
Notes
Metrics
Execution time (Blink perf)
Execution time (Page cycler)
Execution time (Speedometer)
Execution time (Summary)
Metrics
Pause time (Smoothness)
Pause time (Smoothness)
<= Distribution of vsync numbers
Pause time (Web crawling)
Pause time (Web crawling, Linux)
Pause time | Oilpan precise GC | Oilpan conservative GC | V8 minor GC | V8 major GC |
0 - 10 ms | 75% | 25% | 79% | 18% |
10 - 20 ms | 21% | 75% | 19% | 40% |
20 - 30 ms | 4% | 0% | 2% | 9% |
30 - 40 ms | 0% | 0% | 0% | 10% |
40 - 50 ms | 0% | 0% | 0% | 6% |
50 - 100 ms | 0% | 0% | 0% | 7% |
100 ms - | 0% | 0% | 0% | 10% |
Total occurrences | 264 | 4 | 274 | 72 |
Pause time (Web crawling, Nexus7)
Pause time | Oilpan precise GC | Oilpan conservative GC | V8 minor GC | V8 major GC |
0 - 10 ms | 20% | 0% | 29% | 0% |
10 - 20 ms | 23% | 0% | 35% | 0% |
20 - 30 ms | 7% | 0% | 17% | 3% |
30 - 40 ms | 6% | 0% | 5% | 8% |
40 - 50 ms | 7% | 0% | 6% | 2% |
50 - 100 ms | 23% | 0% | 8% | 25% |
100 ms - | 14% | 0% | 0% | 62% |
Total occurrences | 121 | 0 | 127 | 40 |
Pause time (Summary)
Pause time (Summary)
Metrics
Peak memory usage
Peak memory usage (Summary)
Summary
Shipping plan
Current status
Current status
Shipping plan
Shipping plan
Summary
Optimization plan
What do we need to optimize?
What do we need to optimize?
About execution time
Factors that make Oilpan better
void replaceChild(PassRefPtrWillBeRawPtr<Node> child, ...) {
RefPtrWillBeRawPtr<Node> protect(this); // This will be removed
RefPtrWillBeRawPtr<Node> next = child->nextSibling();
…;
}
Factors that make Oilpan better
class Foo : public RefCountedWillBeGarbageCollected() {
#if !ENABLE(OILPAN)
~Foo();
#endif
RefPtrWillBeMember<Bar> m_bar; // RefPtr needs a destructor
};
Factors that make Oilpan worse
Things we’ve often observed
Memory locality is important
Example
// JS benchmark
for (var i = 0; i < 100000; i++) { div.innerHTML = “foo”; }
// Blink code
void Element::setInnerHTML(String str) {
RefPtrWillBeRawPtr<DocumentParser> parser = DocumentParser::create(str);
…;
}
Memory locality is important
Memory locality is important
Memory locality is important
Memory locality is important
Memory locality is important
Plans to improve memory locality
Plans to improve memory locality
class Foo : public GarbageCollectedFinalized<Foo> {
~Foo();
String m_str; // StringImpl is refcounted and needs a destructor
};
Plans to improve memory locality
What do we need to optimize?
Plans to improve pause time
Plans to improve pause time
Plans to improve pause time
Plans to improve pause time
Summary
Summary
Conclusions
Conclusions
Conclusions
Q & A