Thanks for useful comments!

http://codereview.chromium.org/112036/diff/1/3
File src/log.cc (right):

http://codereview.chromium.org/112036/diff/1/3#newcode1117
Line 1117: // new compiled code, we're fine with it.
On 2009/05/19 12:40:14, Søren Gjesse wrote:
> It will not work to have allocations while using the heap iterator
even if you
> don't care about the allocated objects. Allcation can cause GC which
will leave
> the heap iterator in an udefined state.

> You should assert no allocation here

> AssertNoAllocation no_alloc;

> And then you don't have to use handles. This means that you will have
to collect
> the SharedFunctionInfo objects in an array and create the log events
afterwards.

Things are more tricky here. As you've said, we don't want GC activity
during SFIs collection, but then, as we process them, GCs are
unavoidable due to GetScriptLineNumber calls (and these are unavoidable
because otherwise we'll have no line numbers).

So now I'm using an array of SFI _handles_.

Please examine the new version.

http://codereview.chromium.org/112036/diff/1/4
File src/log.h (right):

http://codereview.chromium.org/112036/diff/1/4#newcode217
Line 217: // Logs all compiled functions found on heap.
On 2009/05/19 12:40:14, Søren Gjesse wrote:
> found on -> in the

Done.

http://codereview.chromium.org/112036/diff/1/5
File test/cctest/test-log.cc (right):

http://codereview.chromium.org/112036/diff/1/5#newcode413
Line 413: i::Heap::CollectAllGarbage();
On 2009/05/19 12:40:14, Søren Gjesse wrote:
> Add

> AssertNoAllocation no_alloc

> here to ensure that there can be no GC's until the call to
LogCompiledFunctions.

Done.

http://codereview.chromium.org/112036/diff/1/5#newcode462
Line 462:
On 2009/05/19 12:40:14, Søren Gjesse wrote:
> Maybe repeat or reference the comment on why the -1 is here.

A better solution: gathered allocation / disposal code inside
ParseLogResult to keep them close to each other.

http://codereview.chromium.org/112036

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

Reply via email to