This repository was archived by the owner on Jun 21, 2024. It is now read-only.
First pass to improve the diff to startup code#694
Merged
ctk21 merged 3 commits intoocaml-multicore:5.00from Oct 19, 2021
Merged
First pass to improve the diff to startup code#694ctk21 merged 3 commits intoocaml-multicore:5.00from
ctk21 merged 3 commits intoocaml-multicore:5.00from
Conversation
Collaborator
Author
|
(also introduced in this PR, dubious decision on the coding style of domain.c to make check-typo happy, bikeshedding is allowed.) |
ctk21
reviewed
Oct 19, 2021
Collaborator
ctk21
left a comment
There was a problem hiding this comment.
I think this PR does what it intends and makes us a bit closer to all the options that ocaml/ocaml supports on startup.
| domain_state->backtrace_last_exn = Val_unit; | ||
| caml_register_generational_global_root(&domain_state->backtrace_last_exn); | ||
|
|
||
| if (caml_params->backtrace_enabled) { |
Collaborator
There was a problem hiding this comment.
This change is a good spot. In the old code we were only initializing the backtraces on the startup domain.
463525e to
8d2661e
Compare
Collaborator
|
I rebased this as there were conflicts on |
sadiqj
pushed a commit
to sadiqj/ocaml
that referenced
this pull request
Jan 10, 2022
…rove_diff_startup_code First pass to improve the diff to startup code
ctk21
added a commit
to ctk21/ocaml
that referenced
this pull request
Jan 11, 2022
…rove_diff_startup_code First pass to improve the diff to startup code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR attempts to improve the diff in the startup code on trunk and Multicore.
This actually does not quite improve the diff heavily, but it make sure to be more consistent with the changes introduced by Multicore when it comes to
runparamsand command line arguments (given toocamlrun).I also made sure to check that we did not drop any newer options from the list.
Side notes:
caml_params) that is read-only outside ofstartup_aux. This means that after startup, these parameters cannot be tempered with. In the Multicore setting, no other runtime code ever modify these fields after startup. This implies some amount of code motion versus trunk.runparamsdisabled:a(setting the allocation policy, iebest_fit,first_fitornext_fit.).H(allocating pages using mmap/mmunmap)w(the initial size of the major heap window)The last commit included in this PR also fixes what seems like an omission to me: if backtraced are enabled, it seems like we do not currently enable it for any other domains than the main one.
I moved the backtrace enabling behavior to
create_domain, relying oncaml_paramsto check if it needs to be enabled.