Chromium Code Reviews| 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 4883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4894 size_t total_heap_size_executable_; | 4894 size_t total_heap_size_executable_; |
| 4895 size_t total_physical_size_; | 4895 size_t total_physical_size_; |
| 4896 size_t used_heap_size_; | 4896 size_t used_heap_size_; |
| 4897 size_t heap_size_limit_; | 4897 size_t heap_size_limit_; |
| 4898 | 4898 |
| 4899 friend class V8; | 4899 friend class V8; |
| 4900 friend class Isolate; | 4900 friend class Isolate; |
| 4901 }; | 4901 }; |
| 4902 | 4902 |
| 4903 | 4903 |
| 4904 class HeapSpaceStatistics { | |
| 4905 public: | |
| 4906 HeapSpaceStatistics(); | |
| 4907 const char* space_name() { return space_name_; } | |
| 4908 size_t space_size() { return space_size_; } | |
| 4909 size_t space_used_size() { return space_used_size_; } | |
| 4910 size_t space_avalable_size() { return space_avalable_size_; } | |
|
rmcilroy
2015/04/16 13:49:05
Fix spelling typo (avalable -> available) througho
ssid
2015/04/16 16:40:29
Done.
| |
| 4911 size_t physical_space_size() { return physical_space_size_; } | |
| 4912 | |
| 4913 private: | |
| 4914 const char* space_name_; | |
| 4915 size_t space_size_; | |
| 4916 size_t space_used_size_; | |
| 4917 size_t space_avalable_size_; | |
| 4918 size_t physical_space_size_; | |
| 4919 | |
| 4920 friend class Isolate; | |
| 4921 }; | |
| 4922 | |
| 4923 | |
| 4904 class RetainedObjectInfo; | 4924 class RetainedObjectInfo; |
| 4905 | 4925 |
| 4906 | 4926 |
| 4907 /** | 4927 /** |
| 4908 * FunctionEntryHook is the type of the profile entry hook called at entry to | 4928 * FunctionEntryHook is the type of the profile entry hook called at entry to |
| 4909 * any generated function when function-level profiling is enabled. | 4929 * any generated function when function-level profiling is enabled. |
| 4910 * | 4930 * |
| 4911 * \param function the address of the function that's being entered. | 4931 * \param function the address of the function that's being entered. |
| 4912 * \param return_addr_location points to a location on stack where the machine | 4932 * \param return_addr_location points to a location on stack where the machine |
| 4913 * return address resides. This can be used to identify the caller of | 4933 * return address resides. This can be used to identify the caller of |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5256 * are in the range of 0 - GetNumberOfDataSlots() - 1. | 5276 * are in the range of 0 - GetNumberOfDataSlots() - 1. |
| 5257 */ | 5277 */ |
| 5258 V8_INLINE static uint32_t GetNumberOfDataSlots(); | 5278 V8_INLINE static uint32_t GetNumberOfDataSlots(); |
| 5259 | 5279 |
| 5260 /** | 5280 /** |
| 5261 * Get statistics about the heap memory usage. | 5281 * Get statistics about the heap memory usage. |
| 5262 */ | 5282 */ |
| 5263 void GetHeapStatistics(HeapStatistics* heap_statistics); | 5283 void GetHeapStatistics(HeapStatistics* heap_statistics); |
| 5264 | 5284 |
| 5265 /** | 5285 /** |
| 5286 * Returns the number of spaces in the heap. | |
| 5287 */ | |
| 5288 int NumberOfHeapSpaces(); | |
| 5289 | |
| 5290 /** | |
| 5291 * Get the memory usage of a space in the heap. | |
|
rmcilroy
2015/04/16 13:49:05
nit - add 'Returns true on success'.
ssid
2015/04/16 16:40:29
Done.
rmcilroy
2015/04/16 16:53:36
You seem to have missed this.
| |
| 5292 * | |
| 5293 * \param space_statistics the HeapSpaceStatistics object to fill in | |
| 5294 * statistics. | |
| 5295 * \param index ranges from 0 - number of spaces in the heap (given by | |
| 5296 * NumberOfHeapSpaces()). | |
| 5297 */ | |
| 5298 bool GetHeapSpaceStatistics(HeapSpaceStatistics* space_statistics, int index); | |
| 5299 | |
| 5300 /** | |
| 5266 * Get a call stack sample from the isolate. | 5301 * Get a call stack sample from the isolate. |
| 5267 * \param state Execution state. | 5302 * \param state Execution state. |
| 5268 * \param frames Caller allocated buffer to store stack frames. | 5303 * \param frames Caller allocated buffer to store stack frames. |
| 5269 * \param frames_limit Maximum number of frames to capture. The buffer must | 5304 * \param frames_limit Maximum number of frames to capture. The buffer must |
| 5270 * be large enough to hold the number of frames. | 5305 * be large enough to hold the number of frames. |
| 5271 * \param sample_info The sample info is filled up by the function | 5306 * \param sample_info The sample info is filled up by the function |
| 5272 * provides number of actual captured stack frames and | 5307 * provides number of actual captured stack frames and |
| 5273 * the current VM state. | 5308 * the current VM state. |
| 5274 * \note GetStackSample should only be called when the JS thread is paused or | 5309 * \note GetStackSample should only be called when the JS thread is paused or |
| 5275 * interrupted. Otherwise the behavior is undefined. | 5310 * interrupted. Otherwise the behavior is undefined. |
| (...skipping 2818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8094 */ | 8129 */ |
| 8095 | 8130 |
| 8096 | 8131 |
| 8097 } // namespace v8 | 8132 } // namespace v8 |
| 8098 | 8133 |
| 8099 | 8134 |
| 8100 #undef TYPE_CHECK | 8135 #undef TYPE_CHECK |
| 8101 | 8136 |
| 8102 | 8137 |
| 8103 #endif // V8_H_ | 8138 #endif // V8_H_ |
| OLD | NEW |