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> | |
rmcilroy
2015/04/13 17:40:07
We probably don't want to pull in <vector> to be a
| |
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 4815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4846 | 4847 |
4847 /** | 4848 /** |
4848 * Collection of V8 heap information. | 4849 * Collection of V8 heap information. |
4849 * | 4850 * |
4850 * Instances of this class can be passed to v8::V8::HeapStatistics to | 4851 * Instances of this class can be passed to v8::V8::HeapStatistics to |
4851 * get heap statistics from V8. | 4852 * get heap statistics from V8. |
4852 */ | 4853 */ |
4853 class V8_EXPORT HeapStatistics { | 4854 class V8_EXPORT HeapStatistics { |
4854 public: | 4855 public: |
4855 HeapStatistics(); | 4856 HeapStatistics(); |
4857 | |
4858 class SpaceStatistics { | |
4859 public: | |
4860 SpaceStatistics(size_t size_of_objects, size_t committed_memory, | |
rmcilroy
2015/04/13 17:40:07
Add a name field so we know what each space each S
rmcilroy
2015/04/13 17:40:08
nit - each arg on a newline
ssid
2015/04/14 16:59:16
Done.
| |
4861 size_t available_memory) | |
4862 : size_of_objects_(size_of_objects), | |
4863 committed_memory_(committed_memory), | |
4864 available_memory_(available_memory) {} | |
4865 size_t size_of_objects_; | |
4866 size_t committed_memory_; | |
4867 size_t available_memory_; | |
rmcilroy
2015/04/13 17:40:07
I think we should make these more obvious names if
ssid
2015/04/14 16:59:16
Done.
| |
4868 }; | |
4869 | |
4856 size_t total_heap_size() { return total_heap_size_; } | 4870 size_t total_heap_size() { return total_heap_size_; } |
4857 size_t total_heap_size_executable() { return total_heap_size_executable_; } | 4871 size_t total_heap_size_executable() { return total_heap_size_executable_; } |
4858 size_t total_physical_size() { return total_physical_size_; } | 4872 size_t total_physical_size() { return total_physical_size_; } |
4859 size_t used_heap_size() { return used_heap_size_; } | 4873 size_t used_heap_size() { return used_heap_size_; } |
4860 size_t heap_size_limit() { return heap_size_limit_; } | 4874 size_t heap_size_limit() { return heap_size_limit_; } |
4875 std::vector<SpaceStatistics> spaces_statistics() { | |
4876 return spaces_statistics_; | |
4877 } | |
4861 | 4878 |
4862 private: | 4879 private: |
4863 size_t total_heap_size_; | 4880 size_t total_heap_size_; |
4864 size_t total_heap_size_executable_; | 4881 size_t total_heap_size_executable_; |
4865 size_t total_physical_size_; | 4882 size_t total_physical_size_; |
4866 size_t used_heap_size_; | 4883 size_t used_heap_size_; |
4867 size_t heap_size_limit_; | 4884 size_t heap_size_limit_; |
4885 std::vector<SpaceStatistics> spaces_statistics_; | |
4868 | 4886 |
4869 friend class V8; | 4887 friend class V8; |
4870 friend class Isolate; | 4888 friend class Isolate; |
4871 }; | 4889 }; |
4872 | 4890 |
4873 | 4891 |
4874 class RetainedObjectInfo; | 4892 class RetainedObjectInfo; |
4875 | 4893 |
4876 | 4894 |
4877 /** | 4895 /** |
(...skipping 3190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8068 */ | 8086 */ |
8069 | 8087 |
8070 | 8088 |
8071 } // namespace v8 | 8089 } // namespace v8 |
8072 | 8090 |
8073 | 8091 |
8074 #undef TYPE_CHECK | 8092 #undef TYPE_CHECK |
8075 | 8093 |
8076 | 8094 |
8077 #endif // V8_H_ | 8095 #endif // V8_H_ |
OLD | NEW |