| 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 <vector> | 8 #include <vector> |
| 9 #include "v8.h" // NOLINT(build/include) | 9 #include "v8.h" // NOLINT(build/include) |
| 10 | 10 |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 */ | 200 */ |
| 201 void StartProfiling(Local<String> title, bool record_samples = false); | 201 void StartProfiling(Local<String> title, bool record_samples = false); |
| 202 | 202 |
| 203 /** | 203 /** |
| 204 * Stops collecting CPU profile with a given title and returns it. | 204 * Stops collecting CPU profile with a given title and returns it. |
| 205 * If the title given is empty, finishes the last profile started. | 205 * If the title given is empty, finishes the last profile started. |
| 206 */ | 206 */ |
| 207 CpuProfile* StopProfiling(Local<String> title); | 207 CpuProfile* StopProfiling(Local<String> title); |
| 208 | 208 |
| 209 /** | 209 /** |
| 210 * Force collection of a sample. Must be called on the VM thread. |
| 211 * Recording the forced sample does not contribute to the aggregated |
| 212 * profile statistics. |
| 213 */ |
| 214 void CollectSample(); |
| 215 |
| 216 /** |
| 210 * Tells the profiler whether the embedder is idle. | 217 * Tells the profiler whether the embedder is idle. |
| 211 */ | 218 */ |
| 212 void SetIdle(bool is_idle); | 219 void SetIdle(bool is_idle); |
| 213 | 220 |
| 214 private: | 221 private: |
| 215 CpuProfiler(); | 222 CpuProfiler(); |
| 216 ~CpuProfiler(); | 223 ~CpuProfiler(); |
| 217 CpuProfiler(const CpuProfiler&); | 224 CpuProfiler(const CpuProfiler&); |
| 218 CpuProfiler& operator=(const CpuProfiler&); | 225 CpuProfiler& operator=(const CpuProfiler&); |
| 219 }; | 226 }; |
| (...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 uint32_t index; // Index of the time interval that was changed. | 773 uint32_t index; // Index of the time interval that was changed. |
| 767 uint32_t count; // New value of count field for the interval with this index. | 774 uint32_t count; // New value of count field for the interval with this index. |
| 768 uint32_t size; // New value of size field for the interval with this index. | 775 uint32_t size; // New value of size field for the interval with this index. |
| 769 }; | 776 }; |
| 770 | 777 |
| 771 | 778 |
| 772 } // namespace v8 | 779 } // namespace v8 |
| 773 | 780 |
| 774 | 781 |
| 775 #endif // V8_V8_PROFILER_H_ | 782 #endif // V8_V8_PROFILER_H_ |
| OLD | NEW |