OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 3256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3267 return true; | 3267 return true; |
3268 } | 3268 } |
3269 | 3269 |
3270 | 3270 |
3271 bool Heap::ConfigureHeapDefault() { | 3271 bool Heap::ConfigureHeapDefault() { |
3272 return ConfigureHeap(FLAG_max_new_space_size / 2, FLAG_max_old_space_size); | 3272 return ConfigureHeap(FLAG_max_new_space_size / 2, FLAG_max_old_space_size); |
3273 } | 3273 } |
3274 | 3274 |
3275 | 3275 |
3276 void Heap::RecordStats(HeapStats* stats) { | 3276 void Heap::RecordStats(HeapStats* stats) { |
3277 stats->new_space_size = new_space_.Size(); | 3277 *stats->start_marker = 0xDECADE00; |
3278 stats->new_space_capacity = new_space_.Capacity(); | 3278 *stats->end_marker = 0xDECADE01; |
3279 stats->old_pointer_space_size = old_pointer_space_->Size(); | 3279 *stats->new_space_size = new_space_.Size(); |
3280 stats->old_pointer_space_capacity = old_pointer_space_->Capacity(); | 3280 *stats->new_space_capacity = new_space_.Capacity(); |
3281 stats->old_data_space_size = old_data_space_->Size(); | 3281 *stats->old_pointer_space_size = old_pointer_space_->Size(); |
3282 stats->old_data_space_capacity = old_data_space_->Capacity(); | 3282 *stats->old_pointer_space_capacity = old_pointer_space_->Capacity(); |
3283 stats->code_space_size = code_space_->Size(); | 3283 *stats->old_data_space_size = old_data_space_->Size(); |
3284 stats->code_space_capacity = code_space_->Capacity(); | 3284 *stats->old_data_space_capacity = old_data_space_->Capacity(); |
3285 stats->map_space_size = map_space_->Size(); | 3285 *stats->code_space_size = code_space_->Size(); |
3286 stats->map_space_capacity = map_space_->Capacity(); | 3286 *stats->code_space_capacity = code_space_->Capacity(); |
3287 stats->cell_space_size = cell_space_->Size(); | 3287 *stats->map_space_size = map_space_->Size(); |
3288 stats->cell_space_capacity = cell_space_->Capacity(); | 3288 *stats->map_space_capacity = map_space_->Capacity(); |
3289 stats->lo_space_size = lo_space_->Size(); | 3289 *stats->cell_space_size = cell_space_->Size(); |
| 3290 *stats->cell_space_capacity = cell_space_->Capacity(); |
| 3291 *stats->lo_space_size = lo_space_->Size(); |
3290 GlobalHandles::RecordStats(stats); | 3292 GlobalHandles::RecordStats(stats); |
3291 } | 3293 } |
3292 | 3294 |
3293 | 3295 |
3294 int Heap::PromotedSpaceSize() { | 3296 int Heap::PromotedSpaceSize() { |
3295 return old_pointer_space_->Size() | 3297 return old_pointer_space_->Size() |
3296 + old_data_space_->Size() | 3298 + old_data_space_->Size() |
3297 + code_space_->Size() | 3299 + code_space_->Size() |
3298 + map_space_->Size() | 3300 + map_space_->Size() |
3299 + cell_space_->Size() | 3301 + cell_space_->Size() |
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3983 for (int i = 0; i < kNumberOfCaches; i++) { | 3985 for (int i = 0; i < kNumberOfCaches; i++) { |
3984 if (caches_[i] != NULL) { | 3986 if (caches_[i] != NULL) { |
3985 delete caches_[i]; | 3987 delete caches_[i]; |
3986 caches_[i] = NULL; | 3988 caches_[i] = NULL; |
3987 } | 3989 } |
3988 } | 3990 } |
3989 } | 3991 } |
3990 | 3992 |
3991 | 3993 |
3992 } } // namespace v8::internal | 3994 } } // namespace v8::internal |
OLD | NEW |