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

documented OCAMLRUNPARAM settings, fixes #8697 #9398

Closed
wants to merge 2 commits into from

Conversation

Anukriti12
Copy link
Contributor

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.

Copy link
Member

@dra27 dra27 left a 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

man/ocamlrun.m Outdated Show resolved Hide resolved
man/ocamlrun.m Show resolved Hide resolved
man/ocamlrun.m Outdated Show resolved Hide resolved
man/ocamlrun.m Outdated Show resolved Hide resolved
Changes Outdated Show resolved Hide resolved
@Anukriti12
Copy link
Contributor Author

Thanks for the review. I'm done with all the specified changes.

@gasche
Copy link
Member

gasche commented Mar 29, 2020

@Anukriti12 your change adds documentation in the manpages (.m) but not, in most cases, in the documentation manual (runtime.etex). Could you add the same documentation (that you wrote for the manpages) to the manual, and possibly ensure that both places document the same warnings?

@gasche
Copy link
Member

gasche commented Mar 30, 2020

Thanks for the update, this looks nice (but I haven't reviewed in details for now).

@dra27, are the changes you requested addressed?

@Anukriti12
Copy link
Contributor Author

Added -c flag of OCAMLRUNPARAM aswell, fixes #7870

@gasche
Copy link
Member

gasche commented Apr 17, 2020

( @dra27 ping on potential re-reviewing )

Copy link
Member

@gasche gasche left a 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.)

Copy link
Member

@dra27 dra27 left a 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Member

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
Copy link
Member

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.)
Copy link
Member

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)

@dra27
Copy link
Member

dra27 commented Sep 28, 2021

Closing in favour of #10666, which has used this as a starting point, thanks!

@dra27 dra27 closed this Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants