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
Closed

GC callbacks #6675

vicuna opened this issue Nov 25, 2014 · 1 comment
Milestone

Comments

@vicuna
Copy link

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
Copy link
Author

vicuna commented Feb 10, 2015

Comment author: @damiendoligez

Implemented in 4.02 branch (commit 15835).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant