package memtrace-mirage

  1. Overview
  2. Docs

Trace events

type t =
  1. | Alloc of {
    1. obj_id : Obj_id.t;
      (*

      An identifier for this allocation, used to refer to it in other events. These identifiers are generated in allocation order.

      *)
    2. length : int;
      (*

      Length of the sampled allocation, in words, not including header word

      *)
    3. nsamples : int;
      (*

      Number of samples made in this allocation. At least 1.

      *)
    4. source : Allocation_source.t;
      (*

      How this object was initially allocated

      *)
    5. backtrace_buffer : Location_code.t array;
      (*

      Backtrace of the allocation. The backtrace elements are stored in order from caller to callee. The first element is the main entrypoint and the last is the allocation.

      NB: this is a mutable buffer, reused between events. Entries at indices beyond backtrace_length - 1 are not meaningful. If you want to store backtraces, you must copy them using: Array.sub backtrace_buffer 0 backtrace_length.

      *)
    6. backtrace_length : int;
      (*

      Length of the backtrace

      *)
    7. common_prefix : int;
      (*

      A prefix of this length has not changed since the last event

      *)
    }
  2. | Promote of Obj_id.t
  3. | Collect of Obj_id.t
val to_string : (Location_code.t -> Location.t list) -> t -> string
OCaml

Innovation. Community. Security.