OLD | NEW |
---|---|
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 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
6 * | 6 * |
7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
8 * | 8 * |
9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
(...skipping 4835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4846 | 4846 |
4847 /** | 4847 /** |
4848 * Collection of V8 heap information. | 4848 * Collection of V8 heap information. |
4849 * | 4849 * |
4850 * Instances of this class can be passed to v8::V8::HeapStatistics to | 4850 * Instances of this class can be passed to v8::V8::HeapStatistics to |
4851 * get heap statistics from V8. | 4851 * get heap statistics from V8. |
4852 */ | 4852 */ |
4853 class V8_EXPORT HeapStatistics { | 4853 class V8_EXPORT HeapStatistics { |
4854 public: | 4854 public: |
4855 HeapStatistics(); | 4855 HeapStatistics(); |
4856 | |
4857 class SpaceStatistics { | |
4858 public: | |
4859 size_t size() { return size_of_objects_; } | |
4860 size_t committed_memory() { return committed_memory_; } | |
4861 size_t avalable() { return available_memory_; } | |
4862 | |
4863 private: | |
4864 size_t size_of_objects_; | |
4865 size_t committed_memory_; | |
4866 size_t available_memory_; | |
4867 | |
4868 friend class HeapStatisticsHelper; | |
4869 }; | |
4870 | |
4856 size_t total_heap_size() { return total_heap_size_; } | 4871 size_t total_heap_size() { return total_heap_size_; } |
4857 size_t total_heap_size_executable() { return total_heap_size_executable_; } | 4872 size_t total_heap_size_executable() { return total_heap_size_executable_; } |
4858 size_t total_physical_size() { return total_physical_size_; } | 4873 size_t total_physical_size() { return total_physical_size_; } |
4859 size_t used_heap_size() { return used_heap_size_; } | 4874 size_t used_heap_size() { return used_heap_size_; } |
4860 size_t heap_size_limit() { return heap_size_limit_; } | 4875 size_t heap_size_limit() { return heap_size_limit_; } |
4861 | 4876 |
4877 SpaceStatistics* new_space_statistics() { return &new_space_stats_; } | |
4878 SpaceStatistics* old_space_statistics() { return &old_space_stats_; } | |
4879 SpaceStatistics* code_space_statistics() { return &code_space_stats_; } | |
4880 SpaceStatistics* map_space_statistics() { return &map_space_stats_; } | |
4881 SpaceStatistics* cell_space_statistics() { return &cell_space_stats_; } | |
4882 SpaceStatistics* lo_space_statistics() { return &lo_space_stats_; } | |
4883 | |
4862 private: | 4884 private: |
4863 size_t total_heap_size_; | 4885 size_t total_heap_size_; |
4864 size_t total_heap_size_executable_; | 4886 size_t total_heap_size_executable_; |
4865 size_t total_physical_size_; | 4887 size_t total_physical_size_; |
4866 size_t used_heap_size_; | 4888 size_t used_heap_size_; |
4867 size_t heap_size_limit_; | 4889 size_t heap_size_limit_; |
4868 | 4890 |
4869 friend class V8; | 4891 SpaceStatistics new_space_stats_; |
4892 SpaceStatistics old_space_stats_; | |
4893 SpaceStatistics code_space_stats_; | |
4894 SpaceStatistics map_space_stats_; | |
4895 SpaceStatistics cell_space_stats_; | |
4896 SpaceStatistics lo_space_stats_; | |
rmcilroy
2015/04/13 12:48:23
Maybe we want to make this a bit more opaque to av
| |
4897 | |
4898 friend class HeapStatisticsHelper; | |
4870 friend class Isolate; | 4899 friend class Isolate; |
4871 }; | 4900 }; |
4872 | 4901 |
4873 | 4902 |
4874 class RetainedObjectInfo; | 4903 class RetainedObjectInfo; |
4875 | 4904 |
4876 | 4905 |
4877 /** | 4906 /** |
4878 * FunctionEntryHook is the type of the profile entry hook called at entry to | 4907 * FunctionEntryHook is the type of the profile entry hook called at entry to |
4879 * any generated function when function-level profiling is enabled. | 4908 * any generated function when function-level profiling is enabled. |
(...skipping 3188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8068 */ | 8097 */ |
8069 | 8098 |
8070 | 8099 |
8071 } // namespace v8 | 8100 } // namespace v8 |
8072 | 8101 |
8073 | 8102 |
8074 #undef TYPE_CHECK | 8103 #undef TYPE_CHECK |
8075 | 8104 |
8076 | 8105 |
8077 #endif // V8_H_ | 8106 #endif // V8_H_ |
OLD | NEW |