Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: include/v8.h

Issue 1113233002: Adding api to get last gc object statistics for chrome://tracing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Adding type name. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_; }
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
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();
Primiano Tucci (use gerrit) 2015/05/05 14:17:53 This doesn't seem to be defined anywhere ?
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,
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
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_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698