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

Unified Diff: src/heap/spaces.cc

Issue 1872203005: Fix printf formats (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix unused param found by GC mole 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 82370f50664c9dfc9be356617aede01711ffce9f..7fd4361da484a5b2b97167526b341b0bee0ac6b1 100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -882,10 +882,7 @@ void MemoryAllocator::RemoveMemoryAllocationCallback(
void MemoryAllocator::ReportStatistics() {
intptr_t size = Size();
float pct = static_cast<float>(capacity_ - size) / capacity_;
- PrintF(" capacity: %" V8_PTR_PREFIX
- "d"
- ", used: %" V8_PTR_PREFIX
- "d"
+ PrintF(" capacity: %" V8PRIdPTR ", used: %" V8PRIdPTR
", available: %%%d\n\n",
capacity_, size, static_cast<int>(pct * 100));
}
@@ -2062,9 +2059,7 @@ void NewSpace::ReportStatistics() {
#ifdef DEBUG
if (FLAG_heap_stats) {
float pct = static_cast<float>(Available()) / TotalCapacity();
- PrintF(" capacity: %" V8_PTR_PREFIX
- "d"
- ", available: %" V8_PTR_PREFIX "d, %%%d\n",
+ PrintF(" capacity: %" V8PRIdPTR ", available: %" V8PRIdPTR ", %%%d\n",
TotalCapacity(), Available(), static_cast<int>(pct * 100));
PrintF("\n Object Histogram:\n");
for (int i = 0; i <= LAST_TYPE; i++) {
@@ -2790,11 +2785,8 @@ void PagedSpace::CollectCodeStatistics() {
void PagedSpace::ReportStatistics() {
int pct = static_cast<int>(Available() * 100 / Capacity());
- PrintF(" capacity: %" V8_PTR_PREFIX
- "d"
- ", waste: %" V8_PTR_PREFIX
- "d"
- ", available: %" V8_PTR_PREFIX "d, %%%d\n",
+ PrintF(" capacity: %" V8PRIdPTR ", waste: %" V8PRIdPTR
+ ", available: %" V8PRIdPTR ", %%%d\n",
Capacity(), Waste(), Available(), pct);
if (heap()->mark_compact_collector()->sweeping_in_progress()) {
@@ -3090,7 +3082,7 @@ void LargeObjectSpace::Print() {
void LargeObjectSpace::ReportStatistics() {
- PrintF(" size: %" V8_PTR_PREFIX "d\n", size_);
+ PrintF(" size: %" V8PRIdPTR "\n", size_);
int num_objects = 0;
ClearHistograms(heap()->isolate());
LargeObjectIterator it(this);
@@ -3101,7 +3093,7 @@ void LargeObjectSpace::ReportStatistics() {
PrintF(
" number of objects %d, "
- "size of objects %" V8_PTR_PREFIX "d\n",
+ "size of objects %" V8PRIdPTR "\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