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

Side by Side Diff: src/heap.cc

Issue 3118013: Add last OS error into heap stats. (Closed)
Patch Set: rename errno to os_error Created 10 years, 4 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
« no previous file with comments | « src/heap.h ('k') | src/platform.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4058 matching lines...) Expand 10 before | Expand all | Expand 10 after
4069 *stats->code_space_capacity = code_space_->Capacity(); 4069 *stats->code_space_capacity = code_space_->Capacity();
4070 *stats->map_space_size = map_space_->Size(); 4070 *stats->map_space_size = map_space_->Size();
4071 *stats->map_space_capacity = map_space_->Capacity(); 4071 *stats->map_space_capacity = map_space_->Capacity();
4072 *stats->cell_space_size = cell_space_->Size(); 4072 *stats->cell_space_size = cell_space_->Size();
4073 *stats->cell_space_capacity = cell_space_->Capacity(); 4073 *stats->cell_space_capacity = cell_space_->Capacity();
4074 *stats->lo_space_size = lo_space_->Size(); 4074 *stats->lo_space_size = lo_space_->Size();
4075 GlobalHandles::RecordStats(stats); 4075 GlobalHandles::RecordStats(stats);
4076 *stats->memory_allocator_size = MemoryAllocator::Size(); 4076 *stats->memory_allocator_size = MemoryAllocator::Size();
4077 *stats->memory_allocator_capacity = 4077 *stats->memory_allocator_capacity =
4078 MemoryAllocator::Size() + MemoryAllocator::Available(); 4078 MemoryAllocator::Size() + MemoryAllocator::Available();
4079 *stats->os_error = OS::GetLastError();
4079 if (take_snapshot) { 4080 if (take_snapshot) {
4080 HeapIterator iterator; 4081 HeapIterator iterator;
4081 for (HeapObject* obj = iterator.next(); 4082 for (HeapObject* obj = iterator.next();
4082 obj != NULL; 4083 obj != NULL;
4083 obj = iterator.next()) { 4084 obj = iterator.next()) {
4084 // Note: snapshot won't be precise because IsFreeListNode returns true 4085 // Note: snapshot won't be precise because IsFreeListNode returns true
4085 // for any bytearray. 4086 // for any bytearray.
4086 if (FreeListNode::IsFreeListNode(obj)) continue; 4087 if (FreeListNode::IsFreeListNode(obj)) continue;
4087 InstanceType type = obj->map()->instance_type(); 4088 InstanceType type = obj->map()->instance_type();
4088 ASSERT(0 <= type && type <= LAST_TYPE); 4089 ASSERT(0 <= type && type <= LAST_TYPE);
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
4957 void ExternalStringTable::TearDown() { 4958 void ExternalStringTable::TearDown() {
4958 new_space_strings_.Free(); 4959 new_space_strings_.Free();
4959 old_space_strings_.Free(); 4960 old_space_strings_.Free();
4960 } 4961 }
4961 4962
4962 4963
4963 List<Object*> ExternalStringTable::new_space_strings_; 4964 List<Object*> ExternalStringTable::new_space_strings_;
4964 List<Object*> ExternalStringTable::old_space_strings_; 4965 List<Object*> ExternalStringTable::old_space_strings_;
4965 4966
4966 } } // namespace v8::internal 4967 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698