| Index: src/heap/mark-compact.cc
|
| diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
|
| index 69cf62124570538157e38e7529c349666b89c57d..17c4891143db11e1433a6cbec3228708f5974512 100644
|
| --- a/src/heap/mark-compact.cc
|
| +++ b/src/heap/mark-compact.cc
|
| @@ -3424,7 +3424,8 @@ int MarkCompactCollector::NumberOfParallelCompactionTasks() {
|
|
|
|
|
| void MarkCompactCollector::EvacuatePagesInParallel() {
|
| - if (evacuation_candidates_.length() == 0) return;
|
| + const int num_pages = evacuation_candidates_.length();
|
| + if (num_pages == 0) return;
|
|
|
| const int num_tasks = NumberOfParallelCompactionTasks();
|
|
|
| @@ -3468,7 +3469,6 @@ void MarkCompactCollector::EvacuatePagesInParallel() {
|
| delete[] compaction_spaces_for_tasks;
|
|
|
| // Finalize sequentially.
|
| - const int num_pages = evacuation_candidates_.length();
|
| int abandoned_pages = 0;
|
| for (int i = 0; i < num_pages; i++) {
|
| Page* p = evacuation_candidates_[i];
|
| @@ -3504,17 +3504,13 @@ void MarkCompactCollector::EvacuatePagesInParallel() {
|
| }
|
| p->parallel_compaction_state().SetValue(MemoryChunk::kCompactingDone);
|
| }
|
| - if (num_pages > 0) {
|
| - if (FLAG_trace_fragmentation) {
|
| - if (abandoned_pages != 0) {
|
| - PrintF(
|
| - " Abandoned (at least partially) %d out of %d page compactions due"
|
| - " to lack of memory\n",
|
| - abandoned_pages, num_pages);
|
| - } else {
|
| - PrintF(" Compacted %d pages\n", num_pages);
|
| - }
|
| - }
|
| + if (FLAG_trace_fragmentation) {
|
| + PrintIsolate(isolate(),
|
| + "%8.0f ms: compaction: parallel=%d pages=%d aborted=%d "
|
| + "tasks=%d cores=%d\n",
|
| + isolate()->time_millis_since_init(), FLAG_parallel_compaction,
|
| + num_pages, abandoned_pages, num_tasks,
|
| + base::SysInfo::NumberOfProcessors());
|
| }
|
| }
|
|
|
|
|