package mopsa

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

Module Function_profiler.HookSource

Hook header

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

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

Command-line options

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

Sourceval opt_flame_graph_path : string Stdlib.ref

Path of the output flame graph samples file

Sourceval opt_flame_graph_resolution : string Stdlib.ref

Resolution of the flame graph samples

Timing records

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

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

    Call stack

    *)
  2. time : float;
    (*

    Time spent in the function

    *)
}

Timing record of a function call

Sourceval records : timing Stdlib.Queue.t

Collection of past timing records

Sourceval cur : timing Stdlib.ref

Current timing record

Call stack observer

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

Sourceval call_detected : Mopsa.callsite -> unit

Update the state when a call is detected

Sourceval return_detected : unit -> unit

Update the state when a return is detected

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

Observe the call stack and update the timing records

Statistics

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

Sourceval pp_timing_sample : Stdlib.Format.formatter -> timing -> unit

Print a timing record as a flame graph sample

Sourceval export_flame_graph : unit -> unit

Export timing records as flame graph samples

Sourceval print_stats : unit -> unit

Print the statistics table

Events handlers

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

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

Innovation. Community. Security.