http://codereview.chromium.org/1094002/diff/41001/42003
File include/v8.h (right):

http://codereview.chromium.org/1094002/diff/41001/42003#newcode2324
include/v8.h:2324: static void AddGCPrologueCallback(GCPrologueCallback
callback,
Please format like this

static void AddGCPrologueCallback(
    GCPrologueCallback callback, GCType gc_type_filter = kGCTypeAll);

if aligning the arguments does not fit within 80 characters.

http://codereview.chromium.org/1094002/diff/41001/42003#newcode2353
include/v8.h:2353: static void AddGCEpilogueCallback(GCEpilogueCallback
callback,
Ditto.

http://codereview.chromium.org/1094002/diff/41001/42001
File src/heap.cc (right):

http://codereview.chromium.org/1094002/diff/41001/42001#newcode554
src/heap.cc:554: GCType gc_type =
Looking more at this it seems that we have to change the reporting a
bit. As we cannot know beforehand whether the mark sweep will compact or
not we should only have two GC types instead of three. We can then have
a flag which in the epilogue callback can indicate whether compacting
took place.

enum GCType {
  kGCTypeScavenge = 1 << 0,
  kGCTypeMarkSweepCompact = 1 << 1,
  kGCTypeAll = kGCTypeScavenge | kGCTypeMarkSweepCompact
};

enum GCCallbackFlags {
  kNoGCCallbackFlags = 0
  kGCCallbackFlagCompacted = 1 << 0
};

You can get that information from the GCTracer.

http://codereview.chromium.org/1094002/diff/41001/42001#newcode3818
src/heap.cc:3818: gc_prologue_callbacks_.Remove(i);
As we are breaking here, maybe add an ASSERT checking for adding the
same callback twice.

http://codereview.chromium.org/1094002/diff/41001/42002
File src/heap.h (right):

http://codereview.chromium.org/1094002/diff/41001/42002#newcode677
src/heap.h:677: static void AddGCPrologueCallback(GCEpilogueCallback
callback,
Please align arguments.

http://codereview.chromium.org/1094002/diff/41001/42002#newcode681
src/heap.h:681: static void AddGCEpilogueCallback(GCEpilogueCallback
callback,
Ditto.

http://codereview.chromium.org/1094002/diff/41001/42002#newcode1056
src/heap.h:1056: GCPrologueCallbackPair(GCPrologueCallback callback,
GCType gc_type)
4 space indent of :.

http://codereview.chromium.org/1094002/diff/41001/42002#newcode1065
src/heap.h:1065: GCEpilogueCallbackPair(GCEpilogueCallback callback,
GCType gc_type)
Ditto.

http://codereview.chromium.org/1094002

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

To unsubscribe from this group, send email to v8-dev+unsubscribegooglegroups.com or reply 
to this email with the words "REMOVE ME" as the subject.

Reply via email to