OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/heap/spaces.h" | 5 #include "src/heap/spaces.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/base/platform/platform.h" | 8 #include "src/base/platform/platform.h" |
9 #include "src/full-codegen/full-codegen.h" | 9 #include "src/full-codegen/full-codegen.h" |
10 #include "src/heap/slots-buffer.h" | 10 #include "src/heap/slots-buffer.h" |
(...skipping 2914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2925 HeapObjectIterator obj_it(this); | 2925 HeapObjectIterator obj_it(this); |
2926 for (HeapObject* obj = obj_it.Next(); obj != NULL; obj = obj_it.Next()) | 2926 for (HeapObject* obj = obj_it.Next(); obj != NULL; obj = obj_it.Next()) |
2927 CollectHistogramInfo(obj); | 2927 CollectHistogramInfo(obj); |
2928 ReportHistogram(heap()->isolate(), true); | 2928 ReportHistogram(heap()->isolate(), true); |
2929 } | 2929 } |
2930 #endif | 2930 #endif |
2931 | 2931 |
2932 | 2932 |
2933 // ----------------------------------------------------------------------------- | 2933 // ----------------------------------------------------------------------------- |
2934 // MapSpace implementation | 2934 // MapSpace implementation |
2935 // TODO(mvstanton): this is weird...the compiler can't make a vtable unless | |
2936 // there is at least one non-inlined virtual function. I would prefer to hide | |
2937 // the VerifyObject definition behind VERIFY_HEAP. | |
2938 | 2935 |
2936 #ifdef VERIFY_HEAP | |
2939 void MapSpace::VerifyObject(HeapObject* object) { CHECK(object->IsMap()); } | 2937 void MapSpace::VerifyObject(HeapObject* object) { CHECK(object->IsMap()); } |
2940 | 2938 #endif |
2941 | 2939 |
Michael Starzinger
2015/11/04 09:18:25
nit: Two empty newlines here for consistency.
Igor Sheludko
2015/11/04 09:51:57
Done.
| |
2942 // ----------------------------------------------------------------------------- | 2940 // ----------------------------------------------------------------------------- |
2943 // LargeObjectIterator | 2941 // LargeObjectIterator |
2944 | 2942 |
2945 LargeObjectIterator::LargeObjectIterator(LargeObjectSpace* space) { | 2943 LargeObjectIterator::LargeObjectIterator(LargeObjectSpace* space) { |
2946 current_ = space->first_page_; | 2944 current_ = space->first_page_; |
2947 } | 2945 } |
2948 | 2946 |
2949 | 2947 |
2950 HeapObject* LargeObjectIterator::Next() { | 2948 HeapObject* LargeObjectIterator::Next() { |
2951 if (current_ == NULL) return NULL; | 2949 if (current_ == NULL) return NULL; |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3271 object->ShortPrint(); | 3269 object->ShortPrint(); |
3272 PrintF("\n"); | 3270 PrintF("\n"); |
3273 } | 3271 } |
3274 printf(" --------------------------------------\n"); | 3272 printf(" --------------------------------------\n"); |
3275 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3273 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
3276 } | 3274 } |
3277 | 3275 |
3278 #endif // DEBUG | 3276 #endif // DEBUG |
3279 } // namespace internal | 3277 } // namespace internal |
3280 } // namespace v8 | 3278 } // namespace v8 |
OLD | NEW |