Skip to content

olly latency does not compute latency correctly #7

@kayceesrk

Description

@kayceesrk

For a minor GC immediately followed by a major slice on OCaml 5.0, the current probes for runtime events emit events like this

image

olly computes the latency by computing the duration of the non-enclosed span. In the trace above, the spans stw_leader (corresponding to the minor gc) and major (corresponding to the major slice) are both non-enclosed. While the real GC latency is the sum of the span duration for stw_leader and major, olly currently identifies them as separate events. Hence, the latencies reported by olly latency will be lower than the real latencies.

Fix

This can be fixed either by

  1. Ensuring that for any GC event, there is a single outermost non-enclosed span. This needs change in how the events are emitted in the OCaml runtime.
  2. Apply heuristics to identify that these two events correspond to a single compound GC event where the mutator does not get a chance to run between.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions