OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 #ifndef V8_V8_PROFILER_H_ | 5 #ifndef V8_V8_PROFILER_H_ |
6 #define V8_V8_PROFILER_H_ | 6 #define V8_V8_PROFILER_H_ |
7 | 7 |
8 #include "v8.h" | 8 #include "v8.h" |
9 | 9 |
10 /** | 10 /** |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 * once. Attempts to start collecting several profiles with the same | 161 * once. Attempts to start collecting several profiles with the same |
162 * title are silently ignored. While collecting a profile, functions | 162 * title are silently ignored. While collecting a profile, functions |
163 * from all security contexts are included in it. The token-based | 163 * from all security contexts are included in it. The token-based |
164 * filtering is only performed when querying for a profile. | 164 * filtering is only performed when querying for a profile. |
165 * | 165 * |
166 * |record_samples| parameter controls whether individual samples should | 166 * |record_samples| parameter controls whether individual samples should |
167 * be recorded in addition to the aggregated tree. | 167 * be recorded in addition to the aggregated tree. |
168 */ | 168 */ |
169 void StartProfiling(Handle<String> title, bool record_samples = false); | 169 void StartProfiling(Handle<String> title, bool record_samples = false); |
170 | 170 |
171 /** Deprecated. Use StartProfiling instead. */ | |
172 V8_DEPRECATED("Use StartProfiling", | |
173 void StartCpuProfiling(Handle<String> title, | |
174 bool record_samples = false)); | |
175 | |
176 /** | 171 /** |
177 * Stops collecting CPU profile with a given title and returns it. | 172 * Stops collecting CPU profile with a given title and returns it. |
178 * If the title given is empty, finishes the last profile started. | 173 * If the title given is empty, finishes the last profile started. |
179 */ | 174 */ |
180 CpuProfile* StopProfiling(Handle<String> title); | 175 CpuProfile* StopProfiling(Handle<String> title); |
181 | 176 |
182 /** Deprecated. Use StopProfiling instead. */ | |
183 V8_DEPRECATED("Use StopProfiling", | |
184 const CpuProfile* StopCpuProfiling(Handle<String> title)); | |
185 | |
186 /** | 177 /** |
187 * Tells the profiler whether the embedder is idle. | 178 * Tells the profiler whether the embedder is idle. |
188 */ | 179 */ |
189 void SetIdle(bool is_idle); | 180 void SetIdle(bool is_idle); |
190 | 181 |
191 private: | 182 private: |
192 CpuProfiler(); | 183 CpuProfiler(); |
193 ~CpuProfiler(); | 184 ~CpuProfiler(); |
194 CpuProfiler(const CpuProfiler&); | 185 CpuProfiler(const CpuProfiler&); |
195 CpuProfiler& operator=(const CpuProfiler&); | 186 CpuProfiler& operator=(const CpuProfiler&); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 */ | 256 */ |
266 Handle<String> GetName() const; | 257 Handle<String> GetName() const; |
267 | 258 |
268 /** | 259 /** |
269 * Returns node id. For the same heap object, the id remains the same | 260 * Returns node id. For the same heap object, the id remains the same |
270 * across all snapshots. | 261 * across all snapshots. |
271 */ | 262 */ |
272 SnapshotObjectId GetId() const; | 263 SnapshotObjectId GetId() const; |
273 | 264 |
274 /** Returns node's own size, in bytes. */ | 265 /** Returns node's own size, in bytes. */ |
275 V8_DEPRECATED("Use GetShallowSize instead", | |
276 int GetSelfSize() const); | |
277 | |
278 /** Returns node's own size, in bytes. */ | |
279 size_t GetShallowSize() const; | 266 size_t GetShallowSize() const; |
280 | 267 |
281 /** Returns child nodes count of the node. */ | 268 /** Returns child nodes count of the node. */ |
282 int GetChildrenCount() const; | 269 int GetChildrenCount() const; |
283 | 270 |
284 /** Retrieves a child by index. */ | 271 /** Retrieves a child by index. */ |
285 const HeapGraphEdge* GetChild(int index) const; | 272 const HeapGraphEdge* GetChild(int index) const; |
286 }; | 273 }; |
287 | 274 |
288 | 275 |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 uint32_t index; // Index of the time interval that was changed. | 609 uint32_t index; // Index of the time interval that was changed. |
623 uint32_t count; // New value of count field for the interval with this index. | 610 uint32_t count; // New value of count field for the interval with this index. |
624 uint32_t size; // New value of size field for the interval with this index. | 611 uint32_t size; // New value of size field for the interval with this index. |
625 }; | 612 }; |
626 | 613 |
627 | 614 |
628 } // namespace v8 | 615 } // namespace v8 |
629 | 616 |
630 | 617 |
631 #endif // V8_V8_PROFILER_H_ | 618 #endif // V8_V8_PROFILER_H_ |
OLD | NEW |