Skip to content

Commit cc68a9a

Browse files
committed
Update docs
1 parent f9c2ce0 commit cc68a9a

File tree

5 files changed

+23
-12
lines changed

5 files changed

+23
-12
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ See the [documentation](./doc/README.md).
4444

4545
## Status and roadmap
4646

47-
As of September 2024, Whippet is feature-complete! Of course there will
48-
surely be new features to build as Whippet gets integrated it into
49-
language run-times, but the basics are there.
47+
As of January 2025, Whippet is good to go! Of course there will surely
48+
be new features to build as Whippet gets integrated it into language
49+
run-times, but the basics are there.
5050

5151
The next phase on the roadmap is support for tracing, and
5252
some performance noodling.

doc/collector-pcc.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ the same performance characteristics with a single mutator and with
2020
parallelism disabled, additionally allowing multiple mutators, and
2121
scaling better with multiple tracing threads.
2222

23-
Also like `semi`, `pcc` is not generational yet. If and when `pcc`
24-
grows a young generation, it would be a great collector.
23+
`pcc` has a generational configuration, conventionally referred to as
24+
`generational-pcc`, in which both the nursery and the old generation are
25+
copy spaces. Objects stay in the nursery for one cycle before moving on
26+
to the old generation. This configuration is a bit new (January 2025)
27+
and still needs some tuning.
2528

2629
## Implementation notes
2730

doc/collector-semi.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ size, and performs best with ample heap sizes; between 3× and 5× is
1919
best.
2020

2121
The semi-space collector doesn't support multiple mutator threads. If
22-
you want a whole-heap copying collector for a multi-threaded mutator,
23-
look at [pcc](./collector-pcc.md).
22+
you want a copying collector for a multi-threaded mutator, look at
23+
[pcc](./collector-pcc.md).

doc/collectors.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
Whippet has four collectors currently:
44
- [Semi-space collector (`semi`)](./collector-semi.md): For
55
single-threaded embedders who are not too tight on memory.
6-
- [Parallel copying collector (`pcc`)](./collector-pcc.md): Like `semi`,
7-
but with support for multiple mutator and tracing threads.
6+
- [Parallel copying collector (`pcc`)](./collector-pcc.md): Like
7+
`semi`, but with support for multiple mutator and tracing threads and
8+
generational collection.
89
- [Mostly marking collector (`mmc`)](./collector-mmc.md):
910
Immix-inspired collector. Optionally parallel, conservative (stack
1011
and/or heap), and/or generational.
@@ -30,8 +31,9 @@ precise roots, then go for `stack-conservative-parallel-mmc` directly.
3031

3132
## More collectors
3233

33-
It would be nice to have a classic generational GC, perhaps using
34+
It would be nice to have a generational GC that uses the space from
3435
`parallel-mmc` for the old generation but a pcc-style copying nursery.
36+
We have `generational-pcc` now, so this should be possible.
3537

3638
Support for concurrent marking in `mmc` would be good as well, perhaps
3739
with a SATB barrier. (Or, if you are the sort of person to bet on

doc/manual.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ If the `gc_atomic_forward`'s state is `BUSY`, the collector will call
112112
`gc_atomic_forward_retry_busy`; a return value of 0 means the object is
113113
still busy, because another thread is attempting to forward it.
114114
Otherwise the forwarding state becomes either `FORWARDED`, if the other
115-
thread succeeded in forwarding it, or `ABORTED`, indicating that the
116-
other thread failed to forward it.
115+
thread succeeded in forwarding it, or go back to `NOT_FORWARDED`,
116+
indicating that the other thread failed to forward it.
117117

118118
If the forwarding state is `FORWARDED`, the collector will call
119119
`gc_atomic_forward_address` to get the new address.
@@ -351,6 +351,12 @@ $(COMPILE) -DGC_PARALLEL=1 -DGC_PRECISE_ROOTS=1 \
351351
-include foo-embedder.h -o gc.o -c pcc.c
352352
```
353353

354+
You can also build `pcc` in a generational configuration by passing
355+
`-DGC_GENERATIONAL=1`. The nursery is 2 MB per active mutator, capped
356+
to the number of processors, so if the last cycle had a maximum of 4
357+
mutator threads active at the same time and your machine has 24 cores,
358+
your nursery would be 8 MB.
359+
354360
#### Building `mmc`
355361

356362
Finally, there is the mostly-marking collector. It can collect roots

0 commit comments

Comments
 (0)