Skip to content

[Relocatable] Follow-up 11: Add -set-runtime-default to the compilers#186

Open
dra27 wants to merge 7 commits intorelocatable-testingfrom
set-runtime-default
Open

[Relocatable] Follow-up 11: Add -set-runtime-default to the compilers#186
dra27 wants to merge 7 commits intorelocatable-testingfrom
set-runtime-default

Conversation

@dra27
Copy link
Copy Markdown
Owner

@dra27 dra27 commented Feb 2, 2025

No description provided.

@dra27 dra27 added the relocatable PRs related to the Relocatable Compiler project label Feb 2, 2025
@dra27 dra27 force-pushed the set-runtime-default branch 8 times, most recently from b1385df to f24a3f4 Compare February 5, 2025 11:16
@dra27 dra27 force-pushed the installation-tests branch from cf7bb12 to a300876 Compare February 5, 2025 17:50
@dra27 dra27 force-pushed the set-runtime-default branch from f24a3f4 to 27ddeab Compare February 5, 2025 17:51
@dra27 dra27 force-pushed the installation-tests branch from a300876 to b840f43 Compare February 9, 2025 16:06
@dra27 dra27 force-pushed the set-runtime-default branch from 27ddeab to 29ffd73 Compare February 9, 2025 16:07
@dra27 dra27 force-pushed the installation-tests branch from b840f43 to 12a6760 Compare February 9, 2025 17:42
@dra27 dra27 force-pushed the set-runtime-default branch 2 times, most recently from d2b47e7 to 2cca80a Compare February 10, 2025 09:47
@dra27 dra27 force-pushed the installation-tests branch from 12a6760 to 9312be2 Compare February 11, 2025 16:54
@dra27 dra27 force-pushed the set-runtime-default branch from 2cca80a to 8df52ed Compare February 11, 2025 16:54
@dra27 dra27 force-pushed the installation-tests branch 12 times, most recently from 94e431b to 85ea65d Compare February 14, 2025 13:10
@dra27 dra27 force-pushed the set-runtime-default branch from de87814 to 7fe9197 Compare March 25, 2025 21:20
@dra27 dra27 force-pushed the installation-tests branch from 1ff8aae to 3adcf49 Compare March 26, 2025 15:30
@dra27 dra27 force-pushed the set-runtime-default branch from 7fe9197 to 3ba7282 Compare March 26, 2025 15:32
@dra27 dra27 force-pushed the installation-tests branch 4 times, most recently from 08e6e34 to ef7bedc Compare April 4, 2025 21:44
@dra27 dra27 force-pushed the installation-tests branch from ada9ed4 to 27ee9a7 Compare April 5, 2025 15:36
@dra27 dra27 force-pushed the set-runtime-default branch from 3ba7282 to 3a26b71 Compare April 5, 2025 15:38
@dra27 dra27 force-pushed the installation-tests branch from 27ee9a7 to c602311 Compare April 5, 2025 16:43
@dra27 dra27 force-pushed the set-runtime-default branch from 3a26b71 to f6477de Compare April 5, 2025 17:02
@dra27 dra27 force-pushed the installation-tests branch from c602311 to ec86560 Compare April 5, 2025 21:12
@dra27 dra27 force-pushed the set-runtime-default branch from f6477de to dd10014 Compare April 5, 2025 22:16
@dra27 dra27 force-pushed the installation-tests branch 5 times, most recently from 2488f9b to 299ae51 Compare April 8, 2025 14:55
@dra27 dra27 force-pushed the set-runtime-default branch from dd10014 to 59ef79e Compare April 8, 2025 19:43
@dra27 dra27 force-pushed the installation-tests branch from 299ae51 to 2bf8a73 Compare April 21, 2025 09:06
MisterDA and others added 7 commits December 12, 2025 10:53
They are only used by the bytecode runtime and can be made static to
startup_byt.
The setting for R was previous omitted in Sys.runtime_parameters, since
it was only processed directly by the Hashtbl module and not stored in
the runtime. Option R is now processed in caml_parase_ocamlrunparam and
stored to be accessed and updated via new primitives for the Hashtbl
module.

Co-authored-by: David Allsopp <david.allsopp@metastack.com>
Consistency - options displayed in alphabetical order with the uppercase
letter appearing before the lowercase letter
When linking an executable, allows to set default to OCAMLRUNPARAM
values. This new OCAMLRUNPARAM string is accessible using the
"caml_executable_ocamlrunparam" symbol or is embedded in a bytecode
section.

Co-authored-by: Antonin Décimo <antonin@tarides.com>
The test programs in the run after the prefix has been renamed are
compiled with `-set-runtime-default R`, and the test program verifies
that Hashtbl.is_randomized returns the expected value.
In bytecode startup, defer allocating memory until after the bytecode
image has been loaded as far as possible.
The runtime's pooling mode has a slight Catch-22 problem for ocamlrun
when enabled using -set-runtime-default. Opening the bytecode file and
reading the ORUN section requires the memory subsystem.

In this revised version, caml_main in bytecode is particularly careful
to track exactly what will have been allocated prior to reading the ORUN
section and if ORUN requires the system to start pooling mode, the
runtime now takes temporary malloc'd copies of everything which has been
made so far so that it can be safely copied with a caml_stat_alloc
_after_ pooling mode has been enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: Full matrix Full CI test matrix relocatable PRs related to the Relocatable Compiler project run-crosscompiler-tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants