Re: [rvm-research] Barriers interacting with ForwardingWord in MMTk

Robin Garner <[email protected]>
Newsgroups gmane.comp.java.jikes.rvm.devel
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Claire,

The compiler inserts barriers in the compiled code if the MMTk
collector requests it.  This communication happens in the
PlanConstraints class of an MMTk plan, with methods such as
needsObjectReferenceWriteBarrier().

If one or more of these methods return true, then the compiler will
insert calls to the appropriate methods of the MutatorContext.

The SemiSpace plan has no need for barriers.  It does, however, use
the ForwardingWord class to keep track of objects during its copying
pass over the heap.  You can verify this in two ways: check the
SSConstraints class - none of its 'needsXXXBarrier()' methods return
true.  Second, check the SSMutator class: if you look up the
inheritance tree all the barrier methods (eg addressWrite(...)) assert
false.

One place you will see barriers used is in the generational
collectors.  I don't believe we have any collectors that copy objects
in a barrier, or any concurrent copying collectors that might need to
look at the copied state of objects.  This being the case it would be
surprising if any of the existing barriers in MMTk actually called
methods of ForwardingWord.

Therefore, what you are seeing is actually the expected behaviour.

A better way to find out what calls a given method in ForwardingWord
is to use eclipse (or your IDE of choice).  In Eclipse, typing
Control-Shift-G with your cursor on a method definition will tell you
where that method is mentioned.  ForwardingWord.attemptToForward for
example is called from CopySpace and ImmixSpace.

Regards,
Robin

On 11/02/14 11:51, Claire Murphy wrote:
> Hello,
> 
> My name is Claire, and I'm part of a team of students from Harvey
> Mudd College.
> 
> We have been working with Jikes RVM, specifically MMTk, and
> recently I have been trying to understand how Barriers work in
> relation to the ForwardingWord class, and what we need to do to
> implement forwarding headers, triggered by barriers, in a custom
> garbage collector. The ObjectReference functions that are called in
> the Barriers seem to be implemented at runtime by vmmagic, and I do
> not know where that behavior is defined.
> 
> I have been running Dacapo benchmarks and using the semispace
> collector, which I believe should call the ForwardingWord functions
> if that is what the Barrier implementations do, though my
> "VM.assertions._assert"s in the ForwardingWord functions have had
> no effect on the benchmarks that I noticed. I am clearly barking up
> the wrong tree, so any pointers would be appreciated.
> 
> Thanks!
> 
> -Claire
> 
> 
> ------------------------------------------------------------------------------
>
> 
Android apps run on BlackBerry 10
> Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now
> with support for Jelly Bean, Bluetooth, Mapview and more. Get your
> Android app in front of a whole new audience.  Start now. 
> http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
>
> 
> 
> 
> _______________________________________________ 
> Jikesrvm-researchers mailing list 
> [email protected] 
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJS+asKAAoJEHm9xBvoMhvamUwH/39Z+KAJT3ObrNEOefAhSWIC
aI6gPTdR5pRjvJuH2JPFN2G9p70NcKufQJGALNaryx+qBfPY44YvEcy9B8B61q5b
D2LUxg3ow6xzsEYCu2o5je7tplysBHjCyVSHxJtH7fKnSJccWxH1wUbRcX84/6+C
PzvgOyrur9U4mCylBwVtJqsj7pl0JeTuXr6rG3xG0cOqq82suDpCAEWcmYjzW4WM
Elske0av2p4sJOxF1TV319H3azi3OgjvDM+lJoPkh8l/lE+SK4ymPkbqBL2tNRch
ikWEFZrYAnTC8iBqgy+lgVLYxUCvWXkR7g7M50wxZuwBEykSwyBdr3XgJHQI0EQ=
=BGxx
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
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.