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. |
11 * | 11 * |
12 * For other documentation see http://code.google.com/apis/v8/ | 12 * For other documentation see http://code.google.com/apis/v8/ |
13 */ | 13 */ |
14 | 14 |
15 #ifndef V8_H_ | 15 #ifndef V8_H_ |
16 #define V8_H_ | 16 #define V8_H_ |
17 | 17 |
18 #include <stddef.h> | 18 #include <stddef.h> |
19 #include <stdint.h> | 19 #include <stdint.h> |
20 #include <stdio.h> | 20 #include <stdio.h> |
| 21 #include <vector> |
21 | 22 |
22 #include "v8-version.h" | 23 #include "v8-version.h" |
23 #include "v8config.h" | 24 #include "v8config.h" |
24 | 25 |
25 // We reserve the V8_* prefix for macros defined in V8 public API and | 26 // We reserve the V8_* prefix for macros defined in V8 public API and |
26 // assume there are no name conflicts with the embedder's code. | 27 // assume there are no name conflicts with the embedder's code. |
27 | 28 |
28 #ifdef V8_OS_WIN | 29 #ifdef V8_OS_WIN |
29 | 30 |
30 // Setup for Windows DLL export/import. When building the V8 DLL the | 31 // Setup for Windows DLL export/import. When building the V8 DLL the |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 class Boolean; | 71 class Boolean; |
71 class BooleanObject; | 72 class BooleanObject; |
72 class Context; | 73 class Context; |
73 class CpuProfiler; | 74 class CpuProfiler; |
74 class Data; | 75 class Data; |
75 class Date; | 76 class Date; |
76 class External; | 77 class External; |
77 class Function; | 78 class Function; |
78 class FunctionTemplate; | 79 class FunctionTemplate; |
79 class HeapProfiler; | 80 class HeapProfiler; |
| 81 class HeapSpacesStatistics; |
80 class ImplementationUtilities; | 82 class ImplementationUtilities; |
81 class Int32; | 83 class Int32; |
82 class Integer; | 84 class Integer; |
83 class Isolate; | 85 class Isolate; |
84 template <class T> | 86 template <class T> |
85 class Maybe; | 87 class Maybe; |
86 class Name; | 88 class Name; |
87 class Number; | 89 class Number; |
88 class NumberObject; | 90 class NumberObject; |
89 class Object; | 91 class Object; |
(...skipping 4780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4870 | 4872 |
4871 /** | 4873 /** |
4872 * Collection of V8 heap information. | 4874 * Collection of V8 heap information. |
4873 * | 4875 * |
4874 * Instances of this class can be passed to v8::V8::HeapStatistics to | 4876 * Instances of this class can be passed to v8::V8::HeapStatistics to |
4875 * get heap statistics from V8. | 4877 * get heap statistics from V8. |
4876 */ | 4878 */ |
4877 class V8_EXPORT HeapStatistics { | 4879 class V8_EXPORT HeapStatistics { |
4878 public: | 4880 public: |
4879 HeapStatistics(); | 4881 HeapStatistics(); |
| 4882 ~HeapStatistics(); |
| 4883 |
| 4884 class SpaceStatistics { |
| 4885 public: |
| 4886 SpaceStatistics(const char* name, |
| 4887 size_t size, |
| 4888 size_t used_size, |
| 4889 size_t available_size, |
| 4890 size_t physical_size) |
| 4891 : space_name(name), |
| 4892 space_size(size), |
| 4893 space_used_size(used_size), |
| 4894 space_avalable_size(available_size), |
| 4895 physical_space_size(physical_size) {} |
| 4896 const char* space_name; |
| 4897 size_t space_size; |
| 4898 size_t space_used_size; |
| 4899 size_t space_avalable_size; |
| 4900 size_t physical_space_size; |
| 4901 }; |
| 4902 |
4880 size_t total_heap_size() { return total_heap_size_; } | 4903 size_t total_heap_size() { return total_heap_size_; } |
4881 size_t total_heap_size_executable() { return total_heap_size_executable_; } | 4904 size_t total_heap_size_executable() { return total_heap_size_executable_; } |
4882 size_t total_physical_size() { return total_physical_size_; } | 4905 size_t total_physical_size() { return total_physical_size_; } |
4883 size_t used_heap_size() { return used_heap_size_; } | 4906 size_t used_heap_size() { return used_heap_size_; } |
4884 size_t heap_size_limit() { return heap_size_limit_; } | 4907 size_t heap_size_limit() { return heap_size_limit_; } |
4885 | 4908 |
| 4909 std::vector<SpaceStatistics>* SpacesStatistics(); |
| 4910 |
4886 private: | 4911 private: |
4887 size_t total_heap_size_; | 4912 size_t total_heap_size_; |
4888 size_t total_heap_size_executable_; | 4913 size_t total_heap_size_executable_; |
4889 size_t total_physical_size_; | 4914 size_t total_physical_size_; |
4890 size_t used_heap_size_; | 4915 size_t used_heap_size_; |
4891 size_t heap_size_limit_; | 4916 size_t heap_size_limit_; |
| 4917 HeapSpacesStatistics* spaces_statistics_; |
4892 | 4918 |
4893 friend class V8; | 4919 friend class V8; |
4894 friend class Isolate; | 4920 friend class Isolate; |
4895 }; | 4921 }; |
4896 | 4922 |
4897 | 4923 |
4898 class RetainedObjectInfo; | 4924 class RetainedObjectInfo; |
4899 | 4925 |
4900 | 4926 |
4901 /** | 4927 /** |
(...skipping 3190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8092 */ | 8118 */ |
8093 | 8119 |
8094 | 8120 |
8095 } // namespace v8 | 8121 } // namespace v8 |
8096 | 8122 |
8097 | 8123 |
8098 #undef TYPE_CHECK | 8124 #undef TYPE_CHECK |
8099 | 8125 |
8100 | 8126 |
8101 #endif // V8_H_ | 8127 #endif // V8_H_ |
OLD | NEW |