Skip to content

Restore caml_runtime_parameters implementation in gc_ctrl.c#12963

Merged
dra27 merged 2 commits intoocaml:trunkfrom
tmcgilchrist:caml_runtime_parameters_2
Feb 29, 2024
Merged

Restore caml_runtime_parameters implementation in gc_ctrl.c#12963
dra27 merged 2 commits intoocaml:trunkfrom
tmcgilchrist:caml_runtime_parameters_2

Conversation

@tmcgilchrist
Copy link
Contributor

@tmcgilchrist tmcgilchrist commented Feb 7, 2024

Restore caml_runtime_parameters implementation in gc_ctrl.c. This primitive allows programs to query the runtime parameters supplied to an OCaml program.

caml_runtime_parameters is present in 4.14 but was left as a TODO during the multicore merge and has been missing since 5.0. This change restores the implementation to match the current documented options for OCAMLRUNPARAM.

Additionally removes some extern symbols that were no longer used in gc_ctrl.c.

@tmcgilchrist tmcgilchrist force-pushed the caml_runtime_parameters_2 branch 2 times, most recently from 9eddeb7 to 3be3e0e Compare February 7, 2024 03:40
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 looking at this - in passing in other headers, there are still bits of 4.x that need gradually tidying up, so it's nice to keep stepping towards a tidy runtime again 🙂

I think the omission of c from the result is probably a (very minor) bug in 4.x. Is there something I'm missing about t - it's just caml_params->trace_level now, isn't it?

@tmcgilchrist tmcgilchrist force-pushed the caml_runtime_parameters_2 branch 2 times, most recently from 2faccad to 623e7b8 Compare February 16, 2024 02:39
@tmcgilchrist
Copy link
Contributor Author

@dra27 Thank you for the comments, I've included all of them in 06b027f,

@tmcgilchrist tmcgilchrist force-pushed the caml_runtime_parameters_2 branch 2 times, most recently from acbe3d0 to 20f27d1 Compare February 28, 2024 12:23
This primitive allows programs to query the runtime parameters
supplied to an OCaml program.
@tmcgilchrist tmcgilchrist force-pushed the caml_runtime_parameters_2 branch from 20f27d1 to 6337149 Compare February 29, 2024 08:42
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.

LGTM, thank you!

@dra27 dra27 merged commit 5182ae4 into ocaml:trunk Feb 29, 2024
@tmcgilchrist tmcgilchrist deleted the caml_runtime_parameters_2 branch February 29, 2024 15:18
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.

2 participants