1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-09 10:50:27 +02:00
Commit graph

482 commits

Author SHA1 Message Date
Andy Wingo
f58424ec52 Add some asserts to mmc 2025-07-07 16:37:39 +02:00
Andy Wingo
d34dd9a644 nofl: Use atomics to prevent races in parallel marker 2025-07-04 15:01:51 +02:00
Andy Wingo
60d6b9dcbf mmc: If growable and moveable heap, ensure evacuation reserve 2025-07-04 10:16:43 +02:00
Andy Wingo
9ac3cf1350 nofl: Finish holes before marking partly full block as full 2025-07-04 10:16:07 +02:00
Andy Wingo
9eabc6b99a Round evacuation target block counts up 2025-07-04 09:39:43 +02:00
Andy Wingo
370d1624c7 Remove a debug assert; checked in nofl_metadata_byte_for_object 2025-07-04 09:39:09 +02:00
Andy Wingo
c0baca39ba mmc: global conservative roots can be interior
* src/mmc.c: Allow interior global roots
2025-07-03 21:55:42 +02:00
Andy Wingo
0b8c09efc4 nofl: More debug-mode consistency checks 2025-07-03 15:49:29 +02:00
Andy Wingo
162c5364b3 nofl: Assert no forwarded object after GC in debug mode 2025-07-03 10:21:31 +02:00
Andy Wingo
e098e55a8c nofl: When going conservative, remove evacuation reserve 2025-07-03 10:14:06 +02:00
Andy Wingo
05fe52f666 nofl: Fix bug clearing pinned bits 2025-07-03 10:13:49 +02:00
Andy Wingo
cd54bbc627 nofl: Pin untagged pointerless allocations
This was the case before, but I forgot why and removed it :/
2025-07-03 10:13:20 +02:00
Andy Wingo
2337de6809 Fix trace kind masking in nofl 2025-07-02 17:23:19 +02:00
Andy Wingo
4b94a45f7c Allow nofl spaces to switch to conservative tracing midflight 2025-07-02 17:17:07 +02:00
Andy Wingo
6aa6f3a257 Nofl space doesn't track ephemerons
Instead, we rely on ephemerons being traced precisely, and thus having a
tag word.
2025-07-02 11:38:30 +02:00
Andy Wingo
b874ad5da6 Allow conservative mmc configs to trace some objects precisely
* api/mmc-attrs.h (gc_allocator_alloc_table_begin_pattern): Unify the
strategies between conservative and precise configurations.  Notably
this mens that TAGGED allocations are traced precisely in
heap-conservative configurations.  Don't pin untagged pointerless
allocations; that is the mutator's responsibility.
* src/mmc.c (compute_trace_kind): Trace tagged objects precisely in all
cases.
(gc_init): Update expectations for alloc table bytes.
2025-07-02 11:06:23 +02:00
Andy Wingo
dda1522ab0 Add gc_can_move_objects() to gc-attrs.h 2025-07-02 09:59:45 +02:00
Andy Wingo
5c55c26ad4 Remove dead code 2025-07-02 09:33:34 +02:00
Andy Wingo
86baf260cc Move inline function decls to their impl headers 2025-07-01 13:09:46 +02:00
Andy Wingo
36043468e8 Mark always-inline functions as maybe-unused 2025-07-01 13:00:12 +02:00
Andy Wingo
4fe4177d7c Split inline function definitions out to separate headers
Users will need to include gc-allocate.h, gc-safepoint.h, and
gc-barrier.h explicitly.
2025-07-01 12:45:41 +02:00
Andy Wingo
c49a372da7 Add gc_resolve_conservative_ref API 2025-05-27 15:50:28 +02:00
Andy Wingo
d0337bf4fe Further fix inlining
I want to get the "possibly_interior" case to fold at compile-time.
2025-05-26 12:18:31 +02:00
Andy Wingo
f5e10eb7c9 mmc: Speed up conservative ref resolution 2025-05-26 11:58:29 +02:00
Andy Wingo
94f6c8ce6a mmc: Fix inlining of trace_conservative_edges for pinned roots 2025-05-26 11:56:34 +02:00
Andy Wingo
cc9eb16e92 Add heuristic to grow mmc heap if no progress in last mutator cycle 2025-05-26 10:34:03 +02:00
Andy Wingo
285ca65472 Fix missing static annotation on root_worklist_alloc 2025-05-23 09:44:20 +02:00
Andy Wingo
f12399ef7d mmc: Only add headroom to unfragmentable heaps if no progress 2025-05-23 09:38:36 +02:00
Andy Wingo
140a412ecd Fix crash in gc_visit_ephemeron_key on objects in extern space 2025-05-23 09:38:02 +02:00
Andy Wingo
2db9cfa918 nofl: Limit sweeping if there are empty blocks 2025-05-22 16:23:04 +02:00
Andy Wingo
6d5e7c9b60 Fix bof returning blocks from the evacuation target list to empties 2025-05-22 16:15:31 +02:00
Andy Wingo
1d157a133d mmc: Add "headroom" for growable heaps that cannot defragment 2025-05-22 14:57:34 +02:00
Andy Wingo
eab463bd6c nofl: Include pending large object allocations in the live data size 2025-05-22 14:57:02 +02:00
Andy Wingo
47ddd3dd5a nofl: No evacuation reserve if evacuation is impossible 2025-05-22 14:56:43 +02:00
Andy Wingo
41de2dfd91 Update conservative roots embedder interface 2025-05-21 14:27:17 +02:00
Andy Wingo
f12990bb64 Fix alignment for platform conservative roots visitor 2025-05-21 14:26:39 +02:00
Andy Wingo
eb5f9ff878 nofl: Add asserts when getting metadata for an object
The metadata byte should have a mark.
2025-05-21 14:20:53 +02:00
Andy Wingo
0277953efc gc_extern_space_visit doesn't take an edge
The whole extern space interface is a bit wonky but for now let's assume
that external objects can't move and therefore we don't need the edge.
2025-05-21 14:04:24 +02:00
Andy Wingo
8b9fe196a1 No need to clear allocation table during allocation
The mmc clears holes eagerly; there is no need to memset during
allocation.
2025-05-21 14:01:42 +02:00
Andy Wingo
b794e46635 mmc: Grow the heap if collection fails to find space for large alloc
For a pending large allocation, we will try to page out blocks from the
nofl space.  However sometimes we are not able to do so, especially if
evacuation is unavailable, as in a heap-conservative configuration.  In
that case, if the heap is growable, grow the heap after GC if there are
still bytes pending to page out.
2025-05-16 22:01:55 +02:00
Andy Wingo
fbcdffdc62 Fix bogus assert in mmc.c:deactivate_mutator 2025-05-16 22:01:15 +02:00
Andy Wingo
2018a77f36 Fix bogus static debug check in mmc init 2025-05-16 22:00:48 +02:00
Andy Wingo
e59fde2edf Fix build issue with mmc in Guile
For some reason we need to include gc-api with GC_IMPL already defined,
otherwise the attrs don't get picked up.
2025-05-16 22:00:02 +02:00
Andy Wingo
7010b4fce0 Fix --with-gc-debug in whippet.m4 2025-05-16 21:59:40 +02:00
Andy Wingo
9512c8b806 Simplify mmc-attrs.h 2025-05-16 21:59:27 +02:00
Andy Wingo
8a157bc616 Add allocation counter to prepare_gc event
Adapt all users
2025-05-16 21:59:07 +02:00
Andy Wingo
f5edbc278b Add warn proc to bdw 2025-05-15 15:56:40 +02:00
Andy Wingo
08e6633f93 Add embedder API to provide heap and mutator conservative roots 2025-05-15 14:46:34 +02:00
Andy Wingo
2f13187f62 Add gc_safepoint_signal_number() API 2025-05-15 11:59:51 +02:00
Andy Wingo
6a554e5dd7 Add gc_deactivate / gc_reactivate
Guile needs this.
2025-05-15 11:39:12 +02:00