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

Side by Side Diff: src/spaces.cc

Issue 3615009: Parallelize marking phase of mark-sweep/compact collection cycle. (Closed)
Patch Set: Created 10 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/platform.h ('k') | src/x64/assembler-x64-inl.h » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 2886 matching lines...) Expand 10 before | Expand all | Expand 10 after
2897 } 2897 }
2898 2898
2899 2899
2900 void LargeObjectSpace::FreeUnmarkedObjects() { 2900 void LargeObjectSpace::FreeUnmarkedObjects() {
2901 LargeObjectChunk* previous = NULL; 2901 LargeObjectChunk* previous = NULL;
2902 LargeObjectChunk* current = first_chunk_; 2902 LargeObjectChunk* current = first_chunk_;
2903 while (current != NULL) { 2903 while (current != NULL) {
2904 HeapObject* object = current->GetObject(); 2904 HeapObject* object = current->GetObject();
2905 if (object->IsMarked()) { 2905 if (object->IsMarked()) {
2906 object->ClearMark(); 2906 object->ClearMark();
2907 #ifdef DEBUG
2907 MarkCompactCollector::tracer()->decrement_marked_count(); 2908 MarkCompactCollector::tracer()->decrement_marked_count();
2909 #endif
2908 previous = current; 2910 previous = current;
2909 current = current->next(); 2911 current = current->next();
2910 } else { 2912 } else {
2911 Page* page = Page::FromAddress(RoundUp(current->address(), 2913 Page* page = Page::FromAddress(RoundUp(current->address(),
2912 Page::kPageSize)); 2914 Page::kPageSize));
2913 Executability executable = 2915 Executability executable =
2914 page->IsPageExecutable() ? EXECUTABLE : NOT_EXECUTABLE; 2916 page->IsPageExecutable() ? EXECUTABLE : NOT_EXECUTABLE;
2915 Address chunk_address = current->address(); 2917 Address chunk_address = current->address();
2916 size_t chunk_size = current->size(); 2918 size_t chunk_size = current->size();
2917 2919
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
3040 for (HeapObject* obj = obj_it.next(); obj != NULL; obj = obj_it.next()) { 3042 for (HeapObject* obj = obj_it.next(); obj != NULL; obj = obj_it.next()) {
3041 if (obj->IsCode()) { 3043 if (obj->IsCode()) {
3042 Code* code = Code::cast(obj); 3044 Code* code = Code::cast(obj);
3043 code_kind_statistics[code->kind()] += code->Size(); 3045 code_kind_statistics[code->kind()] += code->Size();
3044 } 3046 }
3045 } 3047 }
3046 } 3048 }
3047 #endif // DEBUG 3049 #endif // DEBUG
3048 3050
3049 } } // namespace v8::internal 3051 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform.h ('k') | src/x64/assembler-x64-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698