Bug 636365 - Add separate GCTIMER interval for sweeping Shapes. NPOTB, (r=gal)

This commit is contained in:
Gregor Wagner 2011-02-23 19:58:19 -08:00
parent dfca902f93
commit 9c4e860a93
3 changed files with 8 additions and 4 deletions

View File

@ -2368,6 +2368,7 @@ MarkAndSweepCompartment(JSContext *cx, JSCompartment *comp, JSGCInvocationKind g
(*c)->propertyTree.unmarkShapes(cx);
PropertyTree::dumpShapes(cx);
TIMESTAMP(sweepShapeEnd);
/*
* Destroy arenas after we finished the sweeping so finalizers can safely
@ -2487,6 +2488,7 @@ MarkAndSweep(JSContext *cx, JSGCInvocationKind gckind GCTIMER_PARAM)
(*c)->propertyTree.sweepShapes(cx);
PropertyTree::dumpShapes(cx);
TIMESTAMP(sweepShapeEnd);
SweepCompartments(cx, gckind);

View File

@ -422,18 +422,19 @@ GCTimer::finish(bool lastGC) {
gcFile = fopen("gcTimer.dat", "a");
fprintf(gcFile, " AppTime, Total, Mark, Sweep, FinObj,");
fprintf(gcFile, " FinStr, Destroy, newChunks, destroyChunks\n");
fprintf(gcFile, " FinStr, SwShapes, Destroy, +Chunks, -Chunks\n");
}
JS_ASSERT(gcFile);
fprintf(gcFile, "%12.1f, %6.1f, %6.1f, %6.1f, %6.1f, %6.1f, %7.1f, ",
fprintf(gcFile, "%12.1f, %6.1f, %6.1f, %6.1f, %6.1f, %6.1f, %8.1f, %6.1f, ",
(double)(enter - getFirstEnter()) / 1e6,
(double)(end - enter) / 1e6,
(double)(startSweep - startMark) / 1e6,
(double)(sweepDestroyEnd - startSweep) / 1e6,
(double)(sweepObjectEnd - startSweep) / 1e6,
(double)(sweepStringEnd - sweepObjectEnd) / 1e6,
(double)(sweepDestroyEnd - sweepStringEnd) / 1e6);
fprintf(gcFile, "%10d, %10d \n", newChunkCount,
(double)(sweepShapeEnd - sweepStringEnd) / 1e6,
(double)(sweepDestroyEnd - sweepShapeEnd) / 1e6);
fprintf(gcFile, "%7d, %7d \n", newChunkCount,
destroyChunkCount);
fflush(gcFile);

View File

@ -148,6 +148,7 @@ struct GCTimer {
uint64 startSweep;
uint64 sweepObjectEnd;
uint64 sweepStringEnd;
uint64 sweepShapeEnd;
uint64 sweepDestroyEnd;
uint64 end;