[rvm-research] Making Stop-the-world on-the-fly

View: New views
6 Messages — Rating Filter:   Alert me  

[rvm-research] Making Stop-the-world on-the-fly

by lalli_maven :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I am trying to convert the stoptheworld collector to an on the fly one, using the sliding views concept. I'm finding it very hard to even understand the jikes RVM code. The papers I'm referring to have already implemented the code.
Please help me understand what changes I have to do.
I am completely confused.

--
N. Lalit Vidyadhar Sharma
lalit.nv@...

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

Re: [rvm-research] Making Stop-the-world on-the-fly

by Michael Bond :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Lalit,

First, please do edit in Eclipse or some other IDE
(http://jikesrvm.org/Editing+JikesRVM+in+an+IDE) -- it'll really help with
understanding the code.  It sounds like you'll mainly be working in MMTk
(the Memory Management Toolkit), i.e., the GC component of Jikes RVM, and
it's highly object oriented, so you really need Eclipse.

Second, fortunately MMTk has nice documentation:

- MMTK user guide: http://jikesrvm.org/MMTk

- tutorial for getting started building new collectors:
http://jikesrvm.org/MMTk+Tutorial

Beyond that, it does take a while to be able to understand MMTk or other
parts of Jikes.  Copious browsing of revelent code is perhaps the best
approach :)

Cheers,
Mike


On Wed, 14 Oct 2009, Lalit Sharma wrote:

> Hi,
> I am trying to convert the stoptheworld collector to an on the fly one, using the sliding views concept.
> I'm finding it very hard to even understand the jikes RVM code. The papers I'm referring to have already
> implemented the code.
> Please help me understand what changes I have to do.
> I am completely confused.
>
> --
> N. Lalit Vidyadhar Sharma
> lalit.nv@...
>
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

Re: [rvm-research] Making Stop-the-world on-the-fly

by Eliot Moss :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

