class Sampler

Defined at line 50 of file ../../src/performance/experimental/profiler/sampler.h

Protected Members

async_dispatcher_t * dispatcher_
TargetTree targets_
vector sample_specs_
vector inspecting_durations_
function sample_cb_
unordered_map process_watchers_
unordered_map job_watchers_
map contexts_

Public Methods

void Sampler (async_dispatcher_t * dispatcher, TargetTree targets, std::vector<fuchsia_cpu_profiler::SamplingConfig> sample_specs, SampleCallback sample_cb)

Defined at line 52 of file ../../src/performance/experimental/profiler/sampler.h

fxl::WeakPtr<Sampler> GetWeakPtr ()

Defined at line 66 of file ../../src/performance/experimental/profiler/sampler.h

std::unordered_map<zx_koid_t, std::string> GetProcessNames ()

Defined at line 68 of file ../../src/performance/experimental/profiler/sampler.h

std::unordered_map<zx_koid_t, std::string> GetThreadNames ()

Defined at line 77 of file ../../src/performance/experimental/profiler/sampler.h

std::vector<zx::ticks> SamplingDurations ()

Defined at line 88 of file ../../src/performance/experimental/profiler/sampler.h

void ~Sampler ()

Defined at line 90 of file ../../src/performance/experimental/profiler/sampler.h

zx::result<> Start (size_t buffer_size_mb)

Defined at line 176 of file ../../src/performance/experimental/profiler/sampler.cc

zx::result<> Stop ()

Defined at line 244 of file ../../src/performance/experimental/profiler/sampler.cc

zx::result<profiler::SymbolizationContext> GetContexts ()

Return the information needed to symbolize the samples

Defined at line 287 of file ../../src/performance/experimental/profiler/sampler.cc

zx::result<> AddTarget (JobTarget && target)

Defined at line 107 of file ../../src/performance/experimental/profiler/sampler.cc

Protected Methods

zx::result<> WatchTarget (const JobTarget & target)

Defined at line 116 of file ../../src/performance/experimental/profiler/sampler.cc

void AddThread (std::vector<zx_koid_t> job_path, zx_koid_t pid, zx_koid_t tid, zx::thread t)

Defined at line 309 of file ../../src/performance/experimental/profiler/sampler.cc

void RemoveThread (std::vector<zx_koid_t> job_path, zx_koid_t pid, zx_koid_t tid)

Defined at line 330 of file ../../src/performance/experimental/profiler/sampler.cc

void CollectSamples (async_dispatcher_t * dispatcher, async::TaskBase * task, zx_status_t status)

Defined at line 251 of file ../../src/performance/experimental/profiler/sampler.cc

void CacheModules (const ProcessTarget & p)

Defined at line 339 of file ../../src/performance/experimental/profiler/sampler.cc