-
Notifications
You must be signed in to change notification settings - Fork 18
OCAML_RUNTIME_EVENTS_PRESERVE doesn't work alongside olly #75
Description
Steps to reproduce
- Obtain olly: either through opam or from source using dune build
- Try running command while setting the environment variable that keeps .events file. For eg:
OCAML_RUNTIME_EVENTS_PRESERVE=1 dune exec olly -- gc-stats --dir=./tmp-tmp "../infer/infer/bin/infer analyze --no-progress-bar --no-report --multicore -j $(getconf _NPROCESSORS_ONLN)"
Expected behavior
I was hoping that the .events file weren't deleted at the end of the run
Actual behavior
No .events file are available at the end of the run
Other details
Setting all the runtime events environment variables does seem to work
OCAMLRUNPARAM=e=50 OCAML_RUNTIME_EVENTS_PRESERVE=1 OCAML_RUNTIME_EVENTS_DIR=./tmp-tmp OCAML_RUNTIME_EVENTS_START=1 dune exec olly -- gc-stats --dir=./tmp-tmp "../infer/infer/bin/infer analyze --no-progress-bar --no-report --multicore -j $(getconf _NPROCESSORS_ONLN)"
Looking at the source, this is related to olly setting these variables and removing the files during cleanup. The runtime saving these files likely happens after olly exits and so there are two .events file available after running the latter command. I'm unsure what might be the best behavior in this case