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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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
