V8 Project
|
#include <sampler.h>
Public Member Functions | |
Sampler (Isolate *isolate, int interval) | |
virtual | ~Sampler () |
Isolate * | isolate () const |
int | interval () const |
void | SampleStack (const RegisterState ®s) |
void | Start () |
void | Stop () |
bool | IsProfiling () const |
void | IncreaseProfilingDepth () |
void | DecreaseProfilingDepth () |
bool | IsActive () const |
void | DoSample () |
void | SetHasProcessingThread (bool value) |
unsigned | js_and_external_sample_count () const |
void | StartCountingSamples () |
PlatformData * | platform_data () const |
Static Public Member Functions | |
static void | SetUp () |
static void | TearDown () |
Protected Member Functions | |
virtual void | Tick (TickSample *sample)=0 |
Private Member Functions | |
void | SetActive (bool value) |
DISALLOW_IMPLICIT_CONSTRUCTORS (Sampler) | |
Private Attributes | |
Isolate * | isolate_ |
const int | interval_ |
base::Atomic32 | profiling_ |
base::Atomic32 | has_processing_thread_ |
base::Atomic32 | active_ |
PlatformData * | data_ |
bool | is_counting_samples_ |
unsigned | js_and_external_sample_count_ |
Definition at line 637 of file sampler.cc.
References data_.
|
virtual |
Definition at line 649 of file sampler.cc.
References data_, DCHECK, and IsActive().
void v8::internal::Sampler::DecreaseProfilingDepth | ( | ) |
Definition at line 677 of file sampler.cc.
References v8::base::NoBarrier_AtomicIncrement(), and profiling_.
Referenced by v8::internal::Ticker::ClearProfiler(), and v8::internal::CpuProfiler::StopProcessor().
|
private |
void v8::internal::Sampler::DoSample | ( | ) |
Referenced by v8::internal::ProfilerEventsProcessor::Run(), and v8::internal::SamplerThread::Run().
void v8::internal::Sampler::IncreaseProfilingDepth | ( | ) |
Definition at line 669 of file sampler.cc.
References v8::base::NoBarrier_AtomicIncrement(), and profiling_.
Referenced by v8::internal::Ticker::SetProfiler(), and v8::internal::CpuProfiler::StartProcessorIfNotStarted().
|
inline |
Definition at line 67 of file sampler.h.
References interval_.
Referenced by v8::internal::SamplerThread::AddActiveSampler().
|
inline |
Definition at line 85 of file sampler.h.
References active_, and v8::base::NoBarrier_Load().
Referenced by v8::internal::SamplerThread::AddActiveSampler(), v8::internal::Ticker::ClearProfiler(), v8::internal::Isolate::Deinit(), v8::internal::SamplerThread::RemoveActiveSampler(), v8::internal::Ticker::SetProfiler(), Start(), Stop(), ~Sampler(), and v8::internal::Ticker::~Ticker().
|
inline |
Definition at line 66 of file sampler.h.
References isolate_.
Referenced by v8::internal::SamplerThread::Run().
|
inline |
Definition at line 77 of file sampler.h.
References has_processing_thread_, v8::base::NoBarrier_Load(), and profiling_.
Referenced by v8::internal::SamplerThread::Run().
|
inline |
Definition at line 95 of file sampler.h.
References js_and_external_sample_count_.
|
inline |
void v8::internal::Sampler::SampleStack | ( | const RegisterState & | regs | ) |
Definition at line 685 of file sampler.cc.
References v8::internal::Isolate::cpu_profiler(), v8::internal::EXTERNAL, v8::internal::CpuProfiler::FinishTickSample(), v8::internal::TickSample::Init(), is_counting_samples_, isolate_, v8::internal::JS, js_and_external_sample_count_, NULL, v8::internal::CpuProfiler::StartTickSample(), v8::internal::TickSample::state, and Tick().
|
inlineprivate |
Definition at line 112 of file sampler.h.
References active_, and v8::base::NoBarrier_Store().
Referenced by Start(), and Stop().
|
inline |
Definition at line 90 of file sampler.h.
References has_processing_thread_, and v8::base::NoBarrier_Store().
Referenced by v8::internal::CpuProfiler::StartProcessorIfNotStarted(), and v8::internal::CpuProfiler::StopProcessor().
|
static |
Definition at line 621 of file sampler.cc.
References v8::internal::SamplerThread::SetUp().
Referenced by v8::internal::V8::InitializeOncePerProcessImpl().
void v8::internal::Sampler::Start | ( | ) |
Definition at line 655 of file sampler.cc.
References v8::internal::SamplerThread::AddActiveSampler(), DCHECK, IsActive(), and SetActive().
Referenced by v8::internal::Ticker::SetProfiler().
|
inline |
Definition at line 98 of file sampler.h.
References is_counting_samples_, and js_and_external_sample_count_.
void v8::internal::Sampler::Stop | ( | ) |
Definition at line 662 of file sampler.cc.
References DCHECK, IsActive(), v8::internal::SamplerThread::RemoveActiveSampler(), and SetActive().
Referenced by v8::internal::Ticker::ClearProfiler(), v8::internal::Isolate::Deinit(), and v8::internal::Ticker::~Ticker().
|
static |
Definition at line 629 of file sampler.cc.
References v8::internal::SamplerThread::TearDown().
Referenced by v8::internal::V8::TearDown().
|
protectedpure virtual |
Implemented in v8::internal::Ticker.
Referenced by SampleStack().
|
private |
Definition at line 118 of file sampler.h.
Referenced by IsActive(), and SetActive().
|
private |
Definition at line 119 of file sampler.h.
Referenced by platform_data(), Sampler(), and ~Sampler().
|
private |
Definition at line 117 of file sampler.h.
Referenced by IsProfiling(), and SetHasProcessingThread().
|
private |
Definition at line 115 of file sampler.h.
Referenced by interval().
|
private |
Definition at line 120 of file sampler.h.
Referenced by SampleStack(), and StartCountingSamples().
|
private |
Definition at line 114 of file sampler.h.
Referenced by isolate(), and SampleStack().
|
private |
Definition at line 122 of file sampler.h.
Referenced by js_and_external_sample_count(), SampleStack(), and StartCountingSamples().
|
private |
Definition at line 116 of file sampler.h.
Referenced by DecreaseProfilingDepth(), IncreaseProfilingDepth(), and IsProfiling().