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

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: Fixing the comment with NumberOfTrackedHeapObjectTypes. 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') | no next file with comments »
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 4797 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_; }
4822 const char* object_sub_type() { return object_sub_type_; }
4823 size_t object_count() { return object_count_; }
4824 size_t object_size() { return object_size_; }
4825
4826 private:
4827 const char* object_type_;
4828 const char* object_sub_type_;
4829 size_t object_count_;
4830 size_t object_size_;
4831
4832 friend class Isolate;
4833 };
4834
4835
4818 class RetainedObjectInfo; 4836 class RetainedObjectInfo;
4819 4837
4820 4838
4821 /** 4839 /**
4822 * FunctionEntryHook is the type of the profile entry hook called at entry to 4840 * FunctionEntryHook is the type of the profile entry hook called at entry to
4823 * any generated function when function-level profiling is enabled. 4841 * any generated function when function-level profiling is enabled.
4824 * 4842 *
4825 * \param function the address of the function that's being entered. 4843 * \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 4844 * \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 4845 * return address resides. This can be used to identify the caller of
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
5196 * \param space_statistics The HeapSpaceStatistics object to fill in 5214 * \param space_statistics The HeapSpaceStatistics object to fill in
5197 * statistics. 5215 * statistics.
5198 * \param index The index of the space to get statistics from, which ranges 5216 * \param index The index of the space to get statistics from, which ranges
5199 * from 0 to NumberOfHeapSpaces() - 1. 5217 * from 0 to NumberOfHeapSpaces() - 1.
5200 * \returns true on success. 5218 * \returns true on success.
5201 */ 5219 */
5202 bool GetHeapSpaceStatistics(HeapSpaceStatistics* space_statistics, 5220 bool GetHeapSpaceStatistics(HeapSpaceStatistics* space_statistics,
5203 size_t index); 5221 size_t index);
5204 5222
5205 /** 5223 /**
5224 * Returns the number of types of objects tracked in the heap at GC.
5225 */
5226 size_t NumberOfTrackedHeapObjectTypes();
5227
5228 /**
5229 * Get statistics about objects in the heap.
5230 *
5231 * \param object_statistics The HeapObjectStatistics object to fill in
5232 * statistics of objects of given type, which were live in the previous GC.
5233 * \param type_index The index of the type of object to fill details about,
5234 * which ranges from 0 to NumberOfTrackedHeapObjectTypes() - 1.
5235 * \returns true on success.
5236 */
5237 bool GetHeapObjectStatisticsAtLastGC(HeapObjectStatistics* object_statistics,
5238 size_t type_index);
5239
5240 /**
5206 * Get a call stack sample from the isolate. 5241 * Get a call stack sample from the isolate.
5207 * \param state Execution state. 5242 * \param state Execution state.
5208 * \param frames Caller allocated buffer to store stack frames. 5243 * \param frames Caller allocated buffer to store stack frames.
5209 * \param frames_limit Maximum number of frames to capture. The buffer must 5244 * \param frames_limit Maximum number of frames to capture. The buffer must
5210 * be large enough to hold the number of frames. 5245 * be large enough to hold the number of frames.
5211 * \param sample_info The sample info is filled up by the function 5246 * \param sample_info The sample info is filled up by the function
5212 * provides number of actual captured stack frames and 5247 * provides number of actual captured stack frames and
5213 * the current VM state. 5248 * the current VM state.
5214 * \note GetStackSample should only be called when the JS thread is paused or 5249 * \note GetStackSample should only be called when the JS thread is paused or
5215 * interrupted. Otherwise the behavior is undefined. 5250 * interrupted. Otherwise the behavior is undefined.
(...skipping 2805 matching lines...) Expand 10 before | Expand all | Expand 10 after
8021 */ 8056 */
8022 8057
8023 8058
8024 } // namespace v8 8059 } // namespace v8
8025 8060
8026 8061
8027 #undef TYPE_CHECK 8062 #undef TYPE_CHECK
8028 8063
8029 8064
8030 #endif // V8_H_ 8065 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698