Skip to content

Support building executables against OCaml 4.11's instrumented runtime #3500

@abbysmal

Description

@abbysmal

Hello,

Desired Behavior

OCaml 4.11.0 will ship with a new version of the instrumented runtime.
This allows users to generates tracefiles containing information about the execution of the runtime, mainly GC activity for now.
Building an executable against the instrumented runtime works as follow:

ocamlopt -runtime-variant=i -o program.exe program.ml

It also does work for the bytecode compiler. (and the runtime is also available as ocamlruni.)

Once built, a program has to be started with the OCAML_EVENTLOG_ENABLED=1 environment variable as well to enabled tracing.

I open this feature request. after discussing with @avsm and @kayceesrk about the potential inclusion of a simplified flow for building instrumented targets in dune.

For now, using the flags stanza in dunefiles is enough, but maybe an user could request a target to be built against the instrumented runtime via a shorthand of some sort.

(maybe by allowing building a target.exe.inst/target.bc.inst target? I do not know which approach would be the most desirable.)

Thank you very much in advance for your time, and sorry if I missed providing more information about the expected flow.
I can provide more information on the instrumented runtime if need be, feel free to ask if you have any question.

Engil.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions