Repository navigation
Commit 9d236ec
committed
[JSC] Heaps that join global collections late adopt the others' marking version
https://bugs.webkit.org/show_bug.cgi?id=327777
rdar://190185283
Reviewed by Keith Miller.
SlotVisitor caches one marking version for every heap it marks, but a heap that
joins the global Collector after the others have had Full collections starts
behind them. So at the start of each collection, before the versions advance,
such a heap adopts the others' version. It has never been collected, so its
blocks have no marks to lose. Doing this at Begin, with the mutators stopped,
keeps the version from changing while the heap's mutator runs.
This works while each heap is collected only locally or only globally, which is
enough for developing global collections. If a heap can later be collected both
ways, this will have to change, depending on which combinations of
{ Local, Global } x { Eden, Full } we end up supporting.
No behavior change for local collections.
* Source/JavaScriptCore/heap/Collector.cpp:
(JSC::Collector::beginCollectionInEachHeap):
(JSC::Collector::setUpVisitors):
* Source/JavaScriptCore/heap/MarkedSpace.cpp:
(JSC::MarkedSpace::adoptMarkingVersion):
* Source/JavaScriptCore/heap/MarkedSpace.h:
Canonical link: https://commits.webkit.org/324022@main1 parent 189ce80 commit 9d236ec
3 files changed
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
| 464 | + | |
464 | 465 | | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
465 | 473 | | |
466 | 474 | | |
467 | 475 | | |
| |||
472 | 480 | | |
473 | 481 | | |
474 | 482 | | |
475 | | - | |
| 483 | + | |
476 | 484 | | |
477 | 485 | | |
| 486 | + | |
478 | 487 | | |
479 | 488 | | |
480 | 489 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
465 | 475 | | |
466 | 476 | | |
467 | 477 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| |||
0 commit comments