V8's Oilpan library shipping in M94

37 views
Skip to first unread message

Michael Lippautz

unread,
Sep 20, 2021, 1:56:38 PMSep 20
to oilpa...@chromium.org, platform-architecture-dev, Chromium-dev, v8-dev, Anton Bikineev, Omer Katz
Hey everyone -

The library allows Oilpan (previously known as Blink's garbage collector) to be used as a stand-alone garbage collector for C++ or together with V8 where it is part of the C++/JavaScript unified heap. Both scenarios are already covered with the usage in Blink (together with V8) and PDFium (new stand-alone C++ collector; not yet launched). The flag switching from Oilpan in Blink to Oilpan library has been flipped for M94.

The new library offers a stable API surface with code comments and examples in code (if we forgot something, please file a bug) that follows V8's general API stability process. This allows fast iteration on implementation details and at the same time avoids frequent breakage. The library also provides the foundation for new garbage collection optimizations in the Blink setting together with JavaScript as it allows for better integration with V8 behind the scenes.

Some other highlights:
- Uses IWYU (API and internally) to avoid pulling in large parts of the heap for e.g. just using a managed reference type;
- Unit tests for each individual component in the C++ garbage collector;
- Test target and a garbage collection playground that builds within seconds;
- More correctness checks that already found issues in existing code;
- Better tooling around DevTools heap snapshot and more accurate accounting in tracing's MemoryInfra;

The summary can also be found as one pager.

The effort (tracking bug) roughly took ~1.5 years and involved a lot of user code cleanup as well. Many fruitful discussions happened and quite some code was migrated and re-written. Thanks @Anton Bikineev and @Omer Katz for driving the implementation work.

FAQs:
Q1: Performance?
A1: Neutral on competitive benchmarks; smaller ups and downs on micro benchmarks. We don't expect big changes as the overall architecture stays the same.

Q2: What does this mean for Blink developers? Anything I need to change in my code?
A2: We have stayed fully backwards compatible with the API. If we haven't touched your code while migrating, you don't need to change anything as of now. Going forward we may adjust the APis following V8's API stability process. We will keep maintaining the Blink GC API reference, although we may move some more general docs closer to the library.

Q3: What's up with IWYU for Oilpan in Blink?
A3: So far we have kept the include-all headers around but we'd like to move to IWYU to avoid pulling in too many V8 headers everywhere.

Q4: Can we use Oilpan within V8 itself?
A4: Not just yet. Stay tuned on updates in this area.

Encountering issues, or have suggestions? Let us know:
- Monorail: Blink>GarbageCollection (Chromium), Oilpan (V8)

-Michael

Jeremy Roman

unread,
Sep 20, 2021, 4:39:46 PMSep 20
to Michael Lippautz, oilpa...@chromium.org, platform-architecture-dev, Chromium-dev, v8-dev, Anton Bikineev, Omer Katz
Awesome news!

--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architect...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAH%2BmL5BYuu7zOe29OWc7x1hTef8nb51ZUBz2EkvJuR_2mS_Cig%40mail.gmail.com.

Kentaro Hara

unread,
Sep 20, 2021, 6:43:52 PMSep 20
to Jeremy Roman, Michael Lippautz, oilpa...@chromium.org, platform-architecture-dev, Chromium-dev, v8-dev, Anton Bikineev, Omer Katz
Finally done!! Congratulations 😊

2021年9月21日(火) 5:38 Jeremy Roman <jbr...@chromium.org>:

Bartek Nowierski

unread,
Sep 21, 2021, 5:37:44 AMSep 21
to Yang Guo, Hannes Payer, v8-dev, Jeremy Roman, Michael Lippautz, oilpa...@chromium.org, platform-architecture-dev, Chromium-dev, Anton Bikineev, Omer Katz
This is beyond awesome!!

On Tue, Sep 21, 2021 at 5:57 PM 'Yang Guo' via platform-architecture-dev <platform-arc...@chromium.org> wrote:
Awesome. Congrats on reaching this milestone!

Yang


On Tue, Sep 21, 2021 at 10:34 AM 'Hannes Payer' via platform-architecture-dev <platform-arc...@chromium.org> wrote:
Thanks you all for the hard work! Huge congrats!

--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/CABg10jzS28i6QODdKCiY5R1L9iwOeKGSSb2%2By%2BapDhZGe-2rxA%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architect...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architect...@chromium.org.

Dominik Inführ

unread,
Sep 24, 2021, 5:30:20 PMSep 24
to v8-...@googlegroups.com, Yang Guo, Hannes Payer, Jeremy Roman, Michael Lippautz, oilpa...@chromium.org, platform-architecture-dev, Chromium-dev, Anton Bikineev, Omer Katz
Awesome work! Congrats to the team!

Reply all
Reply to author
Forward
0 new messages