[rvm-research] Trace mature objects without interfering gc

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

[rvm-research] Trace mature objects without interfering gc

by Dingwen Yuan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I am doing something related to pretenuring for generational gc. In order to evaluate whether the pretenuring of some objects really improve the gc, I want to test the reachability(liveness) of pretenured objects, but this tracing of liveness should not interfere with the actual gc. Is there any existing tools for this and if yes, can they work with dacapo benchmarks?

Thanks a lot.

cheers,

Dingwen Yuan

TU Darmstadt

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

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

Re: [rvm-research] Trace mature objects without interfering gc

by Dingwen Yuan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I noticed the sanity checker can print some statistics such as below before and after GCs.
============================== GC Sanity Checking ==============================
Performing Sanity Checks...
roots objects refs null
33835 229706 743653 202798

Does "objects" mean the number of living objects in the heap?

Thanks,

Dingwen

Re: [rvm-research] Trace mature objects without interfering gc

by Chris Ryder :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 23 Jun 2009, at 20:05, Dingwen Yuan wrote:

> I am doing something related to pretenuring for generational gc. In  
> order to evaluate whether the pretenuring of some objects really  
> improve the gc, I want to test the reachability(liveness) of  
> pretenured objects, but this tracing of liveness should not  
> interfere with the actual gc. Is there any existing tools for this  
> and if yes, can they work with dacapo benchmarks?

Hi Dingwen.

Our tool 'MemTrace', which is available as a patch in the research  
archive at:

http://sourceforge.net/tracker/?func=detail&aid=2741045&group_id=128805&atid=723235

will give you lifetime profiles, though it does so by performing  
regular full-heap GC's using a semispace collector, which I guess is  
not what you want. However, it might be possible to modify it to  
perform non-moving collections if you are unable to find any other  
mechanism to use.

Cheers,
Chris.

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

Re: [rvm-research] Trace mature objects without interfering gc

by Dingwen Yuan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Chris,

Thank you for your suggestion.

To those who may know about sanity checker,

It seems that sanity checker can solve my problem. But I have a question -- why the sanity checker prints the statistics out twice for every GC and what's their difference?

cheers,

Dingwen

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

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

Re: [rvm-research] Trace mature objects without interfering gc

by Daniel Frampton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The sanity checker runs before and after collection, performing complete transitive closures over the heap without changing any data (it stores all the required information in a hashtable).
 
Cheers,
Daniel.

On Thu, Jun 25, 2009 at 5:31 AM, Dingwen Yuan <pdvyuan@...> wrote:
Hello Chris,

Thank you for your suggestion.

To those who may know about sanity checker,

It seems that sanity checker can solve my problem. But I have a question -- why the sanity checker prints the statistics out twice for every GC and what's their difference?

cheers,

Dingwen

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

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



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

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

Re: [rvm-research] Trace mature objects without interfering gc

by Dingwen Yuan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Daniel,

Thanks. But why could the "objects" be different before and after a GC? Does "object" mean the number of living objects in the heap?

cheers,

Dingwen

2009/6/25 Daniel Frampton <zyridium@...>
The sanity checker runs before and after collection, performing complete transitive closures over the heap without changing any data (it stores all the required information in a hashtable).
 
Cheers,
Daniel.

On Thu, Jun 25, 2009 at 5:31 AM, Dingwen Yuan <pdvyuan@...> wrote:
Hello Chris,

Thank you for your suggestion.

To those who may know about sanity checker,

It seems that sanity checker can solve my problem. But I have a question -- why the sanity checker prints the statistics out twice for every GC and what's their difference?

cheers,

Dingwen

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

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



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

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



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

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

Re: [rvm-research] Trace mature objects without interfering gc

by Daniel Frampton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

First, I am assuming by your question that you are seeing a difference between before and after GC.
 
Yes, objects are the number of unique objects encountered during a trace.
 
The discrepancy you see is probably because of finalizable objects. There will often be a rise in visited objects over a GC due to the number of objects that are made strongly reachable by finalizable processing.
 
Cheers,
Daniel.

On Thu, Jun 25, 2009 at 4:09 PM, Dingwen Yuan <pdvyuan@...> wrote:
Hi Daniel,

Thanks. But why could the "objects" be different before and after a GC? Does "object" mean the number of living objects in the heap?

cheers,

Dingwen

2009/6/25 Daniel Frampton <zyridium@...>

The sanity checker runs before and after collection, performing complete transitive closures over the heap without changing any data (it stores all the required information in a hashtable).
 
Cheers,
Daniel.

On Thu, Jun 25, 2009 at 5:31 AM, Dingwen Yuan <pdvyuan@...> wrote:
Hello Chris,

Thank you for your suggestion.

To those who may know about sanity checker,

It seems that sanity checker can solve my problem. But I have a question -- why the sanity checker prints the statistics out twice for every GC and what's their difference?

cheers,

Dingwen

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

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



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

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



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

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



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

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

Re: [rvm-research] Trace mature objects without interfering gc

