Michael Bond <mikebond@cse.ohio-state.edu> wrote on 05/08/2013 04:53:32 PM:

>
> By default, USE_CODE_SPACE is true, and (machine) code is allocated into
> special code spaces that are non-moving spaces. However, if
> USE_CODE_SPACE is false, then it looks like code is allocated into the
> default space, which could be a moving space. Assuming that's right,
> then I'm not entirely sure how pointers to code are updated. At least
> some calls are indirect: they go through TIBs (virtual dispatch) or the
> JTOC (static methods), so just updating these tables is sufficient. Are
> all calls indirect, or are there direct calls in the code that need to
> be updated by updating pointers in the code itself? I suspect that all
> calls are performed indirectly rather than having absolute hard-coded
> callee addresses in the code.
>

Independent of USE_CODE_SPACE, all calls in Jikes RVM are indirect. (even static calls indirect through the JTOC).  On the plus side, this makes adaptive recompilation very simple (install a new version of the code simply by updating a TIB/JTOC pointer).  On the minus side, we are likely losing at least some performance by indirecting on every call.

I'd started working on implementing support for direct (pc-relative) calls back at OOPSLA'07 in Montreal, but never completed it.  I still have a patch set kicking around if anyone wants to take another run at it.  I figured it was going to take me a month +/- of solid work to make all the needed changes (pc relative calls on both platforms, still supporting GC of code, adaptive recompilation, etc).

--dave