Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GC callbacks #6675

Closed
vicuna opened this Issue Nov 25, 2014 · 1 comment

Comments

Projects
None yet
1 participant
@vicuna
Copy link
Collaborator

vicuna commented Nov 25, 2014

Original bug ID: 6675
Reporter: roshanjames
Status: closed (set by @damiendoligez on 2015-02-10T15:27:10Z)
Resolution: fixed
Priority: normal
Severity: minor
Target version: 4.02.2+dev / +rc1
Fixed in version: 4.02.2+dev / +rc1
Category: runtime system and C interface
Monitored by: @gasche @diml @ygrek

Bug description

When writing performance sensitive programs, one spends a lot of time worrying about the time spent in the GC. However there are very few tools available to directly measure the time spent in the GC.

Can we have the OCaml runtime fire a C callback when:

  • about to start a minor GC
  • about to start a major slice in a minor GC
  • end of major slice in a minor GC
  • end of a GC

It would be nice to have an interface where the user can supply C functions pointers for these situations. I imagine there will be constraints on the C callbacks -- for example, the callbacks must not modify or allocate OCaml memory.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Feb 10, 2015

Comment author: @damiendoligez

Implemented in 4.02 branch (commit 15835).

@vicuna vicuna closed this Feb 10, 2015

@vicuna vicuna added the stdlib label Mar 14, 2019

@vicuna vicuna added this to the 4.02.2 milestone Mar 14, 2019

@vicuna vicuna added the bug label Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.