| 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 6379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6390 | 6390 |
| 6391 int64_t Heap::PromotedExternalMemorySize() { | 6391 int64_t Heap::PromotedExternalMemorySize() { |
| 6392 if (amount_of_external_allocated_memory_ | 6392 if (amount_of_external_allocated_memory_ |
| 6393 <= amount_of_external_allocated_memory_at_last_global_gc_) return 0; | 6393 <= amount_of_external_allocated_memory_at_last_global_gc_) return 0; |
| 6394 return amount_of_external_allocated_memory_ | 6394 return amount_of_external_allocated_memory_ |
| 6395 - amount_of_external_allocated_memory_at_last_global_gc_; | 6395 - amount_of_external_allocated_memory_at_last_global_gc_; |
| 6396 } | 6396 } |
| 6397 | 6397 |
| 6398 | 6398 |
| 6399 void Heap::EnableInlineAllocation() { | 6399 void Heap::EnableInlineAllocation() { |
| 6400 ASSERT(inline_allocation_disabled_); | 6400 if (!inline_allocation_disabled_) return; |
| 6401 inline_allocation_disabled_ = false; | 6401 inline_allocation_disabled_ = false; |
| 6402 | 6402 |
| 6403 // Update inline allocation limit for new space. | 6403 // Update inline allocation limit for new space. |
| 6404 new_space()->UpdateInlineAllocationLimit(0); | 6404 new_space()->UpdateInlineAllocationLimit(0); |
| 6405 } | 6405 } |
| 6406 | 6406 |
| 6407 | 6407 |
| 6408 void Heap::DisableInlineAllocation() { | 6408 void Heap::DisableInlineAllocation() { |
| 6409 ASSERT(!inline_allocation_disabled_); | 6409 if (inline_allocation_disabled_) return; |
| 6410 inline_allocation_disabled_ = true; | 6410 inline_allocation_disabled_ = true; |
| 6411 | 6411 |
| 6412 // Update inline allocation limit for new space. | 6412 // Update inline allocation limit for new space. |
| 6413 new_space()->UpdateInlineAllocationLimit(0); | 6413 new_space()->UpdateInlineAllocationLimit(0); |
| 6414 | 6414 |
| 6415 // Update inline allocation limit for old spaces. | 6415 // Update inline allocation limit for old spaces. |
| 6416 PagedSpaces spaces(this); | 6416 PagedSpaces spaces(this); |
| 6417 for (PagedSpace* space = spaces.next(); | 6417 for (PagedSpace* space = spaces.next(); |
| 6418 space != NULL; | 6418 space != NULL; |
| 6419 space = spaces.next()) { | 6419 space = spaces.next()) { |
| (...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7741 static_cast<int>(object_sizes_last_time_[index])); | 7741 static_cast<int>(object_sizes_last_time_[index])); |
| 7742 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 7742 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 7743 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7743 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 7744 | 7744 |
| 7745 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7745 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 7746 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7746 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 7747 ClearObjectStats(); | 7747 ClearObjectStats(); |
| 7748 } | 7748 } |
| 7749 | 7749 |
| 7750 } } // namespace v8::internal | 7750 } } // namespace v8::internal |
| OLD | NEW |