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

Unified Diff: src/profiler/cpu-profiler.h

Issue 2108393002: Split Ticker into two samplers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: update Created 4 years, 6 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/log.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 d354aeb0469584ee27bdf94429461e262d51fd8e..e0b880d0e9397f0736846517d9e387a306fc8394 100644
--- a/src/profiler/cpu-profiler.h
+++ b/src/profiler/cpu-profiler.h
@@ -133,8 +133,7 @@ class CodeEventsContainer {
// methods called by event producers: VM and stack sampler threads.
class ProfilerEventsProcessor : public base::Thread {
public:
- ProfilerEventsProcessor(ProfileGenerator* generator,
- sampler::Sampler* sampler,
+ ProfilerEventsProcessor(Isolate* isolate, ProfileGenerator* generator,
base::TimeDelta period);
virtual ~ProfilerEventsProcessor();
@@ -160,6 +159,8 @@ class ProfilerEventsProcessor : public base::Thread {
void* operator new(size_t size);
void operator delete(void* ptr);
+ sampler::Sampler* sampler() { return sampler_.get(); }
+
private:
// Called from events processing thread (Run() method.)
bool ProcessCodeEvent();
@@ -172,7 +173,7 @@ class ProfilerEventsProcessor : public base::Thread {
SampleProcessingResult ProcessOneSample();
ProfileGenerator* generator_;
- sampler::Sampler* sampler_;
+ std::unique_ptr<sampler::Sampler> sampler_;
base::Atomic32 running_;
const base::TimeDelta period_; // Samples & code events processing period.
LockedQueue<CodeEventsContainer> events_buffer_;
@@ -209,10 +210,6 @@ class CpuProfiler : public CodeEventObserver {
void CodeEventHandler(const CodeEventsContainer& evt_rec) override;
- // Invoked from stack sampler (thread or signal handler.)
- inline TickSample* StartTickSample();
- inline void FinishTickSample();
-
bool is_profiling() const { return is_profiling_; }
ProfileGenerator* generator() const { return generator_.get(); }
« no previous file with comments | « src/log.cc ('k') | src/profiler/cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698