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

Side by Side Diff: test/cctest/heap/test-mark-compact.cc

Issue 2810893002: [heap] Implement simple concurrent marking deque. (Closed)
Patch Set: Fix comment Created 3 years, 7 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 | « test/cctest/heap/test-concurrent-marking.cc ('k') | test/unittests/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 25 matching lines...) Expand all
36 #endif 36 #endif
37 37
38 #include <utility> 38 #include <utility>
39 39
40 #include "src/v8.h" 40 #include "src/v8.h"
41 41
42 #include "src/full-codegen/full-codegen.h" 42 #include "src/full-codegen/full-codegen.h"
43 #include "src/global-handles.h" 43 #include "src/global-handles.h"
44 #include "src/heap/mark-compact-inl.h" 44 #include "src/heap/mark-compact-inl.h"
45 #include "src/heap/mark-compact.h" 45 #include "src/heap/mark-compact.h"
46 #include "src/heap/sequential-marking-deque.h"
46 #include "src/objects-inl.h" 47 #include "src/objects-inl.h"
47 #include "test/cctest/cctest.h" 48 #include "test/cctest/cctest.h"
48 #include "test/cctest/heap/heap-tester.h" 49 #include "test/cctest/heap/heap-tester.h"
49 #include "test/cctest/heap/heap-utils.h" 50 #include "test/cctest/heap/heap-utils.h"
50 51
51 using namespace v8::internal; 52 using namespace v8::internal;
52 using v8::Just; 53 using v8::Just;
53 54
54 55 TEST(SequentialMarkingDeque) {
55 TEST(MarkingDeque) {
56 CcTest::InitializeVM(); 56 CcTest::InitializeVM();
57 MarkingDeque s(CcTest::i_isolate()->heap()); 57 SequentialMarkingDeque s(CcTest::i_isolate()->heap());
58 s.SetUp(); 58 s.SetUp();
59 s.StartUsing(); 59 s.StartUsing();
60 Address original_address = reinterpret_cast<Address>(&s); 60 Address original_address = reinterpret_cast<Address>(&s);
61 Address current_address = original_address; 61 Address current_address = original_address;
62 while (!s.IsFull()) { 62 while (!s.IsFull()) {
63 s.Push(HeapObject::FromAddress(current_address)); 63 s.Push(HeapObject::FromAddress(current_address));
64 current_address += kPointerSize; 64 current_address += kPointerSize;
65 } 65 }
66 66
67 while (!s.IsEmpty()) { 67 while (!s.IsEmpty()) {
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 heap->old_space()->EmptyAllocationInfo(); 356 heap->old_space()->EmptyAllocationInfo();
357 Page* page = Page::FromAddress(array->address()); 357 Page* page = Page::FromAddress(array->address());
358 LiveObjectIterator<kGreyObjects> it(page, MarkingState::Internal(page)); 358 LiveObjectIterator<kGreyObjects> it(page, MarkingState::Internal(page));
359 HeapObject* object = nullptr; 359 HeapObject* object = nullptr;
360 while ((object = it.Next()) != nullptr) { 360 while ((object = it.Next()) != nullptr) {
361 CHECK(!object->IsFiller()); 361 CHECK(!object->IsFiller());
362 } 362 }
363 } 363 }
364 364
365 #endif // __linux__ and !USE_SIMULATOR 365 #endif // __linux__ and !USE_SIMULATOR
OLDNEW
« no previous file with comments | « test/cctest/heap/test-concurrent-marking.cc ('k') | test/unittests/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698