Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Enable -g and OCAMLRUNPARAM=b by default #6728
Original bug ID: 6728
The size hit of -g is insignificant; a raw opam init checkout (not even any compilers or packages installed) is 60M, and a dozen packages blows it up to 500M. I haven't seen anyone complain.
The fact that -g enables several things unrelated to backtraces (see #6238) should be still addressed.
The rationale for enabling OCAMLRUNPARAM=b is well described in #5855. Additionally:
Not only most OCaml programs are unaffected by the slight performance hit due to collection of backtraces, but also since after 4.02, raise_notrace is available. I think it's time to stop caring about the performance hit at all. The code which require fast exceptions can (and should) well have them with raise_notrace.
Comment author: @damiendoligez
While I agree that no one should care much about the size increase, we have many users who do care a lot about performance.
In any case, if we enable backtraces by default, we'll have to change the parsing of OCAMLRUNPARAM to provide a syntax for disabling backtraces.