OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2759 * Collection of V8 heap information. | 2759 * Collection of V8 heap information. |
2760 * | 2760 * |
2761 * Instances of this class can be passed to v8::V8::HeapStatistics to | 2761 * Instances of this class can be passed to v8::V8::HeapStatistics to |
2762 * get heap statistics from V8. | 2762 * get heap statistics from V8. |
2763 */ | 2763 */ |
2764 class V8EXPORT HeapStatistics { | 2764 class V8EXPORT HeapStatistics { |
2765 public: | 2765 public: |
2766 HeapStatistics(); | 2766 HeapStatistics(); |
2767 size_t total_heap_size() { return total_heap_size_; } | 2767 size_t total_heap_size() { return total_heap_size_; } |
2768 size_t total_heap_size_executable() { return total_heap_size_executable_; } | 2768 size_t total_heap_size_executable() { return total_heap_size_executable_; } |
2769 size_t total_physical_size() { return total_physical_size_; } | |
2770 size_t used_heap_size() { return used_heap_size_; } | 2769 size_t used_heap_size() { return used_heap_size_; } |
2771 size_t heap_size_limit() { return heap_size_limit_; } | 2770 size_t heap_size_limit() { return heap_size_limit_; } |
2772 | 2771 |
2773 private: | 2772 private: |
2774 void set_total_heap_size(size_t size) { total_heap_size_ = size; } | 2773 void set_total_heap_size(size_t size) { total_heap_size_ = size; } |
2775 void set_total_heap_size_executable(size_t size) { | 2774 void set_total_heap_size_executable(size_t size) { |
2776 total_heap_size_executable_ = size; | 2775 total_heap_size_executable_ = size; |
2777 } | 2776 } |
2778 void set_total_physical_size(size_t size) { | |
2779 total_physical_size_ = size; | |
2780 } | |
2781 void set_used_heap_size(size_t size) { used_heap_size_ = size; } | 2777 void set_used_heap_size(size_t size) { used_heap_size_ = size; } |
2782 void set_heap_size_limit(size_t size) { heap_size_limit_ = size; } | 2778 void set_heap_size_limit(size_t size) { heap_size_limit_ = size; } |
2783 | 2779 |
2784 size_t total_heap_size_; | 2780 size_t total_heap_size_; |
2785 size_t total_heap_size_executable_; | 2781 size_t total_heap_size_executable_; |
2786 size_t total_physical_size_; | |
2787 size_t used_heap_size_; | 2782 size_t used_heap_size_; |
2788 size_t heap_size_limit_; | 2783 size_t heap_size_limit_; |
2789 | 2784 |
2790 friend class V8; | 2785 friend class V8; |
2791 }; | 2786 }; |
2792 | 2787 |
2793 | 2788 |
2794 class RetainedObjectInfo; | 2789 class RetainedObjectInfo; |
2795 | 2790 |
2796 /** | 2791 /** |
(...skipping 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4659 | 4654 |
4660 | 4655 |
4661 } // namespace v8 | 4656 } // namespace v8 |
4662 | 4657 |
4663 | 4658 |
4664 #undef V8EXPORT | 4659 #undef V8EXPORT |
4665 #undef TYPE_CHECK | 4660 #undef TYPE_CHECK |
4666 | 4661 |
4667 | 4662 |
4668 #endif // V8_H_ | 4663 #endif // V8_H_ |
OLD | NEW |