1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-18 01:30:27 +02:00

Switch mmc to field-logging write barrier

Instead of the card table, use metadata bytes for field-logging.  More
precision should lead to less work during the pause.
This commit is contained in:
Andy Wingo 2024-10-02 21:25:09 +02:00
parent 1493bf6398
commit 1ecb45a437
6 changed files with 385 additions and 182 deletions

View file

@ -56,7 +56,7 @@ static inline uint8_t gc_old_generation_check_alloc_table_bit_pattern(void) {
static inline enum gc_write_barrier_kind gc_write_barrier_kind(size_t obj_size) {
if (GC_GENERATIONAL) {
if (obj_size <= gc_allocator_large_threshold())
return GC_WRITE_BARRIER_CARD;
return GC_WRITE_BARRIER_FIELD;
return GC_WRITE_BARRIER_SLOW;
}
return GC_WRITE_BARRIER_NONE;
@ -71,7 +71,7 @@ static inline size_t gc_write_barrier_card_size(void) {
}
static inline size_t gc_write_barrier_field_table_alignment(void) {
GC_ASSERT(GC_GENERATIONAL);
return 4 * 1024 * 1024;
return gc_allocator_alloc_table_alignment();
}
static inline size_t gc_write_barrier_field_fields_per_byte(void) {
GC_ASSERT(GC_GENERATIONAL);