package magic-trace

  1. Overview
  2. Docs
Collects and displays high-resolution traces of what a process is doing

Install

Dune Dependency

Authors

Maintainers

Sources

v1.0.1.tar.gz
sha256=77b2e4b3bc769910656d0fdee4839250548aa49486fd3554f6c057f1d64abe99
sha512=1f111db6348673c22a110611182a92c8aa999668dc077c44bc4abcaa72ccb197899ff2577047888627b50fcc9890824de6c82b4fe9f06129190b8b487ec3f716

doc/src/magic-trace.magic_trace_core/backend_intf.ml.html

Source file backend_intf.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
(** Backends, which do the Processor Trace recording, present this unified
    interface in order to be exposed as commands which can generate traces. *)

open! Core
open! Async

module type S = sig
  module Record_opts : sig
    type t

    val param : t Command.Param.t
  end

  module Recording : sig
    type t

    val attach_and_record
      :  Record_opts.t
      -> debug_print_perf_commands:bool
      -> subcommand:Subcommand.t
      -> when_to_snapshot:When_to_snapshot.t
      -> trace_mode:Trace_mode.t
      -> timer_resolution:Timer_resolution.t
      -> record_dir:string
      -> Pid.t
      -> t Deferred.Or_error.t

    val maybe_take_snapshot : t -> source:[ `ctrl_c | `function_call ] -> unit
    val finish_recording : t -> unit Deferred.Or_error.t
  end

  module Decode_opts : sig
    type t

    val param : t Command.Param.t
  end

  val decode_events
    :  Decode_opts.t
    -> debug_print_perf_commands:bool
    -> record_dir:string
    -> perf_map:Perf_map.t option
    -> Decode_result.t Deferred.Or_error.t
end
OCaml

Innovation. Community. Security.