by Dingwen Yuan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Daniel. Now I see.

cheers,

Dingwen

2009/6/25 Daniel Frampton <zyridium@...>
First, I am assuming by your question that you are seeing a difference between before and after GC.
 
Yes, objects are the number of unique objects encountered during a trace.
 
The discrepancy you see is probably because of finalizable objects. There will often be a rise in visited objects over a GC due to the number of objects that are made strongly reachable by finalizable processing.
 
Cheers,
Daniel.

On Thu, Jun 25, 2009 at 4:09 PM, Dingwen Yuan <pdvyuan@...> wrote:
Hi Daniel,

Thanks. But why could the "objects" be different before and after a GC? Does "object" mean the number of living objects in the heap?

cheers,

Dingwen

2009/6/25 Daniel Frampton <zyridium@...>

The sanity checker runs before and after collection, performing complete transitive closures over the heap without changing any data (it stores all the required information in a hashtable).
 
Cheers,
Daniel.

On Thu, Jun 25, 2009 at 5:31 AM, Dingwen Yuan <pdvyuan@...> wrote:
Hello Chris,

Thank you for your suggestion.

To those who may know about sanity checker,

It seems that sanity checker can solve my problem. But I have a question -- why the sanity checker prints the statistics out twice for every GC and what's their difference?

cheers,

Dingwen

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

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



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

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



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

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



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

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



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

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

Re: [rvm-research] Trace mature objects without interfering gc

by Dingwen Yuan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Daniel,

I have piggybacked into the sanity checking code to find living pretenured objects.
Something I found weird is that for one run of dacapo benchmark luindex, I pretenured in total 63713 objects, however 25633 in them were not found reachable until the sanity checking after the following *full gc*(All the sanity checking of nursery gc coming before can not found them). I wonder how can the finalizable processing resurrect so many otherwise dead objects. BTW, I'm using jikesrvm version 2.9.2 and GC algorithm is GenCopy.

Thanks in advance.

cheers,

Dingwen

2009/6/25 Daniel Frampton <zyridium@...>
First, I am assuming by your question that you are seeing a difference between before and after GC.
 
Yes, objects are the number of unique objects encountered during a trace.
 
The discrepancy you see is probably because of finalizable objects. There will often be a rise in visited objects over a GC due to the number of objects that are made strongly reachable by finalizable processing.
 
Cheers,
Daniel.

On Thu, Jun 25, 2009 at 4:09 PM, Dingwen Yuan <pdvyuan@...> wrote:
Hi Daniel,

Thanks. But why could the "objects" be different before and after a GC? Does "object" mean the number of living objects in the heap?

cheers,

Dingwen

2009/6/25 Daniel Frampton <zyridium@...>

The sanity checker runs before and after collection, performing complete transitive closures over the heap without changing any data (it stores all the required information in a hashtable).
 
Cheers,
Daniel.

On Thu, Jun 25, 2009 at 5:31 AM, Dingwen Yuan <pdvyuan@...> wrote:
Hello Chris,

Thank you for your suggestion.

To those who may know about sanity checker,

It seems that sanity checker can solve my problem. But I have a question -- why the sanity checker prints the statistics out twice for every GC and what's their difference?

cheers,

Dingwen

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

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



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

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



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

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



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

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



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

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

Re: [rvm-research] Trace mature objects without interfering gc

by Daniel Frampton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You could try counting how many of the pretenured objects are finalizable to see if the numbers add up, and/or running without finalization with -X:gc:noFinalizer=true
 
It might also possible to add some instrumentation to finalization to give you quicker feedback.
 
Cheers,
Daniel.
On Thu, Jun 25, 2009 at 7:46 PM, Dingwen Yuan <pdvyuan@...> wrote:
Hi Daniel,

I have piggybacked into the sanity checking code to find living pretenured objects.
Something I found weird is that for one run of dacapo benchmark luindex, I pretenured in total 63713 objects, however 25633 in them were not found reachable until the sanity checking after the following *full gc*(All the sanity checking of nursery gc coming before can not found them). I wonder how can the finalizable processing resurrect so many otherwise dead objects. BTW, I'm using jikesrvm version 2.9.2 and GC algorithm is GenCopy.

Thanks in advance.


cheers,

Dingwen

2009/6/25 Daniel Frampton <zyridium@...>
First, I am assuming by your question that you are seeing a difference between before and after GC.
 
Yes, objects are the number of unique objects encountered during a trace.
 
The discrepancy you see is probably because of finalizable objects. There will often be a rise in visited objects over a GC due to the number of objects that are made strongly reachable by finalizable processing.
 
Cheers,
Daniel.

On Thu, Jun 25, 2009 at 4:09 PM, Dingwen Yuan <pdvyuan@...> wrote:
Hi Daniel,

Thanks. But why could the "objects" be different before and after a GC? Does "object" mean the number of living objects in the heap?

cheers,

Dingwen

2009/6/25 Daniel Frampton <zyridium@...>

