1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-07 04:30:18 +02:00
Commit graph

397 commits

Author SHA1 Message Date
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
Andy Wingo
8c1b98d306 Make parallel tracer less verbose; tracepoints are better 2025-03-05 11:32:53 +01:00
Andy Wingo
5c4d5a72e4 Fix embarrassing bug in lospace initial mark value 2025-03-05 11:32:47 +01:00
Andy Wingo
e780d27959 nofl: Refactor SWAR mark-matching routines
We are going to try to use fewer bits for mark state.
2025-03-05 10:12:43 +01:00
Andy Wingo
c410992d55 Doc rewording 2025-02-14 12:34:17 +01:00
Andy Wingo
e19bf100b9 Doc rewording 2025-02-14 12:33:09 +01:00
Andy Wingo
0bef1e9435 Doc rewording 2025-02-14 12:32:54 +01:00
Andy Wingo
367e04f164 Add documentation on tracepoints
Also clean up how-to-build documentation
2025-02-14 12:30:40 +01:00
Andy Wingo
81da950ebe Steal becomes an instant event 2025-02-12 14:33:05 +01:00
Andy Wingo
c0dd2e58d1 Fix embed.mk for tracepoints 2025-02-11 21:51:46 +01:00
Andy Wingo
2f0c0f8f8e Refactor lttng makefile bits 2025-02-11 21:42:13 +01:00
Andy Wingo
d675a9b8f1 Add tracepoints to tracer itself
Also fix an issue whereby the main thread would spin, waiting for other
active threads to finish, doing no work itself.
2025-02-11 16:14:27 +01:00
Andy Wingo
461efa98a0 Wire up tracepoints for event-listener interface 2025-02-10 13:41:19 +01:00
Andy Wingo
cca54736a0 Add build support for tracepoints via lttng-ust 2025-02-10 12:45:25 +01:00
Andy Wingo
b517464d7f copy-space: refactor to copy_space_can_allocate 2025-01-24 16:11:11 +01:00
Andy Wingo
68e3a692f5 Fix bug with lospace in generational configurations 2025-01-23 19:24:57 +01:00
Andy Wingo
7049871484 lospace: Fix bug when splitting freelist entries 2025-01-23 17:22:29 +01:00
Andy Wingo
7a5c994613 lospace: Add missing lock in allocation path 2025-01-23 17:12:34 +01:00
Andy Wingo
2c72034a1c Fix bug in mmc for new lospace locking discipline 2025-01-23 15:19:09 +01:00
Andy Wingo
7a9de35aaa lospace: Rely on object_map to be immutable during collection
This avoids having multiple threads serialize through a mutex.  We still
have to allow for mutation on object_tree and remembered_edges, though.
2025-01-23 15:06:44 +01:00
Andy Wingo
7885ea1037 nofl: Prevent needless expansion
Releasing memory proceeds until there is (-NOFL_BLOCK_SIZE,0] bytes to
release; we should only expand when the number of bytes to reacquire is
large enough.
2025-01-21 21:12:45 +01:00
Andy Wingo
2a51399896 nofl: Disable some consistency checks when tracing conservatively 2025-01-21 21:09:03 +01:00
Andy Wingo
f93777c133 generational-pcc: Make a smaller pending-ephemeron nursery table
Otherwise we end up visiting a pending-ephemeron set that is
proportional in size to the whole heap.
2025-01-15 22:32:31 +01:00
Andy Wingo
685c63ab3a Trim remembered-set during minor GC
When visiting remembered-set roots, if the target is no longer in
newspace, forget the edge.
2025-01-15 22:31:48 +01:00
Andy Wingo
cc68a9a610 Update docs 2025-01-13 21:42:18 +01:00
Andy Wingo
f9c2ce04d4 Add generational-pcc to embed.mk 2025-01-13 21:08:13 +01:00
Andy Wingo
ba65e32b00 pcc / copy-space: Allow allocations to fail
This fixes an issue in which minor collection of a nursery full of live
data can fail because of fragmentation, whereas really it should just
fall back to promotion.
2025-01-13 17:22:43 +01:00
Andy Wingo
5fdb14cc5e Remove "ABORTED" atomic forwarding state
It was not distinguishable from "NOT_FORWARDED".
2025-01-13 16:44:12 +01:00
Andy Wingo
b23b77218c nofl space: Fix a bug for parallel optimistic evacuation
If two tracer threads visit edges to the same object on an evacuation
candidate block, and they first see that the object is unmarked, then
they both try to evacuate it at the same time.  Thread A might try and
fail before thread B manages to acquire the forwarding word.  B needs to
see that A marked it in place, and to do that it needs to re-load the
mark byte after acquiring the forwarding word.  Otherwise perhaps B
could succeed and you would end up with two copies of an object, one of
them garbled!
2025-01-13 16:28:40 +01:00
Andy Wingo
e41000094d Add missing write barriers to finalizers.c 2025-01-13 10:23:47 +01:00
Andy Wingo
b37a7f3862 copy-space: Fix bug computing field logging byte location
Also re-enable survivors in generational-pcc :)
2025-01-13 09:12:34 +01:00
Andy Wingo
27f9a1f01e gpcc: Temporarily always promote survivors
Generational PCC is still a bit buggy.
2025-01-10 16:40:19 +01:00
Andy Wingo
4ab72e92b0 gpcc: Don't mix survivors and new objects in same block 2025-01-10 16:40:19 +01:00
Andy Wingo
c95b7ef046 New collector configuration: generational-pcc 2025-01-10 16:40:19 +01:00
Andy Wingo
65b74b5abb Add generational support to pcc 2025-01-10 16:40:14 +01:00
Andy Wingo
0b8630145a Copy space clears log bits when obtaining fresh blocks 2025-01-10 16:05:34 +01:00
Andy Wingo
555694965d Looking up large object for edge returns the object 2025-01-10 16:05:34 +01:00
Andy Wingo
e4048b5296 Add offset to field-logging fast path 2025-01-10 16:05:34 +01:00