May I add: Converting to on-the-fly collection, and then debugging
it, will be *really* hard. Not only are the algorithms inherently
more subtle (and you're climbing the learning curve with Jikes RVM),
but concurrent algorithms are extremely difficult to debug -- and
at this low level of the system, the debugging tools are fairly
primitive. I would strongly suggest something less ambitious as
your first project in Jikes RVM ...

Best wishes -- Eliot Moss

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

Parent Message unknown Re: [rvm-research] Making Stop-the-world on-the-fly

by lalli_maven :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
Thanks Mike for such a quick reply. I'm using eclipse, I've followed the tutorials to convert the nogc to marksweep and so on. But, i'm not able to understand where are the methods which stop a perticular thread.
I just wanted to do some benchmarks.
------------------------------

Message: 4
Date: Wed, 14 Oct 2009 23:03:51 +0530
From: Lalit Sharma <lalit.nv@...>
Subject: [rvm-research] Making Stop-the-world on-the-fly
To: jikesrvm-researchers@...
Message-ID:
       <5f715b250910141033u378b6b92k4490698f5cba9c73@...>
Content-Type: text/plain; charset="iso-8859-1"

Hi,
I am trying to convert the stoptheworld collector to an on the fly one,
using the sliding views concept. I'm finding it very hard to even understand
the jikes RVM code. The papers I'm referring to have already implemented the
code.
Please help me understand what changes I have to do.
I am completely confused.

--
N. Lalit Vidyadhar Sharma
lalit.nv@...
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 5
Date: Wed, 14 Oct 2009 13:43:13 -0500 (CDT)
From: Michael Bond <mikebond@...>
Subject: Re: [rvm-research] Making Stop-the-world on-the-fly
To: "General discussion of Jikes RVM design, implementation, issues,
       and plans" <jikesrvm-researchers@...>
Message-ID: <alpine.DEB.2.00.0910141330160.4094@...>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

Hi Lalit,

First, please do edit in Eclipse or some other IDE
(http://jikesrvm.org/Editing+JikesRVM+in+an+IDE) -- it'll really help with
understanding the code.  It sounds like you'll mainly be working in MMTk
(the Memory Management Toolkit), i.e., the GC component of Jikes RVM, and
it's highly object oriented, so you really need Eclipse.

Second, fortunately MMTk has nice documentation:

- MMTK user guide: http://jikesrvm.org/MMTk

- tutorial for getting started building new collectors:
http://jikesrvm.org/MMTk+Tutorial

Beyond that, it does take a while to be able to understand MMTk or other
parts of Jikes.  Copious browsing of revelent code is perhaps the best
approach :)

Cheers,
Mike


On Wed, 14 Oct 2009, Lalit Sharma wrote:

> Hi,
> I am trying to convert the stoptheworld collector to an on the fly one, using the sliding views concept.
> I'm finding it very hard to even understand the jikes RVM code. The papers I'm referring to have already
> implemented the code.
> Please help me understand what changes I have to do.
> I am completely confused.
>
> --
> N. Lalit Vidyadhar Sharma
> lalit.nv@...
>
>



------------------------------

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference

------------------------------

_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers


End of Jikesrvm-researchers Digest, Vol 41, Issue 3
***************************************************



--
N. Lalit Vidyadhar Sharma
aka: 'Lalli'
lalit.shorl.in
lalit.nv@...

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

Re: [rvm-research] Making Stop-the-world on-the-fly

by Filip Pizlo-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think that for what you're doing, you'll have to do a lot of work in the MMTk<->RVM glue as well as possibly the RVM itself.  That's my experience with on-the-fly collection anyway.  The thread stop code is in the RVM side of the MMTk<->RVM glue.  Here's a rough picture of how the system works:

RVM <---> RVM side glue to MMTk <---> MMTk side glue to RVM <---> MMTk

The RVM code is in rvm/src.  The RVM side of the glue is in rvm/src/org/jikesrvm/mm/mminterface.  The MMTk side glue to RVM is in MMTk/ext/vm/jikesrvm/org/jikesrvm/mm/mmtk.  MMTk itself is in MMTk/src.

The functionality is split roughly as follows:

RVM: VM functionality not including memory management, such as compilation, class loading, locking, native calls, threads, etc.

MMTk: memory management implementation that abstracts over anything VM-specific; i.e. it doesn't even really have a notion of "thread" only that there are "mutator contexts" that may or may not have some state attached to them, and that state may or may not be in the form of a stack.  MMTk doesn't know how to start/stop threads, and really doesn't even know that there is even a need to do so, other than having some vague distinctions between a StopTheWorld collector and a concurrent one.

RVM side glue to MMTk: this is the code that decides to invoke a collection, stops the world, and transfers control to MMTk.  I think it also contains some object and stack scanning logic.

MMTk side glue to RVM: this code gives MMTk access to the VM.  for example, if MMTk wants to do some locking, the MMTk side glue to RVM will give it a lock that is implemented using RVM's functionality.  There are other things in here, like accessing the RVM object models, etc.

This, if you want to understand how threads are started and stopped, you want to look at the RVM side of the glue, in rvm/src/org/jikesrvm/mm/mminterface.  That will have calls to RVM-internal code such as rvm/src/org/jikesrvm/scheduler/RVMThread.java - where the actual thread control logic resides.  On the RVM side we've already implemented a lot of what is needed to have a sliding views collector - in particular the RVMThread API already has a notion of a soft handshake that can be configured (by hacking the code ;-)) to do pretty much anything you want, and that may include stack scanning, GC context flushing, or even just a no-op to get an acknowledgement of GC phase change.

I would just like to add that I concur with Eliot - you're jumping into the RVM with the intent of solving a problem that people with extreme familiarity with the RVM would have trouble doing.  I've implemented concurrent, on-the-fly collectors, and have done a lot of RVM hacking, but I'd still categorize what you're doing as difficult for me.  That said, ambition is a good thing. :-)

So, good luck,
-Filip




On Oct 14, 2009, at 2:58 PM, Lalit Sharma wrote:

Hi,
Thanks Mike for such a quick reply. I'm using eclipse, I've followed the tutorials to convert the nogc to marksweep and so on. But, i'm not able to understand where are the methods which stop a perticular thread.
I just wanted to do some benchmarks.
------------------------------

Message: 4
Date: Wed, 14 Oct 2009 23:03:51 +0530
From: Lalit Sharma <lalit.nv@...>
Subject: [rvm-research] Making Stop-the-world on-the-fly
To: jikesrvm-researchers@...
Message-ID:
       <5f715b250910141033u378b6b92k4490698f5cba9c73@...>
Content-Type: text/plain; charset="iso-8859-1"

Hi,
I am trying to convert the stoptheworld collector to an on the fly one,
using the sliding views concept. I'm finding it very hard to even understand
the jikes RVM code. The papers I'm referring to have already implemented the
code.
Please help me understand what changes I have to do.
I am completely confused.

--
N. Lalit Vidyadhar Sharma
lalit.nv@...
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 5
Date: Wed, 14 Oct 2009 13:43:13 -0500 (CDT)
From: Michael Bond <mikebond@...>
Subject: Re: [rvm-research] Making Stop-the-world on-the-fly
To: "General discussion of Jikes RVM design, implementation, issues,
       and plans" <jikesrvm-researchers@...>
Message-ID: <alpine.DEB.2.00.0910141330160.4094@...>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

Hi Lalit,