The sanity checker runs before and after collection, performing complete transitive closures over the heap without changing any data (it stores all the required information in a hashtable).
 
Cheers,
Daniel.

On Thu, Jun 25, 2009 at 5:31 AM, Dingwen Yuan <pdvyuan@...> wrote:
Hello Chris,

Thank you for your suggestion.

To those who may know about sanity checker,

It seems that sanity checker can solve my problem. But I have a question -- why the sanity checker prints the statistics out twice for every GC and what's their difference?

cheers,

Dingwen

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

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



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

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



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

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



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

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



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

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



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

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

Re: [rvm-research] Trace mature objects without interfering gc

by Dingwen Yuan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Daniel,

So for every GC, there are two sanity checks, suppose the second check has found some objects which can not be found by the first check and these objects are found due to finalizer processing, can we say that these objects will die after that GC (After finalizing, an object is ready to be reclaimed)?

cheers,

Dingwen

2009/6/25 Daniel Frampton <zyridium@...>
You could try counting how many of the pretenured objects are finalizable to see if the numbers add up, and/or running without finalization with -X:gc:noFinalizer=true
 
It might also possible to add some instrumentation to finalization to give you quicker feedback.
 
Cheers,
Daniel.
On Thu, Jun 25, 2009 at 7:46 PM, Dingwen Yuan <pdvyuan@...> wrote:
Hi Daniel,

I have piggybacked into the sanity checking code to find living pretenured objects.
Something I found weird is that for one run of dacapo benchmark luindex, I pretenured in total 63713 objects, however 25633 in them were not found reachable until the sanity checking after the following *full gc*(All the sanity checking of nursery gc coming before can not found them). I wonder how can the finalizable processing resurrect so many otherwise dead objects. BTW, I'm using jikesrvm version 2.9.2 and GC algorithm is GenCopy.

Thanks in advance.


cheers,

Dingwen

2009/6/25 Daniel Frampton <zyridium@...>
First, I am assuming by your question that you are seeing a difference between before and after GC.
 
Yes, objects are the number of unique objects encountered during a trace.
 
The discrepancy you see is probably because of finalizable objects. There will often be a rise in visited objects over a GC due to the number of objects that are made strongly reachable by finalizable processing.
 
Cheers,
Daniel.

On Thu, Jun 25, 2009 at 4:09 PM, Dingwen Yuan <pdvyuan@...> wrote:
Hi Daniel,

Thanks. But why could the "objects" be different before and after a GC? Does "object" mean the number of living objects in the heap?

cheers,

Dingwen

2009/6/25 Daniel Frampton <zyridium@...>

The sanity checker runs before and after collection, performing complete transitive closures over the heap without changing any data (it stores all the required information in a hashtable).
 
Cheers,
Daniel.

On Thu, Jun 25, 2009 at 5:31 AM, Dingwen Yuan <pdvyuan@...> wrote:
Hello Chris,

Thank you for your suggestion.

To those who may know about sanity checker,

It seems that sanity checker can solve my problem. But I have a question -- why the sanity checker prints the statistics out twice for every GC and what's their difference?

cheers,

Dingwen

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

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



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

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



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

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



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

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



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

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



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

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



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

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

Re: [rvm-research] Trace mature objects without interfering gc

by Eliot Moss :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dingwen Yuan wrote:
> Hi Daniel,
>
> So for every GC, there are two sanity checks, suppose the second check
> has found some objects which can not be found by the first check and
> these objects are found due to finalizer processing, can we say that
> these objects will die after that GC (After finalizing, an object is
> ready to be reclaimed)?

Dingwen -- That would be usual, but a finalizer can do anything it wants,
including stick an object into a globally accessible datat structure.
Doing so would extend the object's lifetime until all its pointers go
away. Since an object is eligible for finalization only once, at that
point it could be reclaimed.

Btw, this is all to do with *Java* semantics, not Jike RVM in particular.

Best wishes -- Eliot Moss

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

Re: [rvm-research] Trace mature objects without interfering gc

by Dingwen Yuan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Eliot,

I looked at the rvm code, but I don't know whether I understood it correctly. It seems that the finalization is called after a GC. So although the object is dead, their memory can not be reclaimed until still next GC. Is it right?

cheers,

Dingwen

2009/6/26 Eliot Moss <moss@...>
Dingwen Yuan wrote:
> Hi Daniel,
>
> So for every GC, there are two sanity checks, suppose the second check
> has found some objects which can not be found by the first check and
> these objects are found due to finalizer processing, can we say that
> these objects will die after that GC (After finalizing, an object is
> ready to be reclaimed)?

Dingwen -- That would be usual, but a finalizer can do anything it wants,
including stick an object into a globally accessible datat structure.
Doing so would extend the object's lifetime until all its pointers go
away. Since an object is eligible for finalization only once, at that
point it could be reclaimed.

Btw, this is all to do with *Java* semantics, not Jike RVM in particular.

Best wishes -- Eliot Moss

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


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

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