Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Trace events
type t =
| Alloc of {
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.
*)length : int;
Length of the sampled allocation, in words, not including header word
*)nsamples : int;
Number of samples made in this allocation. At least 1.
*)is_major : bool;
Whether this object was initially allocated on the major heap
*)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
.
backtrace_length : int;
Length of the backtrace
*)common_prefix : int;
A prefix of this length has not changed since the last event
*)}
| Promote of Obj_id.t
| Collect of Obj_id.t
val to_string : (Location_code.t -> Location.t list) -> t -> string