Hi Ojan,

> I'm trying to write a perf testing framework for webkit tests. I suspect
> that GC is responsible for some of the flakiness. I've added a call to
> GCController.collect() before running the test, but as best I can tell, that
> doesn't do a full GC. Is there a reason for that? Could we change it to do
> so?

calling CollectAllGarbage does perform a full GC, so I don't think
that is the issue.

> It looks like this is what gets hit ultimately:
> Heap::CollectAllGarbage(false);
> http://code.google.com/p/v8/source/browse/trunk/src/execution.cc#691
>
> Should that false be changed to true? Also, should it clear the compilation
> cache first?

You could change the flag to true, but I don't think it will make a
difference. If the flag is true it forces a compacting collection in
V8. With a false flag you still get a full GC and potentially a
compaction if there is fragmentation. I think the main issue here is
that in order to get rid of DOM wrappers in the heap you need more
than one GC (at least two - one to notice that it is not referenced
from JS and perform a callback and another one to actually get rid of
the object). Does it help if you do a couple of calls to collect()?

> Also, I noticed that we don't implement GCController.getJSObjectCount. Why
> is there? Is there some meaningful value we could return there?

I have no idea why it is there. Not sure what we would want to use it
for. I don't think we should rely on it in testing.

Cheers,    -- Mads

> Thanks,
> Ojan
>
> --
> v8-dev mailing list
> [email protected]
> http://groups.google.com/group/v8-dev
>

-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to