Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f4da7823ee1d1dacf4b080de2986759a051003ee
      
https://github.com/WebKit/WebKit/commit/f4da7823ee1d1dacf4b080de2986759a051003ee
  Author: Dan Hecht <[email protected]>
  Date:   2026-08-13 (Thu, 13 Aug 2026)

  Changed paths:
    M Source/JavaScriptCore/heap/Heap.cpp
    M Source/JavaScriptCore/heap/Heap.h

  Log Message:
  -----------
  [JSC] Rename Heap::finalize to Heap::runCollectionEpilogue
https://bugs.webkit.org/show_bug.cgi?id=321689
rdar://184833847

Reviewed by Keith Miller.

Heap::finalize is the mutator-side epilogue of a collection cycle, not
finalization. It flushes HasOwnPropertyCache, MegamorphicCache and the string
caches, ages the megamorphic cache, eagerly sweeps precise allocations, and runs
the embedder's end-of-GC callbacks. Nothing in it operates on a dying object.

    Heap::finalize          -> Heap::runCollectionEpilogue
    needFinalizeBit         -> needCollectionEpilogueBit
    setNeedFinalize         -> setNeedCollectionEpilogue
    handleNeedFinalize      -> handleNeedCollectionEpilogue
    waitWhileNeedFinalize   -> waitWhileNeedCollectionEpilogue
    Heap::sweepInFinalize   -> Heap::sweepEagerlyInEpilogue

sweepEagerlyInEpilogue says why it sweeps at this point -- precise allocations 
and
Wasm memory hold a lot of bytes -- rather than merely when.

The --logGC=1 phase label changes from "finalize" to "epilogue" to match. That
output has no stability contract, but anyone scraping GC logs will see it.

No behavior change.

* Source/JavaScriptCore/heap/Heap.cpp:
(JSC::Heap::clearConcurrentRetainedDataIfPossible):
* Source/JavaScriptCore/heap/Heap.h:

Canonical link: https://commits.webkit.org/319134@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to