Please address the allocation issues in the heap traversal.

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.
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.

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.
found on -> in the

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();
Add

AssertNoAllocation no_alloc

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

http://codereview.chromium.org/112036/diff/1/5#newcode462
Line 462:
Maybe repeat or reference the comment on why the -1 is here.

http://codereview.chromium.org/112036

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

Reply via email to