Earlier documentation comments suggested that major GC hooks can do things with the GC-managed heap. This is problematic and not used in practice.
This commit changes the documentation comments to make it clear that major GC hools are not allowed to interact with the GC-managed heap.
The workaround used for ignoring samples in the minor heap in native
mode now makes allocation very slow (or non-terminating) when the
sampling rate is not small enough. This will be fixed when sampling in
the minor heap in native mode will be implemented.
The mechanism complicates the runtime system and is not very general
(only a few system functions are instrumented). There are other ways
to intercept system calls that are more general and require no
modification to the source code of the runtime system.