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

Unified Diff: src/heap/spaces.cc

Issue 1867383002: Revert of Fix printf formats (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/ia32/disasm-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.cc
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
index 8fc9ff703e4ea97daa1bed3eefbb021ee474a9e0..f1029c4d7d7f4628526f673a1791bf4251d1ec09 100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -882,7 +882,10 @@
void MemoryAllocator::ReportStatistics() {
intptr_t size = Size();
float pct = static_cast<float>(capacity_ - size) / capacity_;
- PrintF(" capacity: %" V8PRIdPTR ", used: %" V8PRIdPTR
+ PrintF(" capacity: %" V8_PTR_PREFIX
+ "d"
+ ", used: %" V8_PTR_PREFIX
+ "d"
", available: %%%d\n\n",
capacity_, size, static_cast<int>(pct * 100));
}
@@ -2039,7 +2042,9 @@
#ifdef DEBUG
if (FLAG_heap_stats) {
float pct = static_cast<float>(Available()) / TotalCapacity();
- PrintF(" capacity: %" V8PRIdPTR ", available: %" V8PRIdPTR ", %%%d\n",
+ PrintF(" capacity: %" V8_PTR_PREFIX
+ "d"
+ ", available: %" V8_PTR_PREFIX "d, %%%d\n",
TotalCapacity(), Available(), static_cast<int>(pct * 100));
PrintF("\n Object Histogram:\n");
for (int i = 0; i <= LAST_TYPE; i++) {
@@ -2765,8 +2770,11 @@
void PagedSpace::ReportStatistics() {
int pct = static_cast<int>(Available() * 100 / Capacity());
- PrintF(" capacity: %" V8PRIdPTR ", waste: %" V8PRIdPTR
- ", available: %" V8PRIdPTR ", %%%d\n",
+ PrintF(" capacity: %" V8_PTR_PREFIX
+ "d"
+ ", waste: %" V8_PTR_PREFIX
+ "d"
+ ", available: %" V8_PTR_PREFIX "d, %%%d\n",
Capacity(), Waste(), Available(), pct);
if (heap()->mark_compact_collector()->sweeping_in_progress()) {
@@ -3067,7 +3075,7 @@
void LargeObjectSpace::ReportStatistics() {
- PrintF(" size: %" V8PRIdPTR "\n", size_);
+ PrintF(" size: %" V8_PTR_PREFIX "d\n", size_);
int num_objects = 0;
ClearHistograms(heap()->isolate());
LargeObjectIterator it(this);
@@ -3078,7 +3086,7 @@
PrintF(
" number of objects %d, "
- "size of objects %" V8PRIdPTR "\n",
+ "size of objects %" V8_PTR_PREFIX "d\n",
num_objects, objects_size_);
if (num_objects > 0) ReportHistogram(heap()->isolate(), false);
}
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/ia32/disasm-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698