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
Andy Wingo
675d8d649a
Rework gc_call_without_gc to allow reentrancy
...
Rename to gc_deactivate_for_call / gc_reactivate_for_call
2025-05-15 11:26:27 +02:00
Andy Wingo
d58aa71281
Add API to inihibit pre-emption
...
This is really only for BDW. It uses GC_alloc_lock() /
GC_alloc_unlock().
2025-05-15 09:01:28 +02:00
Andy Wingo
cc2a90b494
bdw: Fix detection of objects on free-lists
...
I am not sure about ephemerons and finalizers, though.
2025-05-12 13:38:49 +02:00
Andy Wingo
3440bb864d
bdw: Use BDW lock instead of gc_heap lock; clear dead mutators
...
This will protect traversal of the mutator list during marking. Also,
clear dead mutators, so that if they are still reachable, they won't be marked.
2025-05-12 11:52:51 +02:00
Andy Wingo
a5c69fb920
Add try-push, swap-value API to ephemerons
...
The former allows for knowing whether a push succeeded or not, which is
useful for concurrent hash tables. The latter makes ephemerons mutable,
if the embedder wants to use them that way.
2025-05-09 09:56:17 +02:00
Andy Wingo
c86408a33c
Fix ephemeron death for bdw
...
* src/bdw.c (gc_ephemeron_init): Fix misuse of disappearing-link API.
2025-05-05 10:42:28 +02:00
Andy Wingo
c7fe77de0e
Add gc_heap_contains API
2025-05-04 12:10:03 +02:00
Andy Wingo
c9063b8027
bdw: Disable thread-local freelists for pointerless allocations
...
There was a race between GC and popping the head off freelists. We
could have separate freelists for tagged and untagged normal allocations
though.
2025-04-23 17:28:46 +02:00
Andy Wingo
06b53470f4
For freelist allocators, clear the freelist link on the returned obj
...
* api/gc-api.h (gc_allocate_small_fast_freelist):
* src/bdw.c (allocate_small): Clear freelist link, so the object is
completely zeroed. In some cases the embedder / compiler / JIT will be
able to elide this write.
2025-04-23 16:44:59 +02:00
Andy Wingo
e2b75d302d
Add gc_heap_set_allocation_failure_handler
...
Also wire it up to bdw.
2025-04-23 11:42:21 +02:00
Andy Wingo
1e41f0e093
mmc: Tail-call an out-of-memory handler if allocation fails
2025-04-23 11:31:15 +02:00
Andy Wingo
a0148d4b38
pcc: Tail-call an out-of-memory handler if allocation fails
2025-04-23 10:47:32 +02:00
Andy Wingo
6032adede9
semi: Tail-call an out-of-memory handler if allocation fails
2025-04-23 10:47:13 +02:00
Andy Wingo
31b373b8f2
copy space: Palliate a failure mode due to fragmentation
2025-04-23 10:46:23 +02:00
Andy Wingo
3c4fdfde0e
Fix embarassing bug in which lack of MAP_FIXED meant unaligned slabs
...
This would manifest itself in odd failures when accessing
block/object metadata on slabs.
2025-04-23 10:43:14 +02:00
Andy Wingo
1818d7fa0b
Add -fno-strict-aliasing to libwhippet CFLAGS
2025-04-22 10:01:21 +02:00
Andy Wingo
2dab407ec1
Expose definition of gc_stack_addr, rework API
2025-04-18 15:08:01 +02:00
Andy Wingo
d3df1a632a
Record last live data size in basic stats.
2025-04-17 12:29:30 +02:00
Andy Wingo
e4f9b1d8f8
Use abspath in GNU make snippet
2025-04-16 13:39:16 +02:00
Andy Wingo
022052b207
Fix embed.mk
2025-04-16 13:15:13 +02:00
Andy Wingo
185804dc41
Fix embed.am to not have libwhippet-common.la
2025-04-16 12:44:30 +02:00
Andy Wingo
a9ba085ad0
Add missing file
2025-04-16 12:43:15 +02:00
Andy Wingo
55d3fb7dc7
More build system reworking
2025-04-16 12:41:42 +02:00
Andy Wingo
75700ec3ed
More build system reworking
2025-04-16 12:40:44 +02:00
Andy Wingo
6e36c039e9
Rework extension points between embedder and GC
2025-04-16 12:06:02 +02:00
Andy Wingo
424a0cefd9
autotools: refactor to avoid defining noinst_HEADERS
2025-04-15 13:03:11 +02:00
Andy Wingo
27d66fa349
m4: Fix WHIPPET_PKG_BDW quoting error
2025-04-15 11:04:30 +02:00
Andy Wingo
e060c5fc99
Add --with-bdw-gc
2025-04-15 10:25:51 +02:00
Andy Wingo
f909438596
Fix distcheck, better docs
2025-04-10 14:07:52 +02:00
Andy Wingo
96c8bb8ce9
Fix unused variable in mt-gcbench.c
2025-04-10 14:03:29 +02:00
Andy Wingo
1664913ebd
Update autotools and docs
2025-04-10 13:54:14 +02:00
Andy Wingo
63f52b635b
Add some text about autotools
2025-04-10 13:39:29 +02:00
Andy Wingo
0c35069f58
Add autotools embedding files
2025-04-10 12:13:48 +02:00
Andy Wingo
d1aa0d894f
bdw: Fix embarrassing failure to mark atomic freelists
2025-03-27 12:00:28 +01:00
Andy Wingo
05e8aba462
Add gc_allocation_counter API
2025-03-14 09:44:18 +01:00
Andy Wingo
c51a48eae8
Fix prototype of copy_space_add_to_allocation_counter
2025-03-14 09:15:03 +01:00
Andy Wingo
0cff6ffba4
Basic stats also record CPU time
2025-03-13 13:44:02 +01:00
Andy Wingo
3a86fedcde
Update nofl metadata byte comment
2025-03-07 21:15:47 +01:00
Andy Wingo
d22eb88948
nofl space / mmc supports untagged allocations
2025-03-07 13:37:59 +01:00
Andy Wingo
521cd44ebd
Add gc_allocation_kind argument to gc_allocate
...
Adapt all users. Will eventually allow for mmc to have untagged
allocations.
2025-03-07 13:37:59 +01:00
Andy Wingo
5bddd522cf
Rework large_object_space_alloc to also map if needed
...
Also fix a bug in which objects reclaimed from freelists were not
zeroed.
2025-03-07 13:37:59 +01:00
Andy Wingo
6c444b33f1
Remove card-marking barriers
...
Field barriers aren't slower and are more precise.
2025-03-07 13:37:59 +01:00
Andy Wingo
4a95a514b7
Fix inline old-generation check for nofl space mark byte changes
2025-03-07 13:37:59 +01:00
Andy Wingo
f1b660484e
Remove gc_allocator_needs_clear
...
Whether the returned object needs to be cleared or not depends on a
couple things:
- Whether the embedder actually needs the object to be cleared.
- Whether the collector allocated the object from memory that was all
zeroes already.
The goal of course would be to prevent clearing memory if the mutator
was just going to write all over it. But it's hard to know statically
if the memory would have been all zeroes anyway, and in that case if you
did clear it you'd be doing double work. In the end it's simpler to
just require collectors to clear memory in bulk. We can revisit this
later if it is an issue.
2025-03-07 13:37:59 +01:00
Andy Wingo
3db1e48ea6
Fix race in large object space when counting live object pages
...
Embarrassing!
2025-03-07 13:37:59 +01:00
Andy Wingo
ed5db9bc36
nofl: Reclaim another mark bit if concurrent tracing is disabled
2025-03-05 17:17:55 +01:00
Andy Wingo
29cf0f40d3
nofl space: Rework treatment of mark bits to avoid masks
...
This will allow us to free up some metadata bits.
2025-03-05 17:10:26 +01:00
Andy Wingo
4d271e7492
nofl space: refactor to add NOFL_METADATA_BYTE_MARK_MASK
2025-03-05 16:08:41 +01:00