mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-08 21:20:19 +02:00
Merge remote-tracking branch 'whippet/main' into wip-whippet
This commit is contained in:
commit
a344c225c4
11 changed files with 47 additions and 18 deletions
|
@ -26,6 +26,7 @@ struct gc_basic_stats {
|
|||
size_t max_heap_size;
|
||||
size_t live_data_size;
|
||||
size_t max_live_data_size;
|
||||
uint64_t allocation_counter_at_last_gc;
|
||||
struct gc_latency pause_times;
|
||||
};
|
||||
|
||||
|
@ -68,12 +69,14 @@ static inline void gc_basic_stats_waiting_for_stop(void *data) {}
|
|||
static inline void gc_basic_stats_mutators_stopped(void *data) {}
|
||||
|
||||
static inline void gc_basic_stats_prepare_gc(void *data,
|
||||
enum gc_collection_kind kind) {
|
||||
enum gc_collection_kind kind,
|
||||
uint64_t allocation_counter) {
|
||||
struct gc_basic_stats *stats = data;
|
||||
if (kind == GC_COLLECTION_MINOR)
|
||||
stats->minor_collection_count++;
|
||||
else
|
||||
stats->major_collection_count++;
|
||||
stats->allocation_counter_at_last_gc = allocation_counter;
|
||||
}
|
||||
|
||||
static inline void gc_basic_stats_roots_traced(void *data) {}
|
||||
|
|
|
@ -36,10 +36,11 @@ static inline void gc_event_listener_chain_mutators_stopped(void *data) {
|
|||
chain->tail.mutators_stopped(chain->tail_data);
|
||||
}
|
||||
static inline void
|
||||
gc_event_listener_chain_prepare_gc(void *data, enum gc_collection_kind kind) {
|
||||
gc_event_listener_chain_prepare_gc(void *data, enum gc_collection_kind kind,
|
||||
uint64_t counter) {
|
||||
struct gc_event_listener_chain *chain = data;
|
||||
chain->head.prepare_gc(chain->head_data, kind);
|
||||
chain->tail.prepare_gc(chain->tail_data, kind);
|
||||
chain->head.prepare_gc(chain->head_data, kind, counter);
|
||||
chain->tail.prepare_gc(chain->tail_data, kind, counter);
|
||||
}
|
||||
static inline void gc_event_listener_chain_roots_traced(void *data) {
|
||||
struct gc_event_listener_chain *chain = data;
|
||||
|
|
|
@ -8,7 +8,8 @@ struct gc_event_listener {
|
|||
void (*requesting_stop)(void *data);
|
||||
void (*waiting_for_stop)(void *data);
|
||||
void (*mutators_stopped)(void *data);
|
||||
void (*prepare_gc)(void *data, enum gc_collection_kind kind);
|
||||
void (*prepare_gc)(void *data, enum gc_collection_kind kind,
|
||||
uint64_t allocation_counter);
|
||||
void (*roots_traced)(void *data);
|
||||
void (*heap_traced)(void *data);
|
||||
void (*ephemerons_traced)(void *data);
|
||||
|
|
|
@ -45,9 +45,10 @@ LTTNG_UST_TRACEPOINT_EVENT_INSTANCE(
|
|||
whippet, tracepoint, whippet, mutators_stopped, LTTNG_UST_TP_ARGS())
|
||||
LTTNG_UST_TRACEPOINT_EVENT(
|
||||
whippet, prepare_gc,
|
||||
LTTNG_UST_TP_ARGS(int, gc_kind),
|
||||
LTTNG_UST_TP_ARGS(int, gc_kind, uint64_t, allocation_counter),
|
||||
LTTNG_UST_TP_FIELDS(
|
||||
lttng_ust_field_enum(whippet, gc_kind, int, gc_kind, gc_kind)))
|
||||
lttng_ust_field_enum(whippet, gc_kind, int, gc_kind, gc_kind)
|
||||
lttng_ust_field_integer(uint64_t, allocation_counter, allocation_counter)))
|
||||
LTTNG_UST_TRACEPOINT_EVENT_INSTANCE(
|
||||
whippet, tracepoint, whippet, roots_traced, LTTNG_UST_TP_ARGS())
|
||||
LTTNG_UST_TRACEPOINT_EVENT_INSTANCE(
|
||||
|
|
|
@ -8,7 +8,8 @@ static inline void gc_null_event_listener_requesting_stop(void *data) {}
|
|||
static inline void gc_null_event_listener_waiting_for_stop(void *data) {}
|
||||
static inline void gc_null_event_listener_mutators_stopped(void *data) {}
|
||||
static inline void gc_null_event_listener_prepare_gc(void *data,
|
||||
enum gc_collection_kind) {}
|
||||
enum gc_collection_kind,
|
||||
uint64_t) {}
|
||||
static inline void gc_null_event_listener_roots_traced(void *data) {}
|
||||
static inline void gc_null_event_listener_heap_traced(void *data) {}
|
||||
static inline void gc_null_event_listener_ephemerons_traced(void *data) {}
|
||||
|
|
|
@ -42,7 +42,6 @@ static inline uint8_t gc_allocator_alloc_table_begin_pattern(enum gc_allocation_
|
|||
case GC_ALLOCATION_UNTAGGED_CONSERVATIVE:
|
||||
return young | trace_conservatively;
|
||||
case GC_ALLOCATION_TAGGED_POINTERLESS:
|
||||
return young | trace_none;
|
||||
case GC_ALLOCATION_UNTAGGED_POINTERLESS:
|
||||
return young | trace_none;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue