1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-06 17:40:29 +02:00

Precise tracing works with heap-conservative-mmc

* libguile/ports.c (scm_make_port_type): Pin the ptob.
* libguile/threads.c (scm_trace_thread_roots): No need to trace dynstack
roots; we will do so within scm_trace_thread.
* libguile/trace.h (scm_trace_struct): Fix arg order to logbit?.
(scm_trace_ephemeron_table): Indentation fix.
(scm_trace_pointer): Actually trace the protected objects.
(scm_trace_vm):
(scm_trace_active_dynamic_state):
(scm_trace_thread): Fix to trace missing references.
(scm_trace_port): Trace the ptob and write_buf_aux.
(scm_trace_random_state): Add comment about rng being static.
* libguile/whippet-embedder.h (gc_is_valid_conservative_ref_displacement):
Don't hide behind an ifdef.
This commit is contained in:
Andy Wingo 2025-07-02 15:11:03 +02:00
parent 24f5e43e61
commit e51cf4bf65
5 changed files with 54 additions and 63 deletions

View file

@ -193,34 +193,6 @@ scm_trace_dynstack (struct scm_dynstack *dynstack,
}
}
struct trace_pinned_trampoline
{
void (*trace_pinned) (struct gc_ref ref,
struct gc_heap *heap,
void *trace_data);
void *trace_data;
};
static void
trace_pinned_trampoline (struct gc_edge edge,
struct gc_heap *heap,
void *trace_data)
{
struct trace_pinned_trampoline *data = trace_data;
return data->trace_pinned (gc_edge_ref (edge), heap, data->trace_data);
}
void
scm_trace_dynstack_roots (struct scm_dynstack *dynstack,
void (*trace_pinned) (struct gc_ref ref,
struct gc_heap *heap,
void *trace_data),
struct gc_heap *heap, void *trace_data)
{
struct trace_pinned_trampoline data = { trace_pinned, trace_data };
return scm_trace_dynstack (dynstack, trace_pinned_trampoline, heap, &data);
}
static inline scm_t_bits *
push_dynstack_entry_unchecked (scm_t_dynstack *dynstack,
scm_t_dynstack_item_type type,