Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable -g and OCAMLRUNPARAM=b by default #6728

Open
vicuna opened this Issue Dec 19, 2014 · 4 comments

Comments

Projects
None yet
1 participant
@vicuna
Copy link
Collaborator

vicuna commented Dec 19, 2014

Original bug ID: 6728
Reporter: @whitequark
Status: acknowledged (set by @damiendoligez on 2015-01-09T17:05:06Z)
Resolution: open
Priority: normal
Severity: feature
Category: compiler driver
Related to: #5855 #6238
Monitored by: @ygrek @hcarty @dbuenzli @yakobowski

Bug description

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.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Jan 9, 2015

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.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Jan 9, 2015

Comment author: @whitequark

I do agree, hence the note on raise_notrace. And if the backtraces are not dynamically necessary, the debug information is not read at all, so just always enabling -g would be a zero-cost change.

OCAMLRUNPARAM=b=0?

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Jan 9, 2015

Comment author: @lpw25

There would definitely need to be a -no-g option (with a better name than that), manually setting OCAMLRUNPARAM is not a viable alternative.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Mar 1, 2017

Comment author: @damiendoligez

Note: the OCAMLRUNPARAM=b=0 part is already implemented as part of #6808.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.