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

Side by Side Diff: include/v8-profiler.h

Issue 1631043002: Add CollectSample API function to CpuProfiler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix tests. Created 4 years, 11 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 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
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
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_
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