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

Unified Diff: src/heap/heap.cc

Issue 1869433004: Fix printf formats (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address review comments. 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/gc-tracer.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index a2daab0925c8aed2c30842bf041bdf4583d60bdd..ede2e4338c6b621063309d2727bea106454aa305 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -343,61 +343,59 @@ void Heap::ReportStatisticsBeforeGC() {
void Heap::PrintShortHeapStatistics() {
if (!FLAG_trace_gc_verbose) return;
- PrintIsolate(isolate_, "Memory allocator, used: %6" V8_PTR_PREFIX
- "d KB"
- ", available: %6" V8_PTR_PREFIX "d KB\n",
+ PrintIsolate(isolate_, "Memory allocator, used: %6" V8PRIdPTR
+ " KB, available: %6" V8PRIdPTR " KB\n",
memory_allocator()->Size() / KB,
memory_allocator()->Available() / KB);
- PrintIsolate(isolate_, "New space, used: %6" V8_PTR_PREFIX
- "d KB"
- ", available: %6" V8_PTR_PREFIX
- "d KB"
- ", committed: %6" V8_PTR_PREFIX "d KB\n",
+ PrintIsolate(isolate_, "New space, used: %6" V8PRIdPTR
+ " KB"
+ ", available: %6" V8PRIdPTR
+ " KB"
+ ", committed: %6" V8PRIdPTR " KB\n",
new_space_.Size() / KB, new_space_.Available() / KB,
new_space_.CommittedMemory() / KB);
- PrintIsolate(isolate_, "Old space, used: %6" V8_PTR_PREFIX
- "d KB"
- ", available: %6" V8_PTR_PREFIX
- "d KB"
- ", committed: %6" V8_PTR_PREFIX "d KB\n",
+ PrintIsolate(isolate_, "Old space, used: %6" V8PRIdPTR
+ " KB"
+ ", available: %6" V8PRIdPTR
+ " KB"
+ ", committed: %6" V8PRIdPTR " KB\n",
old_space_->SizeOfObjects() / KB, old_space_->Available() / KB,
old_space_->CommittedMemory() / KB);
- PrintIsolate(isolate_, "Code space, used: %6" V8_PTR_PREFIX
- "d KB"
- ", available: %6" V8_PTR_PREFIX
- "d KB"
- ", committed: %6" V8_PTR_PREFIX "d KB\n",
+ PrintIsolate(isolate_, "Code space, used: %6" V8PRIdPTR
+ " KB"
+ ", available: %6" V8PRIdPTR
+ " KB"
+ ", committed: %6" V8PRIdPTR " KB\n",
code_space_->SizeOfObjects() / KB, code_space_->Available() / KB,
code_space_->CommittedMemory() / KB);
- PrintIsolate(isolate_, "Map space, used: %6" V8_PTR_PREFIX
- "d KB"
- ", available: %6" V8_PTR_PREFIX
- "d KB"
- ", committed: %6" V8_PTR_PREFIX "d KB\n",
+ PrintIsolate(isolate_, "Map space, used: %6" V8PRIdPTR
+ " KB"
+ ", available: %6" V8PRIdPTR
+ " KB"
+ ", committed: %6" V8PRIdPTR " KB\n",
map_space_->SizeOfObjects() / KB, map_space_->Available() / KB,
map_space_->CommittedMemory() / KB);
- PrintIsolate(isolate_, "Large object space, used: %6" V8_PTR_PREFIX
- "d KB"
- ", available: %6" V8_PTR_PREFIX
- "d KB"
- ", committed: %6" V8_PTR_PREFIX "d KB\n",
+ PrintIsolate(isolate_, "Large object space, used: %6" V8PRIdPTR
+ " KB"
+ ", available: %6" V8PRIdPTR
+ " KB"
+ ", committed: %6" V8PRIdPTR " KB\n",
lo_space_->SizeOfObjects() / KB, lo_space_->Available() / KB,
lo_space_->CommittedMemory() / KB);
- PrintIsolate(isolate_, "All spaces, used: %6" V8_PTR_PREFIX
- "d KB"
- ", available: %6" V8_PTR_PREFIX
- "d KB"
- ", committed: %6" V8_PTR_PREFIX "d KB\n",
+ PrintIsolate(isolate_, "All spaces, used: %6" V8PRIdPTR
+ " KB"
+ ", available: %6" V8PRIdPTR
+ " KB"
+ ", committed: %6" V8PRIdPTR " KB\n",
this->SizeOfObjects() / KB, this->Available() / KB,
this->CommittedMemory() / KB);
PrintIsolate(
- isolate_, "External memory reported: %6" V8_PTR_PREFIX "d KB\n",
+ isolate_, "External memory reported: %6" V8PRIdPTR " KB\n",
static_cast<intptr_t>(amount_of_external_allocated_memory_ / KB));
PrintIsolate(isolate_, "Total time spent in GC : %.1f ms\n",
total_gc_time_ms_);
}
-
// TODO(1238405): Combine the infrastructure for --heap-stats and
// --log-gc to avoid the complicated preprocessor and flag testing.
void Heap::ReportStatisticsAfterGC() {
@@ -4483,7 +4481,7 @@ void Heap::ReportHeapStatistics(const char* title) {
USE(title);
PrintF(">>>>>> =============== %s (%d) =============== >>>>>>\n", title,
gc_count_);
- PrintF("old_generation_allocation_limit_ %" V8_PTR_PREFIX "d\n",
+ PrintF("old_generation_allocation_limit_ %" V8PRIdPTR "\n",
old_generation_allocation_limit_);
PrintF("\n");
@@ -5150,8 +5148,8 @@ void Heap::SetOldGenerationAllocationLimit(intptr_t old_gen_size,
CalculateOldGenerationAllocationLimit(factor, old_gen_size);
if (FLAG_trace_gc_verbose) {
- PrintIsolate(isolate_, "Grow: old size: %" V8_PTR_PREFIX
- "d KB, new limit: %" V8_PTR_PREFIX "d KB (%.1f)\n",
+ PrintIsolate(isolate_, "Grow: old size: %" V8PRIdPTR
+ " KB, new limit: %" V8PRIdPTR " KB (%.1f)\n",
old_gen_size / KB, old_generation_allocation_limit_ / KB,
factor);
}
@@ -5165,10 +5163,10 @@ void Heap::DampenOldGenerationAllocationLimit(intptr_t old_gen_size,
intptr_t limit = CalculateOldGenerationAllocationLimit(factor, old_gen_size);
if (limit < old_generation_allocation_limit_) {
if (FLAG_trace_gc_verbose) {
- PrintIsolate(isolate_, "Dampen: old size: %" V8_PTR_PREFIX
- "d KB, old limit: %" V8_PTR_PREFIX
- "d KB, "
- "new limit: %" V8_PTR_PREFIX "d KB (%.1f)\n",
+ PrintIsolate(isolate_,
+ "Dampen: old size: %" V8PRIdPTR " KB, old limit: %" V8PRIdPTR
+ " KB, "
+ "new limit: %" V8PRIdPTR " KB (%.1f)\n",
old_gen_size / KB, old_generation_allocation_limit_ / KB,
limit / KB, factor);
}
@@ -5393,7 +5391,7 @@ void Heap::TearDown() {
PrintF("max_gc_pause=%.1f ", get_max_gc_pause());
PrintF("total_gc_time=%.1f ", total_gc_time_ms_);
PrintF("min_in_mutator=%.1f ", get_min_in_mutator());
- PrintF("max_alive_after_gc=%" V8_PTR_PREFIX "d ", get_max_alive_after_gc());
+ PrintF("max_alive_after_gc=%" V8PRIdPTR " ", get_max_alive_after_gc());
PrintF("total_marking_time=%.1f ", tracer()->cumulative_marking_duration());
PrintF("total_sweeping_time=%.1f ",
tracer()->cumulative_sweeping_duration());
@@ -5402,17 +5400,17 @@ void Heap::TearDown() {
if (FLAG_print_max_heap_committed) {
PrintF("\n");
- PrintF("maximum_committed_by_heap=%" V8_PTR_PREFIX "d ",
+ PrintF("maximum_committed_by_heap=%" V8PRIdPTR " ",
MaximumCommittedMemory());
- PrintF("maximum_committed_by_new_space=%" V8_PTR_PREFIX "d ",
+ PrintF("maximum_committed_by_new_space=%" V8PRIdPTR " ",
new_space_.MaximumCommittedMemory());
- PrintF("maximum_committed_by_old_space=%" V8_PTR_PREFIX "d ",
+ PrintF("maximum_committed_by_old_space=%" V8PRIdPTR " ",
old_space_->MaximumCommittedMemory());
- PrintF("maximum_committed_by_code_space=%" V8_PTR_PREFIX "d ",
+ PrintF("maximum_committed_by_code_space=%" V8PRIdPTR " ",
code_space_->MaximumCommittedMemory());
- PrintF("maximum_committed_by_map_space=%" V8_PTR_PREFIX "d ",
+ PrintF("maximum_committed_by_map_space=%" V8PRIdPTR " ",
map_space_->MaximumCommittedMemory());
- PrintF("maximum_committed_by_lo_space=%" V8_PTR_PREFIX "d ",
+ PrintF("maximum_committed_by_lo_space=%" V8PRIdPTR " ",
lo_space_->MaximumCommittedMemory());
PrintF("\n\n");
}
« no previous file with comments | « src/heap/gc-tracer.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698