Memprof: getting rid of caml_memprof_shutdown#9653
Conversation
|
The comment in the manual doesn't rule out supporting restarting the runtime at some point and the shutdown code is routinely tested ( |
|
Essentially, this is dead code that cannot be tested. Given that it is particularly easy to forget to re-initialize one of these global variables, the value of this piece of code is nearly zero (if, in the future, we need it, then we'd better check that we did not forget anything!). |
|
My understanding is that the author of the "unloadable runtime" proposal wanted to eventually have a restartable runtime, but the first iteration does not try to support it. (I had forgotten about the details when I made this comment earlier.) There is a This being said, this is your code, and we don't know how many users of |
|
Answering to myself: not having a memprof-specific function is in fact fine for mere unloadability: given that all memprof resources are allocated through With this point understood, I think that the PR is okay. |
|
And BTW, I am not sure but: do you agree that this PR does not deserve a Changes entry? |
|
I'm fine with not having a Changes entry. I suppose we would also cherry-pick in 4.11? |
|
Properly speaking, this is not a bugfix. So there is no need backporting. |
|
I would backport if this function was new in 4.11 (to ensure that no released version has the feature, instead of just one), but in fact I suspect we already had it in the not-user-exposed runtime part in 4.10, so I agree that there is not much point to backport. |
This function is not needed since there is no requirement that the OCaml runtime be able to restart once shut down.
d243d40 to
bee3679
Compare
|
Conflict fixed. Ready to merge. |
|
Could we merge this, please? |
|
Merged. (Don't you have the access rights to merge yourself?) |
This function is not needed since there is no requirement that the OCaml runtime be able to restart once shut down.
Indeed, in
startup_aux.c, there is the following code, which witnesses the fact that the shutdown functions are not meant to allow the runtime to be restarted:The
caml_memprof_shutdownfunction was initially introduced following a comment by @gasche stating the contrary (#8920 (comment)).