Skip to content

olly trace discards lifecycle events #124

Description

@tmcgilchrist

trace registers a lifecycle callback that throws its argument away (lib/olly_trace/olly_trace.ml:33):

and lifecycle _ _ _ _ = () in

So EV_RING_START, EV_RING_STOP, EV_DOMAIN_SPAWN and EV_DOMAIN_TERMINATE never reach the trace, and a Perfetto or Chrome view shows GC spans on ring slots with no indication of when a domain began or ended, or when the ring itself started and stopped.

gc-stats consumes exactly these events and depends on them (lib/olly_gc_stats/olly_gc_stats_common.ml:60-71), using EV_DOMAIN_SPAWN and EV_DOMAIN_TERMINATE to bracket each domain's elapsed time and EV_RING_START and EV_RING_STOP for wall time. The data is available on every supported version.

It matters most where domain identity does. Ring slots are recycled, so without spawn and terminate markers a trace cannot distinguish successive domains that occupied the same slot, which is the confusion behind Domain.self_index versus Domain.self distinction.

Unclear how this impacts Perfetto visualisations, whether they correctly pickup the right domain_id and show a timeline per-unique-domain vs per-ring_id. Worth further investigation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions