package mopsa

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Hook header

***************

val name : string
val debug : ('a, Format.formatter, unit, unit) format4 -> 'a

Command-line options

************************

val opt_flame_graph_path : string ref

Path of the output flame graph samples file

val opt_flame_graph_resolution : string ref

Resolution of the flame graph samples

Timing records

******************

type timing = {
  1. callstack : string list;
    (*

    Call stack

    *)
  2. time : float;
    (*

    Time spent in the function

    *)
}

Timing record of a function call

val records : timing Queue.t

Collection of past timing records

val cur : timing ref

Current timing record

Call stack observer

***********************

val call_detected : Mopsa.callsite -> unit

Update the state when a call is detected

val return_detected : unit -> unit

Update the state when a return is detected

val observe_callstack : Mopsa.callstack -> 'a -> unit

Observe the call stack and update the timing records

Statistics

**************

val pp_timing_sample : Format.formatter -> timing -> unit

Print a timing record as a flame graph sample

val export_flame_graph : unit -> unit

Export timing records as flame graph samples

val print_stats : unit -> unit

Print the statistics table

Events handlers

*******************

val init : 'a -> unit
val on_before_exec : 'a -> Mopsa.stmt -> 'b -> 'c Mopsa.Flow.flow -> unit
val on_after_exec : 'a -> 'b -> 'c -> 'd -> 'e -> unit
val on_before_eval : 'a -> 'b -> 'c -> 'd -> 'e -> unit
val on_after_eval : 'a -> 'b -> Mopsa.expr -> 'c -> 'd -> ('e, 'f) Mopsa.Cases.cases -> unit
val on_finish : 'a -> 'b -> unit
OCaml

Innovation. Community. Security.