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

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: Made changes. 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
« no previous file with comments | « src/api.cc ('k') | src/heap/heap.cc » ('j') | src/heap/heap.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 case MAP_SPACE: 657 case MAP_SPACE:
658 return map_space(); 658 return map_space();
659 case CODE_SPACE: 659 case CODE_SPACE:
660 return code_space(); 660 return code_space();
661 case NEW_SPACE: 661 case NEW_SPACE:
662 case LO_SPACE: 662 case LO_SPACE:
663 UNREACHABLE(); 663 UNREACHABLE();
664 } 664 }
665 return NULL; 665 return NULL;
666 } 666 }
667 Space* space(int idx) {
668 switch (idx) {
669 case NEW_SPACE:
670 return new_space();
671 case LO_SPACE:
672 return lo_space();
673 default:
674 return paged_space(idx);
675 }
676 }
677
678 // Returns name of the space.
679 const char* GetSpaceName(int idx);
667 680
668 bool always_allocate() { return always_allocate_scope_depth_ != 0; } 681 bool always_allocate() { return always_allocate_scope_depth_ != 0; }
669 Address always_allocate_scope_depth_address() { 682 Address always_allocate_scope_depth_address() {
670 return reinterpret_cast<Address>(&always_allocate_scope_depth_); 683 return reinterpret_cast<Address>(&always_allocate_scope_depth_);
671 } 684 }
672 685
673 Address* NewSpaceAllocationTopAddress() { 686 Address* NewSpaceAllocationTopAddress() {
674 return new_space_.allocation_top_address(); 687 return new_space_.allocation_top_address();
675 } 688 }
676 Address* NewSpaceAllocationLimitAddress() { 689 Address* NewSpaceAllocationLimitAddress() {
(...skipping 1949 matching lines...) Expand 10 before | Expand all | Expand 10 after
2626 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2639 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2627 2640
2628 private: 2641 private:
2629 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2642 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2630 }; 2643 };
2631 #endif // DEBUG 2644 #endif // DEBUG
2632 } 2645 }
2633 } // namespace v8::internal 2646 } // namespace v8::internal
2634 2647
2635 #endif // V8_HEAP_HEAP_H_ 2648 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/heap/heap.cc » ('j') | src/heap/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698