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 4795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4806 const char* space_name_; | 4806 const char* space_name_; |
| 4807 size_t space_size_; | 4807 size_t space_size_; |
| 4808 size_t space_used_size_; | 4808 size_t space_used_size_; |
| 4809 size_t space_available_size_; | 4809 size_t space_available_size_; |
| 4810 size_t physical_space_size_; | 4810 size_t physical_space_size_; |
| 4811 | 4811 |
| 4812 friend class Isolate; | 4812 friend class Isolate; |
| 4813 }; | 4813 }; |
| 4814 | 4814 |
| 4815 | 4815 |
| 4816 class V8_EXPORT HeapObjectStatistics { | |
| 4817 public: | |
| 4818 HeapObjectStatistics(); | |
| 4819 const char* object_type() { return object_type_; } | |
| 4820 size_t object_count() { return object_count_; } | |
| 4821 size_t object_size() { return object_size_; } | |
|
ulan
2015/05/06 12:46:02
You probably also want a notion of sub-type or sec
ssid
2015/05/07 13:53:03
As discussed offline, the sub-types are just given
| |
| 4822 | |
| 4823 private: | |
| 4824 const char* object_type_; | |
| 4825 size_t object_count_; | |
| 4826 size_t object_size_; | |
| 4827 | |
| 4828 friend class Isolate; | |
| 4829 }; | |
| 4830 | |
| 4831 | |
| 4816 class RetainedObjectInfo; | 4832 class RetainedObjectInfo; |
| 4817 | 4833 |
| 4818 | 4834 |
| 4819 /** | 4835 /** |
| 4820 * FunctionEntryHook is the type of the profile entry hook called at entry to | 4836 * FunctionEntryHook is the type of the profile entry hook called at entry to |
| 4821 * any generated function when function-level profiling is enabled. | 4837 * any generated function when function-level profiling is enabled. |
| 4822 * | 4838 * |
| 4823 * \param function the address of the function that's being entered. | 4839 * \param function the address of the function that's being entered. |
| 4824 * \param return_addr_location points to a location on stack where the machine | 4840 * \param return_addr_location points to a location on stack where the machine |
| 4825 * return address resides. This can be used to identify the caller of | 4841 * return address resides. This can be used to identify the caller of |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5194 * \param space_statistics The HeapSpaceStatistics object to fill in | 5210 * \param space_statistics The HeapSpaceStatistics object to fill in |
| 5195 * statistics. | 5211 * statistics. |
| 5196 * \param index The index of the space to get statistics from, which ranges | 5212 * \param index The index of the space to get statistics from, which ranges |
| 5197 * from 0 to NumberOfHeapSpaces() - 1. | 5213 * from 0 to NumberOfHeapSpaces() - 1. |
| 5198 * \returns true on success. | 5214 * \returns true on success. |
| 5199 */ | 5215 */ |
| 5200 bool GetHeapSpaceStatistics(HeapSpaceStatistics* space_statistics, | 5216 bool GetHeapSpaceStatistics(HeapSpaceStatistics* space_statistics, |
| 5201 size_t index); | 5217 size_t index); |
| 5202 | 5218 |
| 5203 /** | 5219 /** |
| 5220 * Returns the number of types of objects in the heap. | |
| 5221 */ | |
| 5222 size_t NumberOfHeapObjectsTypes(); | |
|
ulan
2015/05/06 12:46:02
Strictly speaking this is not the number of heap o
ssid
2015/05/07 13:53:03
Done.
| |
| 5223 | |
| 5224 /** | |
| 5225 * Get statistics about objects in the heap. | |
| 5226 * | |
| 5227 * \param object_statistics The HeapObjectStatistics object to fill in | |
| 5228 * statistics of objects of given type, which were live in the previous GC. | |
| 5229 * \param type_index The index of the type of object to fill details about, | |
| 5230 * which ranges from 0 to NumberOfHeapObjectsTypes() - 1. | |
| 5231 * \returns true on success. | |
| 5232 */ | |
| 5233 bool GetLastGcObjectStatistics(HeapObjectStatistics* object_statistics, | |
|
ulan
2015/05/06 12:46:02
GetHeapObjectStatisticsAtLastGC(...) to be consist
ssid
2015/05/07 13:53:03
Done.
| |
| 5234 size_t type_index); | |
| 5235 | |
| 5236 /** | |
| 5204 * Get a call stack sample from the isolate. | 5237 * Get a call stack sample from the isolate. |
| 5205 * \param state Execution state. | 5238 * \param state Execution state. |
| 5206 * \param frames Caller allocated buffer to store stack frames. | 5239 * \param frames Caller allocated buffer to store stack frames. |
| 5207 * \param frames_limit Maximum number of frames to capture. The buffer must | 5240 * \param frames_limit Maximum number of frames to capture. The buffer must |
| 5208 * be large enough to hold the number of frames. | 5241 * be large enough to hold the number of frames. |
| 5209 * \param sample_info The sample info is filled up by the function | 5242 * \param sample_info The sample info is filled up by the function |
| 5210 * provides number of actual captured stack frames and | 5243 * provides number of actual captured stack frames and |
| 5211 * the current VM state. | 5244 * the current VM state. |
| 5212 * \note GetStackSample should only be called when the JS thread is paused or | 5245 * \note GetStackSample should only be called when the JS thread is paused or |
| 5213 * interrupted. Otherwise the behavior is undefined. | 5246 * interrupted. Otherwise the behavior is undefined. |
| (...skipping 2805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8019 */ | 8052 */ |
| 8020 | 8053 |
| 8021 | 8054 |
| 8022 } // namespace v8 | 8055 } // namespace v8 |
| 8023 | 8056 |
| 8024 | 8057 |
| 8025 #undef TYPE_CHECK | 8058 #undef TYPE_CHECK |
| 8026 | 8059 |
| 8027 | 8060 |
| 8028 #endif // V8_H_ | 8061 #endif // V8_H_ |
| OLD | NEW |