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

Side by Side Diff: src/heap.cc

Issue 10974006: Improve --trace-gc-verbose to show sum of all spaces. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Ulan Degenbaev. Created 8 years, 3 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 ", committed: %6" V8_PTR_PREFIX "d KB\n", 364 ", committed: %6" V8_PTR_PREFIX "d KB\n",
365 cell_space_->SizeOfObjects() / KB, 365 cell_space_->SizeOfObjects() / KB,
366 cell_space_->Available() / KB, 366 cell_space_->Available() / KB,
367 cell_space_->CommittedMemory() / KB); 367 cell_space_->CommittedMemory() / KB);
368 PrintPID("Large object space, used: %6" V8_PTR_PREFIX "d KB" 368 PrintPID("Large object space, used: %6" V8_PTR_PREFIX "d KB"
369 ", available: %6" V8_PTR_PREFIX "d KB" 369 ", available: %6" V8_PTR_PREFIX "d KB"
370 ", committed: %6" V8_PTR_PREFIX "d KB\n", 370 ", committed: %6" V8_PTR_PREFIX "d KB\n",
371 lo_space_->SizeOfObjects() / KB, 371 lo_space_->SizeOfObjects() / KB,
372 lo_space_->Available() / KB, 372 lo_space_->Available() / KB,
373 lo_space_->CommittedMemory() / KB); 373 lo_space_->CommittedMemory() / KB);
374 PrintPID("All spaces, used: %6" V8_PTR_PREFIX "d KB"
375 ", available: %6" V8_PTR_PREFIX "d KB"
376 ", committed: %6" V8_PTR_PREFIX "d KB\n",
377 this->SizeOfObjects() / KB,
378 this->Available() / KB,
379 this->CommittedMemory() / KB);
374 PrintPID("Total time spent in GC : %d ms\n", total_gc_time_ms_); 380 PrintPID("Total time spent in GC : %d ms\n", total_gc_time_ms_);
375 } 381 }
376 382
377 383
378 // TODO(1238405): Combine the infrastructure for --heap-stats and 384 // TODO(1238405): Combine the infrastructure for --heap-stats and
379 // --log-gc to avoid the complicated preprocessor and flag testing. 385 // --log-gc to avoid the complicated preprocessor and flag testing.
380 void Heap::ReportStatisticsAfterGC() { 386 void Heap::ReportStatisticsAfterGC() {
381 // Similar to the before GC, we use some complicated logic to ensure that 387 // Similar to the before GC, we use some complicated logic to ensure that
382 // NewSpace statistics are logged exactly once when --log-gc is turned on. 388 // NewSpace statistics are logged exactly once when --log-gc is turned on.
383 #if defined(DEBUG) 389 #if defined(DEBUG)
(...skipping 6936 matching lines...) Expand 10 before | Expand all | Expand 10 after
7320 static_cast<int>(object_sizes_last_time_[index])); 7326 static_cast<int>(object_sizes_last_time_[index]));
7321 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) 7327 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT)
7322 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7328 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7323 7329
7324 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7330 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7325 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7331 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7326 ClearObjectStats(); 7332 ClearObjectStats();
7327 } 7333 }
7328 7334
7329 } } // namespace v8::internal 7335 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698