| Index: src/mark-compact.cc
|
| diff --git a/src/mark-compact.cc b/src/mark-compact.cc
|
| index adbc5e7e549997172f467458d6f1623a2b23f070..e685025554538f57e5384b1544d0b5ca18b247ad 100644
|
| --- a/src/mark-compact.cc
|
| +++ b/src/mark-compact.cc
|
| @@ -2734,6 +2734,11 @@ static void SweepPrecisely(PagedSpace* space,
|
| space->identity() == CODE_SPACE);
|
| ASSERT((p->skip_list() == NULL) || (skip_list_mode == REBUILD_SKIP_LIST));
|
|
|
| + double start_time = 0.0;
|
| + if (FLAG_print_cumulative_gc_stat) {
|
| + start_time = OS::TimeCurrentMillis();
|
| + }
|
| +
|
| MarkBit::CellType* cells = p->markbits()->cells();
|
| p->MarkSweptPrecisely();
|
|
|
| @@ -2799,6 +2804,9 @@ static void SweepPrecisely(PagedSpace* space,
|
| space->Free(free_start, static_cast<int>(p->area_end() - free_start));
|
| }
|
| p->ResetLiveBytes();
|
| + if (FLAG_print_cumulative_gc_stat) {
|
| + space->heap()->AddSweepingTime(OS::TimeCurrentMillis() - start_time);
|
| + }
|
| }
|
|
|
|
|
| @@ -3394,6 +3402,11 @@ static inline Address StartOfLiveObject(Address block_address, uint32_t cell) {
|
| // spaces will not contain the free space map.
|
| intptr_t MarkCompactCollector::SweepConservatively(PagedSpace* space, Page* p) {
|
| ASSERT(!p->IsEvacuationCandidate() && !p->WasSwept());
|
| + double start_time = 0.0;
|
| + if (FLAG_print_cumulative_gc_stat) {
|
| + start_time = OS::TimeCurrentMillis();
|
| + }
|
| +
|
| MarkBit::CellType* cells = p->markbits()->cells();
|
| p->MarkSweptConservatively();
|
|
|
| @@ -3480,6 +3493,10 @@ intptr_t MarkCompactCollector::SweepConservatively(PagedSpace* space, Page* p) {
|
| }
|
|
|
| p->ResetLiveBytes();
|
| +
|
| + if (FLAG_print_cumulative_gc_stat) {
|
| + space->heap()->AddSweepingTime(OS::TimeCurrentMillis() - start_time);
|
| + }
|
| return freed_bytes;
|
| }
|
|
|
|
|