You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by lyon <us...@gmail.com> on 2008/04/18 14:42:36 UTC

[drlvm][gc]verify gc

Hi,
I am trying to modify the garbage collection src under the \gc_gen.
I found to debug the program is difficult. So what are the ways and some
useful
information to verify my modifications are correct and the gc behavior
is correct.

Thangks
liaoyin.

Re: [drlvm][gc]verify gc

Posted by Xiao-Feng Li <xi...@gmail.com>.
If you use -XX:gc.verify=gc in command line, it will verify lots of
things before and after GC, basically it does:
1. Check the heap integrity before and after a collection;
2. Check the heap consistency between before and after a collection;

If it doesn't hit any assert failure, probably it means the heap is
correct. If it hits an assert, you need check the reason.

Thanks,
xiaofeng

On Sat, Apr 19, 2008 at 8:41 PM, lyon <us...@gmail.com> wrote:
>
>  thanks ,xiaofeng
>
>   Because the program is concurrent.I am used  to print info and makes a log
> when it runs.
>   And  the src don't have the instruction to explain that how to use the
> verify function.
>   I hava to analyse the info that it has print.
>
>
>
> > Liaoyin, a good question.   (I found you did ask good questions.)
> >
> > Mostly I still use debugger (MS VC, gdb is not very convenient
> relatively).
> >
> > I use debugger to find if the objects are moved/collected as expected.
> > Why do you think it's difficult? What specific difficulty do you meet?
> >
> > To verify the correctness, you can use -XX:gc.verify=<gc|all|..> or
> > other options. But you have to have the verification code built into
> > your collection process (by following how the existing collection
> > algorithms do).
> >
> > Thanks,
> > xiaofeng
> >
> > On Fri, Apr 18, 2008 at 8:42 PM, lyon <us...@gmail.com> wrote:
> >
> >
> > > Hi,
> > >  I am trying to modify the garbage collection src under the \gc_gen.
> > >  I found to debug the program is difficult. So what are the ways and
> some
> > >  useful
> > >  information to verify my modifications are correct and the gc behavior
> > >  is correct.
> > >
> > >  Thangks
> > >  liaoyin.
> > >
> > >
> > >
> >
> >
> >
> >
> >
>
>



-- 
http://xiao-feng.blogspot.com

Re: [drlvm][gc]verify gc

Posted by lyon <us...@gmail.com>.
 thanks ,xiaofeng

   Because the program is concurrent.I am used  to print info and makes 
a log  when it runs.
   And  the src don't have the instruction to explain that how to use 
the verify function.
   I hava to analyse the info that it has print.
> Liaoyin, a good question.   (I found you did ask good questions.)
>
> Mostly I still use debugger (MS VC, gdb is not very convenient relatively).
>
> I use debugger to find if the objects are moved/collected as expected.
> Why do you think it's difficult? What specific difficulty do you meet?
>
> To verify the correctness, you can use -XX:gc.verify=<gc|all|..> or
> other options. But you have to have the verification code built into
> your collection process (by following how the existing collection
> algorithms do).
>
> Thanks,
> xiaofeng
>
> On Fri, Apr 18, 2008 at 8:42 PM, lyon <us...@gmail.com> wrote:
>   
>> Hi,
>>  I am trying to modify the garbage collection src under the \gc_gen.
>>  I found to debug the program is difficult. So what are the ways and some
>>  useful
>>  information to verify my modifications are correct and the gc behavior
>>  is correct.
>>
>>  Thangks
>>  liaoyin.
>>
>>     
>
>
>
>   


Re: [drlvm][gc]verify gc

Posted by Xiao-Feng Li <xi...@gmail.com>.
Liaoyin, a good question.   (I found you did ask good questions.)

Mostly I still use debugger (MS VC, gdb is not very convenient relatively).

I use debugger to find if the objects are moved/collected as expected.
Why do you think it's difficult? What specific difficulty do you meet?

To verify the correctness, you can use -XX:gc.verify=<gc|all|..> or
other options. But you have to have the verification code built into
your collection process (by following how the existing collection
algorithms do).

Thanks,
xiaofeng

On Fri, Apr 18, 2008 at 8:42 PM, lyon <us...@gmail.com> wrote:
> Hi,
>  I am trying to modify the garbage collection src under the \gc_gen.
>  I found to debug the program is difficult. So what are the ways and some
>  useful
>  information to verify my modifications are correct and the gc behavior
>  is correct.
>
>  Thangks
>  liaoyin.
>



-- 
http://xiao-feng.blogspot.com