As an initial implementation it LGTM.

http://codereview.chromium.org/267077/diff/2001/22
File src/global-handles.h (right):

http://codereview.chromium.org/267077/diff/2001/22#newcode57
Line 57: typedef void (*WeakReferenceVisitor)(Object* object, void*
parameter);
This shouldn't be called ...Visitor unless it's a subclass of the
ObjectVisitor.  I can't think of a better name, though.

http://codereview.chromium.org/267077/diff/2001/23
File src/heap-profiler.cc (right):

http://codereview.chromium.org/267077/diff/2001/23#newcode597
Line 597: static_cast<Address*>(trace)));
Can reinterpret_cast here.

http://codereview.chromium.org/267077/diff/2001/24
File src/heap-profiler.h (right):

http://codereview.chromium.org/267077/diff/2001/24#newcode261
Line 261: static bool can_log;
can_log_.  I'd prefer that it was private, and there was a Setup
function that set it to true.

http://codereview.chromium.org/267077/diff/2001/25
File src/heap.cc (right):

http://codereview.chromium.org/267077/diff/2001/25#newcode3313
Line 3313: ProducerHeapProfile::can_log = true;
If you have a ProducerHeapProfile::Setup function you can call it here
(with a comment that it should be called last during heap setup).

http://codereview.chromium.org/267077

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to