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

Unified Diff: src/profiler/cpu-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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.cc ('k') | src/profiler/cpu-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profiler/cpu-profiler.h
diff --git a/src/profiler/cpu-profiler.h b/src/profiler/cpu-profiler.h
index e5ef0ac7c465d09ea0ff32b200e0f02cf4ba221b..1a1249c8b2309c44dbc65fe9c78e1616427df483 100644
--- a/src/profiler/cpu-profiler.h
+++ b/src/profiler/cpu-profiler.h
@@ -139,7 +139,7 @@ class ProfilerEventsProcessor : public base::Thread {
void Enqueue(const CodeEventsContainer& event);
// Puts current stack into tick sample events buffer.
- void AddCurrentStack(Isolate* isolate);
+ void AddCurrentStack(Isolate* isolate, bool update_stats = false);
void AddDeoptStack(Isolate* isolate, Address from, int fp_to_sp_delta);
// Tick sample events are filled directly in the buffer of the circular
@@ -168,8 +168,7 @@ class ProfilerEventsProcessor : public base::Thread {
ProfileGenerator* generator_;
Sampler* sampler_;
base::Atomic32 running_;
- // Sampling period in microseconds.
- const base::TimeDelta period_;
+ const base::TimeDelta period_; // Samples & code events processing period.
LockedQueue<CodeEventsContainer> events_buffer_;
static const size_t kTickSampleBufferSize = 1 * MB;
static const size_t kTickSampleQueueLength =
@@ -205,6 +204,7 @@ class CpuProfiler : public CodeEventListener {
virtual ~CpuProfiler();
void set_sampling_interval(base::TimeDelta value);
+ void CollectSample();
void StartProfiling(const char* title, bool record_samples = false);
void StartProfiling(String* title, bool record_samples);
CpuProfile* StopProfiling(const char* title);
« no previous file with comments | « src/api.cc ('k') | src/profiler/cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698