On Saturday, 3 December 2016 at 10:29:02 UTC, Dibyendu Majumdar
wrote:
That said, let's look at the API:
omrobjectptr_t OMR_GC_Allocate(OMR_VMThread * omrVMThread,
uintptr_t allocationCategory, uintptr_t size, uintptr_t
allocateFlags);
omrobjectptr_t OMR_GC_AllocateNoGC(OMR_VMThread * omrVMThread,
uintptr_t allocationCategory, uintptr_t size, uintptr_t
allocateFlagss);
omr_error_t OMR_GC_SystemCollect(OMR_VMThread* omrVMThread,
uint32_t gcCode);
First parameter is a pointer to an OMR thread. I'd have to
rewrite core.thread to use OMR's thread system, or maybe I
could fake OMR threads with enough effort. That's another
barrier.
I think all GCs need to interact with threads so there has to
be some linkage between the thread sub-system and GC.
I saw a slide deck or some docs that explained the requirements
to use OMR GC. Unfortunately I did not save a link and cannot
locate this now. I will post a link if I find it again.
It said that the OMR expects objects to be allocated on 8-byte
aligned memory and it requires one GC byte - which is assumed
to be at the start of the allocated object but can be changed
if required.
Here is the video that describes how to use the GC. Says initial
integration should take <100 lines of code! GC details are about
30 minutes into the talk.
https://developer.ibm.com/open/videos/eclipse-omr-tech-talk/