-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
documented OCAMLRUNPARAM settings, fixes #8697 #9398
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work on this - there are a few things which need tweaking; in particular there is a good PR in here updating ocamlrun
's documentation, you just need to separate out the OCAMLRUNPARAM
bits
Thanks for the review. I'm done with all the specified changes. |
@Anukriti12 your change adds documentation in the manpages ( |
Thanks for the update, this looks nice (but I haven't reviewed in details for now). @dra27, are the changes you requested addressed? |
Added -c flag of OCAMLRUNPARAM aswell, fixes #7870 |
( @dra27 ping on potential re-reviewing ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In absence of a response by @dra27, I would propose to go ahead and approve/merge this PR. As far as I can tell from the current diff, the new documentation is correct, and I believe having it is very useful. (Just today I tried to check the documentation of the H
flag and there was none.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I'd had a draft review sat open for ages. The documentation for c
must be moved to the correct place. If you add a little more documentation for the t
option in OCAMLRUNPARAM
, then there are several FIXME
comments which can be completely removed as they're then totally dealt with.
It's very nearly there - thanks for your patience!
exit. | ||
.TP | ||
.B \-M | ||
Print the magic number expected for bytecode executable by this version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Print the magic number expected for bytecode executable by this version | |
Print the magic number expected for bytecode executables by this version |
@@ -65,10 +65,13 @@ section~\ref{s:ocamlrun-dllpath}). | |||
Print the magic number of the bytecode executable given as argument | |||
and exit. | |||
\item["-M"] | |||
Print the magic number expected by this version of the runtime and exit. | |||
Print the magic number expected for bytecode executable by this version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Print the magic number expected for bytecode executable by this version | |
Print the magic number expected for bytecode executables by this version |
(cleanup_on_exit) Shut the runtime down gracefully on exit. The option | ||
also enables pooling (as in caml_startup_pooled). This mode can be used | ||
to detect leaks with a third-party memory debugger. | ||
.TP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the wrong place - it wants to be further down with the H
, w
and W
parameters you added for OCAMLRUNPARAM
(c
is a setting in OCAMLRUNPARAM
, not a flag to ocamlrun
itself)
@@ -145,9 +161,21 @@ Turn on randomization of all hash tables by default (see the | |||
module of the standard library). This option takes no | |||
argument. | |||
.TP | |||
.BR H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub won't me put the comment, but 20 lines above this is a FIXME
which is nearly dealt with and wants deleting. In OCAMLRUNPARAM
parameter t
is similar ocamlrun -t
, except that you set the trace level, rather than incrementing it.
\item[w] Sets size of window used by major GC for smoothing out variations in | ||
its workload. This is an integer between 1 and 50. (Default: 1) | ||
\item[W] Activates runtime warnings (such as Channel opened on file dies without | ||
being closed, unflushed data, etc.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likewise, a few lines down there's a FIXME
comment which can go (once option t
is documented here, too)
Closing in favour of #10666, which has used this as a starting point, thanks! |
Added missing OCAMLRUNPARAM settings, as mentioned in #8697
-n flag is still missing, I'm not sure what it exactly does it sets minor_max_bsz, in config.h right before where Custom_minor_max_bsz_def is defined, this is commented:
Default setting for maximum size of custom objects counted as garbage in the minor heap. Documented in gc.mli
Let me know about accommodating changes.