First, please do edit in Eclipse or some other IDE
(http://jikesrvm.org/Editing+JikesRVM+in+an+IDE) -- it'll really help with
understanding the code.  It sounds like you'll mainly be working in MMTk
(the Memory Management Toolkit), i.e., the GC component of Jikes RVM, and
it's highly object oriented, so you really need Eclipse.

Second, fortunately MMTk has nice documentation:

- MMTK user guide: http://jikesrvm.org/MMTk

- tutorial for getting started building new collectors:
http://jikesrvm.org/MMTk+Tutorial

Beyond that, it does take a while to be able to understand MMTk or other
parts of Jikes.  Copious browsing of revelent code is perhaps the best
approach :)

Cheers,
Mike


On Wed, 14 Oct 2009, Lalit Sharma wrote:

> Hi,
> I am trying to convert the stoptheworld collector to an on the fly one, using the sliding views concept.
> I'm finding it very hard to even understand the jikes RVM code. The papers I'm referring to have already
> implemented the code.
> Please help me understand what changes I have to do.
> I am completely confused.
>
> --
> N. Lalit Vidyadhar Sharma
> lalit.nv@...
>
>



------------------------------

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference

------------------------------

_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers


End of Jikesrvm-researchers Digest, Vol 41, Issue 3
***************************************************



--
N. Lalit Vidyadhar Sharma
aka: 'Lalli'
lalit.shorl.in
lalit.nv@...
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

Re: [rvm-research] Making Stop-the-world on-the-fly

by Suriya Subramanian :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Most of Fil's email should be committed into SVN and/or be added to the
wiki.

On Wed, Oct 14, 2009 at 03:10:47PM -0400, Filip Pizlo wrote:

