Skip to content

Provide more debugging information to Js_of_ocaml#455

Merged
damiendoligez merged 3 commits intoocaml:trunkfrom
vouillon:debug
Feb 10, 2016
Merged

Provide more debugging information to Js_of_ocaml#455
damiendoligez merged 3 commits intoocaml:trunkfrom
vouillon:debug

Conversation

@vouillon
Copy link
Copy Markdown
Member

@vouillon vouillon commented Feb 2, 2016

Js_of_ocaml uses the environment associated to debugging events to get the original variable names, which is helpful for debugging.

As there is no event at toplevel in structures, we often don't have the name of module components.

This pull request adds a pseudo event (ignored by the OCaml debugger) at the very end of each structure to provide this information.

@lpw25
Copy link
Copy Markdown
Contributor

lpw25 commented Feb 2, 2016

These psuedo events are useful for other things as well. I used a very similar (possibly identical) construct to improve backtraces in my work on array datatypes:

lpw25@ec6ce1c

I think it would also help to improve backtraces with flambda for some primitives.

This debugging event provides information regarding the structure items.
It is ignored by the OCaml debugger but is used by Js_of_ocaml to
preserve variable names for debugging purpose.
damiendoligez added a commit that referenced this pull request Feb 10, 2016
Provide more debugging information to Js_of_ocaml
@damiendoligez damiendoligez merged commit e5a1b8b into ocaml:trunk Feb 10, 2016
lukemaurer added a commit to lukemaurer/ocaml that referenced this pull request May 17, 2021
…#455)

The extra declaration was probably an error in merging or rebasing
at some point.
EduardoRFS pushed a commit to esy-ocaml/ocaml that referenced this pull request May 17, 2021
EduardoRFS pushed a commit to esy-ocaml/ocaml that referenced this pull request May 17, 2021
This commit introduce an atfork hook in the runtime, as a follow up to the issue encountered in MPR ocaml#455 and MPR ocaml#471.

To handle all the specific fork scenarios allowed in Multicore, a hook is required in order to let specific "alterations"
to the runtime do their job: by default, on a single domain program, only the domain lock needs to be reset.
When systhreads are in use, more cleaning up duty is required.

As a result, the usage of pthreads_atfork is also removed, opting to rely in both case on manually calling the
runtime hook when required.
sadiqj pushed a commit to sadiqj/ocaml that referenced this pull request Jan 10, 2022
This commit introduce an atfork hook in the runtime, as a follow up to the issue encountered in MPR ocaml#455 and MPR ocaml#471.

To handle all the specific fork scenarios allowed in Multicore, a hook is required in order to let specific "alterations"
to the runtime do their job: by default, on a single domain program, only the domain lock needs to be reset.
When systhreads are in use, more cleaning up duty is required.

As a result, the usage of pthreads_atfork is also removed, opting to rely in both case on manually calling the
runtime hook when required.
stedolan pushed a commit to stedolan/ocaml that referenced this pull request Sep 21, 2022
* Added documentation about the inliner

* Code review
xavierleroy pushed a commit to xavierleroy/ocaml that referenced this pull request Oct 10, 2023
This commit introduce an atfork hook in the runtime, as a follow up to the issue encountered in MPR ocaml#455 and MPR ocaml#471.

As a result, the usage of pthreads_atfork is also removed, opting to rely in both case on manually calling the runtime hook when required.  This way, fork() calls from C code no longer reset the OCaml thread machinery.  This should help with issues such as ocaml#12636.

(cherry picked from commit c6d00ee)
(and adapted to 4.14)

Co-authored-by: xavier.leroy@college-de-france.fr
xavierleroy pushed a commit to xavierleroy/ocaml that referenced this pull request Oct 26, 2023
This commit introduce an atfork hook in the runtime, as a follow up to the issue encountered in MPR ocaml#455 and MPR ocaml#471.

As a result, the usage of pthreads_atfork is also removed, opting to rely in both case on manually calling the runtime hook when required.  This way, fork() calls from C code no longer reset the OCaml thread machinery.  This should help with issues such as ocaml#12636.

(cherry picked from commit c6d00ee)
(and adapted to 4.14)

Co-authored-by: xavier.leroy@college-de-france.fr
EmileTrotignon pushed a commit to EmileTrotignon/ocaml that referenced this pull request Jan 12, 2024
* Some design of Acad page implemented

* Some changes
EmileTrotignon pushed a commit to EmileTrotignon/ocaml that referenced this pull request Jan 12, 2024
Co-authored-by: tmattio <tmattio@users.noreply.github.com>
ejgallego pushed a commit to ejgallego/ocaml that referenced this pull request Nov 5, 2025
This commit introduce an atfork hook in the runtime, as a follow up to the issue encountered in MPR ocaml#455 and MPR ocaml#471.

As a result, the usage of pthreads_atfork is also removed, opting to rely in both case on manually calling the runtime hook when required.  This way, fork() calls from C code no longer reset the OCaml thread machinery.  This should help with issues such as ocaml#12636.

(cherry picked from commit c6d00ee)
(and adapted to 4.14)

Co-authored-by: xavier.leroy@college-de-france.fr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants