V8's Oilpan library shipping in M94

34 views
Skip to first unread message

Michael Lippautz

unread,
Sep 20, 2021, 1:54:53ā€ÆPM9/20/21
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:38:34ā€ÆPM9/20/21
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:41:54ā€ÆPM9/20/21
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>:

Hannes Payer

unread,
Sep 21, 2021, 4:34:37ā€ÆAM9/21/21
to v8-dev, Jeremy Roman, Michael Lippautz, oilpa...@chromium.org, platform-architecture-dev, Chromium-dev, Anton Bikineev, Omer Katz
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.

Yang Guo

unread,
Sep 21, 2021, 4:57:48ā€ÆAM9/21/21
to Hannes Payer, v8-dev, Jeremy Roman, Michael Lippautz, oilpa...@chromium.org, platform-architecture-dev, Chromium-dev, Anton Bikineev, Omer Katz

Bartek Nowierski

unread,
Sep 21, 2021, 5:36:21ā€ÆAM9/21/21
to Yang Guo, Hannes Payer, v8-dev, Jeremy Roman, Michael Lippautz, oilpa...@chromium.org, platform-architecture-dev, Chromium-dev, Anton Bikineev, Omer Katz

Dominik InfĆ¼hr

unread,
Sep 23, 2021, 7:57:26ā€ÆAM9/23/21
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