Re: [rvm-research] Jikes Code Cache Management

David P Grove <[email protected]>
Newsgroups gmane.comp.java.jikes.rvm.devel
Message-ID <OFF5773289.9E77480D-ON85257B65.0076D2AD-85257B65.0079CE5C@us.ibm.com>


Michael Bond <[email protected]> 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

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may

_______________________________________________
Jikesrvm-researchers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.