Skip to content

LexiFi/landmarks-starter

Repository files navigation

Landmarks Starter Repository

See Landmarks repository for more information about landmarks or check dune manual for information about instrumenting with dune.

Terminal Video of commands describe below

Install dependencies using opam

opam install -y --deps-only .

Triggering the instrumentation

Use the (instrumentation (backend landmarks)) or (instrumentation (backend landmarks --auto)) on library/executable stanza to tell dune to instrument parts of your code.

Instrumented executables check the value of the OCAML_LANDMARKS environnement variable to display the results. Moreover, the preprocessor may also read this variable to activate the "automatic" mode for all the code. You can use the context stanza in the dune-workspace file to set this environnement variable during both build and execution.

Manually

dune build --instrument-with landmarks ./test.exe
OCAML_LANDMARKS=on _build/default/test.exe

Using build contexts

The contexts are configured in the dune-workspace file.

For instance, the following commands will execute test.exe in the build context profiling and profiling-auto.

dune exec --context profiling ./test.exe
dune exec --context profiling-auto ./test.exe

About

Starter repository for the landmarks ocaml library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages