obazl / rules_ocaml

A Bazel Language Support Package for OCaml
https://obazl.github.io/docs_obazl
Apache License 2.0
32 stars 7 forks source link

ocaml runtime: debug mode and -runtime-variant #35

Open mobileink opened 3 years ago

mobileink commented 3 years ago

For some reason my ppx executable is printing memory stats:

INFO: From ppx_transform ocaml_module: demos//ppx/adjunct_deps:_Test:
### OCaml runtime: debug mode ###
Initial minor heap size: 256k words
Initial major heap size: 992k bytes
Initial space overhead: 80%
Initial max overhead: 500%
Initial heap increment: 15%
Initial allocation policy: 0
Initial smoothing window: 1
Growing page table to 2048 entries
<>Starting new major GC cycle
### OCaml runtime: heap check ###
Growing gray_vals to 32k bytes
!<>%Target //ppx/adjunct_deps:test up-to-date:
  bazel-bin/ppx/adjunct_deps/test

I've only seen this when a ppx transform runs. No idea what's causing it.

mobileink commented 3 years ago

ok, default for --@ppx//debug was true, which caused -runtime-variant d to be added to cmd line.

TODO: add a flag to control -runtime-variant