mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-17 11:10:18 +02:00
Add conservative heap tracing (not just roots)
Also accelerate mark_space_live_object_granules.
This commit is contained in:
parent
053dbf0b61
commit
910b62af8f
13 changed files with 221 additions and 94 deletions
|
@ -450,6 +450,8 @@ static void tracer_release(struct gc_heap *heap) {
|
|||
|
||||
static inline void tracer_visit(struct gc_edge edge, struct gc_heap *heap,
|
||||
void *trace_data) GC_ALWAYS_INLINE;
|
||||
static inline void tracer_enqueue(struct gc_ref ref, struct gc_heap *heap,
|
||||
void *trace_data) GC_ALWAYS_INLINE;
|
||||
static inline void trace_one(struct gc_ref ref, struct gc_heap *heap,
|
||||
void *trace_data) GC_ALWAYS_INLINE;
|
||||
static inline int trace_edge(struct gc_heap *heap,
|
||||
|
@ -462,8 +464,22 @@ tracer_share(struct local_tracer *trace) {
|
|||
trace_deque_push(trace->share_deque, local_trace_queue_pop(&trace->local));
|
||||
}
|
||||
|
||||
static inline void
|
||||
tracer_enqueue(struct gc_ref ref, struct gc_heap *heap, void *trace_data) {
|
||||
struct local_tracer *trace = trace_data;
|
||||
if (local_trace_queue_full(&trace->local))
|
||||
tracer_share(trace);
|
||||
local_trace_queue_push(&trace->local, ref);
|
||||
}
|
||||
|
||||
static inline void
|
||||
tracer_visit(struct gc_edge edge, struct gc_heap *heap, void *trace_data) {
|
||||
if (trace_edge(heap, edge))
|
||||
tracer_enqueue(gc_edge_ref(edge), heap, trace_data);
|
||||
}
|
||||
|
||||
static inline void
|
||||
tracer_visit_(struct gc_edge edge, struct gc_heap *heap, void *trace_data) {
|
||||
if (trace_edge(heap, edge)) {
|
||||
struct local_tracer *trace = trace_data;
|
||||
if (local_trace_queue_full(&trace->local))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue