| OLD | NEW |
| 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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 if (FLAG_code_stats) ReportCodeStatistics("After GC"); | 433 if (FLAG_code_stats) ReportCodeStatistics("After GC"); |
| 434 #endif | 434 #endif |
| 435 | 435 |
| 436 isolate_->counters()->alive_after_last_gc()->Set( | 436 isolate_->counters()->alive_after_last_gc()->Set( |
| 437 static_cast<int>(SizeOfObjects())); | 437 static_cast<int>(SizeOfObjects())); |
| 438 | 438 |
| 439 isolate_->counters()->symbol_table_capacity()->Set( | 439 isolate_->counters()->symbol_table_capacity()->Set( |
| 440 symbol_table()->Capacity()); | 440 symbol_table()->Capacity()); |
| 441 isolate_->counters()->number_of_symbols()->Set( | 441 isolate_->counters()->number_of_symbols()->Set( |
| 442 symbol_table()->NumberOfElements()); | 442 symbol_table()->NumberOfElements()); |
| 443 |
| 444 isolate_->counters()->new_space_bytes_used()->Set( |
| 445 static_cast<int>(new_space()->SizeOfObjects())); |
| 446 isolate_->counters()->old_pointer_space_bytes_used()->Set( |
| 447 static_cast<int>(old_pointer_space()->SizeOfObjects())); |
| 448 isolate_->counters()->old_data_space_bytes_used()->Set( |
| 449 static_cast<int>(old_data_space()->SizeOfObjects())); |
| 450 isolate_->counters()->code_space_bytes_used()->Set( |
| 451 static_cast<int>(code_space()->SizeOfObjects())); |
| 452 isolate_->counters()->map_space_bytes_used()->Set( |
| 453 static_cast<int>(map_space()->SizeOfObjects())); |
| 454 isolate_->counters()->cell_space_bytes_used()->Set( |
| 455 static_cast<int>(cell_space()->SizeOfObjects())); |
| 456 isolate_->counters()->lo_space_bytes_used()->Set( |
| 457 static_cast<int>(lo_space()->SizeOfObjects())); |
| 458 |
| 443 #if defined(DEBUG) | 459 #if defined(DEBUG) |
| 444 ReportStatisticsAfterGC(); | 460 ReportStatisticsAfterGC(); |
| 445 #endif // DEBUG | 461 #endif // DEBUG |
| 446 #ifdef ENABLE_DEBUGGER_SUPPORT | 462 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 447 isolate_->debug()->AfterGarbageCollection(); | 463 isolate_->debug()->AfterGarbageCollection(); |
| 448 #endif // ENABLE_DEBUGGER_SUPPORT | 464 #endif // ENABLE_DEBUGGER_SUPPORT |
| 449 } | 465 } |
| 450 | 466 |
| 451 | 467 |
| 452 void Heap::CollectAllGarbage(int flags, const char* gc_reason) { | 468 void Heap::CollectAllGarbage(int flags, const char* gc_reason) { |
| (...skipping 6714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7167 } else { | 7183 } else { |
| 7168 p ^= 0x1d1ed & (Page::kPageSize - 1); // I died. | 7184 p ^= 0x1d1ed & (Page::kPageSize - 1); // I died. |
| 7169 } | 7185 } |
| 7170 remembered_unmapped_pages_[remembered_unmapped_pages_index_] = | 7186 remembered_unmapped_pages_[remembered_unmapped_pages_index_] = |
| 7171 reinterpret_cast<Address>(p); | 7187 reinterpret_cast<Address>(p); |
| 7172 remembered_unmapped_pages_index_++; | 7188 remembered_unmapped_pages_index_++; |
| 7173 remembered_unmapped_pages_index_ %= kRememberedUnmappedPages; | 7189 remembered_unmapped_pages_index_ %= kRememberedUnmappedPages; |
| 7174 } | 7190 } |
| 7175 | 7191 |
| 7176 } } // namespace v8::internal | 7192 } } // namespace v8::internal |
| OLD | NEW |