> From: Filip Pizlo <pizlo@...>
> To: "General discussion of Jikes RVM design, implementation, issues,
> and plans" <jikesrvm-researchers@...>
> Date: Wed, 14 Oct 2009 15:10:47 -0400
> Subject: Re: [rvm-research] Making Stop-the-world on-the-fly
> Reply-To: "General discussion of Jikes RVM design, implementation, issues,
> and plans" <jikesrvm-researchers@...>
>
> I think that for what you're doing, you'll have to do a lot of work in  
> the MMTk<->RVM glue as well as possibly the RVM itself.  That's my  
> experience with on-the-fly collection anyway.  The thread stop code is  
> in the RVM side of the MMTk<->RVM glue.  Here's a rough picture of how  
> the system works:
>
> RVM <---> RVM side glue to MMTk <---> MMTk side glue to RVM <---> MMTk
>
> The RVM code is in rvm/src.  The RVM side of the glue is in rvm/src/
> org/jikesrvm/mm/mminterface.  The MMTk side glue to RVM is in MMTk/ext/
> vm/jikesrvm/org/jikesrvm/mm/mmtk.  MMTk itself is in MMTk/src.
>
> The functionality is split roughly as follows:
>
> RVM: VM functionality not including memory management, such as  
> compilation, class loading, locking, native calls, threads, etc.
>
> MMTk: memory management implementation that abstracts over anything VM-
> specific; i.e. it doesn't even really have a notion of "thread" only  
> that there are "mutator contexts" that may or may not have some state  
> attached to them, and that state may or may not be in the form of a  
> stack.  MMTk doesn't know how to start/stop threads, and really  
> doesn't even know that there is even a need to do so, other than  
> having some vague distinctions between a StopTheWorld collector and a  
> concurrent one.
>
> RVM side glue to MMTk: this is the code that decides to invoke a  
> collection, stops the world, and transfers control to MMTk.  I think  
> it also contains some object and stack scanning logic.
>
> MMTk side glue to RVM: this code gives MMTk access to the VM.  for  
> example, if MMTk wants to do some locking, the MMTk side glue to RVM  
> will give it a lock that is implemented using RVM's functionality.  
> There are other things in here, like accessing the RVM object models,  
> etc.
>
> This, if you want to understand how threads are started and stopped,  
> you want to look at the RVM side of the glue, in rvm/src/org/jikesrvm/
> mm/mminterface.  That will have calls to RVM-internal code such as rvm/
> src/org/jikesrvm/scheduler/RVMThread.java - where the actual thread  
> control logic resides.  On the RVM side we've already implemented a  
> lot of what is needed to have a sliding views collector - in  
> particular the RVMThread API already has a notion of a soft handshake  
> that can be configured (by hacking the code ;-)) to do pretty much  
> anything you want, and that may include stack scanning, GC context  
> flushing, or even just a no-op to get an acknowledgement of GC phase  
> change.
>
> I would just like to add that I concur with Eliot - you're jumping  
> into the RVM with the intent of solving a problem that people with  
> extreme familiarity with the RVM would have trouble doing.  I've  
> implemented concurrent, on-the-fly collectors, and have done a lot of  
> RVM hacking, but I'd still categorize what you're doing as difficult  
> for me.  That said, ambition is a good thing. :-)
>
> So, good luck,
> -Filip
>
>
>
>
> On Oct 14, 2009, at 2:58 PM, Lalit Sharma wrote:
>
> >Hi,
> >Thanks Mike for such a quick reply. I'm using eclipse, I've followed  
> >the tutorials to convert the nogc to marksweep and so on. But, i'm  
> >not able to understand where are the methods which stop a perticular  
> >thread.
> >I just wanted to do some benchmarks.
> >------------------------------
> >
> >Message: 4
> >Date: Wed, 14 Oct 2009 23:03:51 +0530
> >From: Lalit Sharma <lalit.nv@...>
> >Subject: [rvm-research] Making Stop-the-world on-the-fly
> >To: jikesrvm-researchers@...
> >Message-ID:
> >       <5f715b250910141033u378b6b92k4490698f5cba9c73@...>
> >Content-Type: text/plain; charset="iso-8859-1"
> >
> >Hi,
> >I am trying to convert the stoptheworld collector to an on the fly  
> >one,
> >using the sliding views concept. I'm finding it very hard to even  
> >understand
> >the jikes RVM code. The papers I'm referring to have already  
> >implemented the
> >code.
> >Please help me understand what changes I have to do.
> >I am completely confused.
> >
> >--
> >N. Lalit Vidyadhar Sharma
> >lalit.nv@...
> >-------------- next part --------------
> >An HTML attachment was scrubbed...
> >
> >------------------------------
> >
> >Message: 5
> >Date: Wed, 14 Oct 2009 13:43:13 -0500 (CDT)
> >From: Michael Bond <mikebond@...>
> >Subject: Re: [rvm-research] Making Stop-the-world on-the-fly
> >To: "General discussion of Jikes RVM design, implementation, issues,
> >       and plans" <jikesrvm-researchers@...>
> >Message-ID: <alpine.DEB.2.00.0910141330160.4094@...>
> >Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
> >
> >Hi Lalit,
> >
> >First, please do edit in Eclipse or some other IDE
> >(http://jikesrvm.org/Editing+JikesRVM+in+an+IDE) -- it'll really  
> >help with
> >understanding the code.  It sounds like you'll mainly be working in  
> >MMTk
> >(the Memory Management Toolkit), i.e., the GC component of Jikes  
> >RVM, and
> >it's highly object oriented, so you really need Eclipse.
> >
> >Second, fortunately MMTk has nice documentation:
> >
> >- MMTK user guide: http://jikesrvm.org/MMTk
> >
> >- tutorial for getting started building new collectors:
> >http://jikesrvm.org/MMTk+Tutorial
> >
> >Beyond that, it does take a while to be able to understand MMTk or  
> >other
> >parts of Jikes.  Copious browsing of revelent code is perhaps the best
> >approach :)
> >
> >Cheers,
> >Mike
> >
> >
> >On Wed, 14 Oct 2009, Lalit Sharma wrote:
> >
> >> Hi,
> >> I am trying to convert the stoptheworld collector to an on the fly  
> >one, using the sliding views concept.
> >> I'm finding it very hard to even understand the jikes RVM code.  
> >The papers I'm referring to have already
> >> implemented the code.
> >> Please help me understand what changes I have to do.
> >> I am completely confused.
> >>
> >> --
> >> N. Lalit Vidyadhar Sharma
> >> lalit.nv@...
> >>
> >>
> >
> >
> >
> >------------------------------
> >
> >------------------------------------------------------------------------------
> >Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> >is the only developer event you need to attend this year. Jumpstart  
> >your
> >developing skills, take BlackBerry mobile applications to market and  
> >stay
> >ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> >http://p.sf.net/sfu/devconference
> >
> >------------------------------
> >
> >_______________________________________________
> >Jikesrvm-researchers mailing list
> >Jikesrvm-researchers@...
> >https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
> >
> >
> >End of Jikesrvm-researchers Digest, Vol 41, Issue 3
> >***************************************************
> >
> >
> >
> >--
> >N. Lalit Vidyadhar Sharma
> >aka: 'Lalli'
> >lalit.shorl.in
> >lalit.nv@...
> >------------------------------------------------------------------------------
> >Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> >is the only developer event you need to attend this year. Jumpstart  
> >your
> >developing skills, take BlackBerry mobile applications to market and  
> >stay
> >ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> >http://p.sf.net/sfu/devconference_______________________________________________
> >Jikesrvm-researchers mailing list
> >Jikesrvm-researchers@...
> >https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>

> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Jikesrvm-researchers mailing list
> Jikesrvm-researchers@...
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers