Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: test/cctest/test-spaces.cc

Issue 1356363005: Revert of [heap] Add more tasks for parallel compaction (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/spaces.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 500
501 Object* chunk = 501 Object* chunk =
502 old_space->AllocateRawUnaligned(static_cast<int>(rest)).ToObjectChecked(); 502 old_space->AllocateRawUnaligned(static_cast<int>(rest)).ToObjectChecked();
503 CHECK_EQ(old_space->CountTotalPages(), kExpectedInitialOldSpacePages); 503 CHECK_EQ(old_space->CountTotalPages(), kExpectedInitialOldSpacePages);
504 CHECK(chunk != nullptr); 504 CHECK(chunk != nullptr);
505 CHECK(chunk->IsHeapObject()); 505 CHECK(chunk->IsHeapObject());
506 506
507 CHECK_EQ(compaction_space->CountTotalPages(), 0); 507 CHECK_EQ(compaction_space->CountTotalPages(), 0);
508 CHECK_EQ(compaction_space->Capacity(), 0); 508 CHECK_EQ(compaction_space->Capacity(), 0);
509 // Make the rest of memory available for compaction. 509 // Make the rest of memory available for compaction.
510 compaction_space->AddMemory(HeapObject::cast(chunk)->address(), 510 compaction_space->AddExternalMemory(HeapObject::cast(chunk)->address(),
511 static_cast<int>(rest)); 511 static_cast<int>(rest));
512 CHECK_EQ(compaction_space->CountTotalPages(), 0); 512 CHECK_EQ(compaction_space->CountTotalPages(), 0);
513 CHECK_EQ(compaction_space->Capacity(), rest); 513 CHECK_EQ(compaction_space->Capacity(), rest);
514 while (num_rest_objects-- > 0) { 514 while (num_rest_objects-- > 0) {
515 compaction_space->AllocateRawUnaligned(kObjectSize).ToObjectChecked(); 515 compaction_space->AllocateRawUnaligned(kObjectSize).ToObjectChecked();
516 } 516 }
517 // We only used external memory so far. 517 // We only used external memory so far.
518 CHECK_EQ(compaction_space->CountTotalPages(), 0); 518 CHECK_EQ(compaction_space->CountTotalPages(), 0);
519 // Additional allocation. 519 // Additional allocation.
520 compaction_space->AllocateRawUnaligned(kAdditionalCompactionMemory) 520 compaction_space->AllocateRawUnaligned(kAdditionalCompactionMemory)
521 .ToObjectChecked(); 521 .ToObjectChecked();
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 634
635 // Turn the allocation into a proper object so isolate teardown won't 635 // Turn the allocation into a proper object so isolate teardown won't
636 // crash. 636 // crash.
637 HeapObject* free_space = NULL; 637 HeapObject* free_space = NULL;
638 CHECK(allocation.To(&free_space)); 638 CHECK(allocation.To(&free_space));
639 new_space->heap()->CreateFillerObjectAt(free_space->address(), 80); 639 new_space->heap()->CreateFillerObjectAt(free_space->address(), 80);
640 } 640 }
641 } 641 }
642 isolate->Dispose(); 642 isolate->Dispose();
643 } 643 }
OLDNEW
« no previous file with comments | « src/heap/spaces.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698