OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |