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