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

Side by Side Diff: src/heap/heap.h

Issue 1058253003: Adding V8 api to get memory statistics of spaces in V8::Heap. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Adding new APIs for space statistics. Created 5 years, 8 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_HEAP_H_ 5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_ 6 #define V8_HEAP_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 return map_space(); 654 return map_space();
655 case CODE_SPACE: 655 case CODE_SPACE:
656 return code_space(); 656 return code_space();
657 case NEW_SPACE: 657 case NEW_SPACE:
658 case LO_SPACE: 658 case LO_SPACE:
659 UNREACHABLE(); 659 UNREACHABLE();
660 } 660 }
661 return NULL; 661 return NULL;
662 } 662 }
663 663
664 // Returns name of the space.
665 const char* GetSpaceName(int idx);
666
664 bool always_allocate() { return always_allocate_scope_depth_ != 0; } 667 bool always_allocate() { return always_allocate_scope_depth_ != 0; }
665 Address always_allocate_scope_depth_address() { 668 Address always_allocate_scope_depth_address() {
666 return reinterpret_cast<Address>(&always_allocate_scope_depth_); 669 return reinterpret_cast<Address>(&always_allocate_scope_depth_);
667 } 670 }
668 671
669 Address* NewSpaceAllocationTopAddress() { 672 Address* NewSpaceAllocationTopAddress() {
670 return new_space_.allocation_top_address(); 673 return new_space_.allocation_top_address();
671 } 674 }
672 Address* NewSpaceAllocationLimitAddress() { 675 Address* NewSpaceAllocationLimitAddress() {
673 return new_space_.allocation_limit_address(); 676 return new_space_.allocation_limit_address();
(...skipping 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after
2598 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2601 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2599 2602
2600 private: 2603 private:
2601 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2604 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2602 }; 2605 };
2603 #endif // DEBUG 2606 #endif // DEBUG
2604 } 2607 }
2605 } // namespace v8::internal 2608 } // namespace v8::internal
2606 2609
2607 #endif // V8_HEAP_HEAP_H_ 2610 #endif // V8_HEAP_HEAP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698