OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 3254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3265 | 3265 |
3266 HeapStatistics::HeapStatistics(): total_heap_size_(0), | 3266 HeapStatistics::HeapStatistics(): total_heap_size_(0), |
3267 total_heap_size_executable_(0), | 3267 total_heap_size_executable_(0), |
3268 used_heap_size_(0) { } | 3268 used_heap_size_(0) { } |
3269 | 3269 |
3270 | 3270 |
3271 void v8::V8::GetHeapStatistics(HeapStatistics* heap_statistics) { | 3271 void v8::V8::GetHeapStatistics(HeapStatistics* heap_statistics) { |
3272 heap_statistics->set_total_heap_size(i::Heap::CommittedMemory()); | 3272 heap_statistics->set_total_heap_size(i::Heap::CommittedMemory()); |
3273 heap_statistics->set_total_heap_size_executable( | 3273 heap_statistics->set_total_heap_size_executable( |
3274 i::Heap::CommittedMemoryExecutable()); | 3274 i::Heap::CommittedMemoryExecutable()); |
3275 heap_statistics->set_used_heap_size(i::Heap::SizeOfObjects()); | 3275 heap_statistics->set_used_heap_size(i::Heap::SizeOfObjectsSlow()); |
3276 } | 3276 } |
3277 | 3277 |
3278 | 3278 |
3279 bool v8::V8::IdleNotification() { | 3279 bool v8::V8::IdleNotification() { |
3280 // Returning true tells the caller that it need not | 3280 // Returning true tells the caller that it need not |
3281 // continue to call IdleNotification. | 3281 // continue to call IdleNotification. |
3282 if (!i::V8::IsRunning()) return true; | 3282 if (!i::V8::IsRunning()) return true; |
3283 return i::V8::IdleNotification(); | 3283 return i::V8::IdleNotification(); |
3284 } | 3284 } |
3285 | 3285 |
(...skipping 1714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5000 | 5000 |
5001 | 5001 |
5002 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 5002 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
5003 HandleScopeImplementer* thread_local = | 5003 HandleScopeImplementer* thread_local = |
5004 reinterpret_cast<HandleScopeImplementer*>(storage); | 5004 reinterpret_cast<HandleScopeImplementer*>(storage); |
5005 thread_local->IterateThis(v); | 5005 thread_local->IterateThis(v); |
5006 return storage + ArchiveSpacePerThread(); | 5006 return storage + ArchiveSpacePerThread(); |
5007 } | 5007 } |
5008 | 5008 |
5009 } } // namespace v8::internal | 5009 } } // namespace v8::internal |
OLD | NEW |