Home | History | Annotate | Download | only in src

Lines Matching defs:Sampler

28 #include "sampler.h"
174 class Sampler::PlatformData : public PlatformDataCommon {
185 class Sampler::PlatformData : public PlatformDataCommon {
206 // Win32 profiler support. On Cygwin we use the same sampler implementation as
209 class Sampler::PlatformData : public PlatformDataCommon {
213 // going to use it in the sampler thread. Using GetThreadHandle() will
241 inline bool Init(Sampler* sampler, Isolate* isolate) {
242 ThreadId thread_id = sampler->platform_data()->profiled_thread_id();
324 Sampler* sampler = isolate->logger()->sampler();
325 if (sampler == NULL || !sampler->IsActive()) return;
331 if (!helper.Init(sampler, isolate)) return;
407 sampler->SampleStack(state);
425 static void AddActiveSampler(Sampler* sampler) {
431 instance_ = new SamplerThread(sampler->interval());
435 ASSERT(sampler->IsActive());
436 ASSERT(!instance_->active_samplers_.Contains(sampler));
437 ASSERT(instance_->interval_ == sampler->interval());
438 instance_->active_samplers_.Add(sampler);
446 static void RemoveActiveSampler(Sampler* sampler) {
451 ASSERT(sampler->IsActive());
452 bool removed = instance_->active_samplers_.RemoveElement(sampler);
481 Sampler* sampler = active_samplers_.at(i);
482 if (!sampler->isolate()->IsInitialized()) continue;
483 if (!sampler->IsProfiling()) continue;
484 SampleContext(sampler);
494 void SampleContext(Sampler* sampler) {
496 pthread_t tid = sampler->platform_data()->vm_tid();
502 void SampleContext(Sampler* sampler) {
503 thread_act_t profiled_thread = sampler->platform_data()->profiled_thread();
507 Isolate* isolate = sampler->isolate();
508 if (!helper.Init(sampler, isolate)) return;
548 sampler->SampleStack(state);
555 void SampleContext(Sampler* sampler) {
556 HANDLE profiled_thread = sampler->platform_data()->profiled_thread();
559 Isolate* isolate = sampler->isolate();
562 if (!helper.Init(sampler, isolate)) return;
587 sampler->SampleStack(state);
600 List<Sampler*> active_samplers_;
654 void Sampler::SetUp() {
659 void Sampler::TearDown() {
664 Sampler::Sampler(Isolate* isolate, int interval)
675 Sampler::~Sampler() {
681 void Sampler::Start() {
688 void Sampler::Stop() {
695 void Sampler::SampleStack(const RegisterState& state) {