Isolating the GC code from the jvm to run on external accelerator

Ofir Gordon ofirg6 at gmail.com
Mon May 4 12:37:12 UTC 2020


Hello,

I'm currently trying to test the performance of the openjdk 14 hotspot GCs
on an external hardware accelerator. It is external in the sense that my
goal is, whenever the JVM (that runs on the main CPU) activates a
collection, it will call the external hardware which will perform the
collection instead.

In order to do so I'm trying to create a program that running only the GC,
using the GC's source code, but there are so many dependencies between
different part of this code that makes it really difficult.

I'm currently focusing only on the MarkSweep collector for the Full GC
scenario, and in particular on the marking part only, since it seems the
simplest.
The actual function I want to run externally is the
* MarkSweep::follow_stack* function and all the function that are
being called from it. I'm guessing it finally suppose to get to a
"mark_an_push" operation and then continue, but I can't find the part where
the pointers from a specific object are located, marked and push to the
stack.

So my questions are:
1. Is there a way to isolate the MarkSweep (or other) GC code only and use
it in an external program? maybe there is some documentation that specifies
what are the relevant moduls for this or a side prject that includes only
the GC code?

2. Can someone clarify the calls path from the MarkSweep::follow_stack
method (I can see that it makes a call to MarkSweep::follow_object and then
calls to oop_iterate in a template method, but what exactly happens in this
oop_iterate, and how it finally arrives to a "mark_and_push" operation?)

If there any other advice how to use run the gc on an external hardware
(than the one running the jvm) or if someone had expirience with such a
task, I'll be glad to hear about it.

Thanks a lot,
Ofir



More information about the hotspot-gc-dev mailing list