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

Side by Side Diff: src/heap/spaces.cc

Issue 490943002: Use size_t in GCIdleTimeHandler to fix undefined behaviour. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/heap/heap.cc ('k') | test/heap-unittests/heap-unittest.cc » ('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 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/base/platform/platform.h" 7 #include "src/base/platform/platform.h"
8 #include "src/full-codegen.h" 8 #include "src/full-codegen.h"
9 #include "src/heap/mark-compact.h" 9 #include "src/heap/mark-compact.h"
10 #include "src/macro-assembler.h" 10 #include "src/macro-assembler.h"
(...skipping 2717 matching lines...) Expand 10 before | Expand all | Expand 10 after
2728 void PagedSpace::ReportStatistics() { 2728 void PagedSpace::ReportStatistics() {
2729 int pct = static_cast<int>(Available() * 100 / Capacity()); 2729 int pct = static_cast<int>(Available() * 100 / Capacity());
2730 PrintF(" capacity: %" V8_PTR_PREFIX 2730 PrintF(" capacity: %" V8_PTR_PREFIX
2731 "d" 2731 "d"
2732 ", waste: %" V8_PTR_PREFIX 2732 ", waste: %" V8_PTR_PREFIX
2733 "d" 2733 "d"
2734 ", available: %" V8_PTR_PREFIX "d, %%%d\n", 2734 ", available: %" V8_PTR_PREFIX "d, %%%d\n",
2735 Capacity(), Waste(), Available(), pct); 2735 Capacity(), Waste(), Available(), pct);
2736 2736
2737 if (!swept_precisely_) return; 2737 if (!swept_precisely_) return;
2738 if (heap()->mark_compact_collector()->sweeping_in_progress()) {
2739 heap()->mark_compact_collector()->EnsureSweepingCompleted();
2740 }
2738 ClearHistograms(heap()->isolate()); 2741 ClearHistograms(heap()->isolate());
2739 HeapObjectIterator obj_it(this); 2742 HeapObjectIterator obj_it(this);
2740 for (HeapObject* obj = obj_it.Next(); obj != NULL; obj = obj_it.Next()) 2743 for (HeapObject* obj = obj_it.Next(); obj != NULL; obj = obj_it.Next())
2741 CollectHistogramInfo(obj); 2744 CollectHistogramInfo(obj);
2742 ReportHistogram(heap()->isolate(), true); 2745 ReportHistogram(heap()->isolate(), true);
2743 } 2746 }
2744 #endif 2747 #endif
2745 2748
2746 2749
2747 // ----------------------------------------------------------------------------- 2750 // -----------------------------------------------------------------------------
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
3099 object->ShortPrint(); 3102 object->ShortPrint();
3100 PrintF("\n"); 3103 PrintF("\n");
3101 } 3104 }
3102 printf(" --------------------------------------\n"); 3105 printf(" --------------------------------------\n");
3103 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3106 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3104 } 3107 }
3105 3108
3106 #endif // DEBUG 3109 #endif // DEBUG
3107 } 3110 }
3108 } // namespace v8::internal 3111 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | test/heap-unittests/heap-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698