class TargetTree
Defined at line 147 of file ../../src/performance/experimental/profiler/targets.h
Public Methods
void TargetTree ()
Defined at line 149 of file ../../src/performance/experimental/profiler/targets.h
void TargetTree (const TargetTree & )
Defined at line 150 of file ../../src/performance/experimental/profiler/targets.h
TargetTree & operator= (const TargetTree & )
Defined at line 151 of file ../../src/performance/experimental/profiler/targets.h
void TargetTree (TargetTree && )
Defined at line 153 of file ../../src/performance/experimental/profiler/targets.h
TargetTree & operator= (TargetTree && )
Defined at line 154 of file ../../src/performance/experimental/profiler/targets.h
zx::result<> AddJob (JobTarget && job)
Add `job` into top level set of jobs in the tree.
Returns zx::ok if the job was successfully added,
ZX_ERR_ALREADY_EXISTS if there is already an existing job with the same job_id
Defined at line 338 of file ../../src/performance/experimental/profiler/targets.cc
zx::result<> AddThread (zx_koid_t pid, ThreadTarget && thread)
Add `thread` into the tree as a child to the process specified by `pid` with no parent job
Returns zx::ok if the thread was successfully added,
ZX_ERR_NOT_FOUND if there is no process matching `pid`
ZX_ERR_ALREADY_EXISTS if there is already an existing thread at the location
Defined at line 391 of file ../../src/performance/experimental/profiler/targets.cc
zx::result<> RemoveThread (zx_koid_t pid, zx_koid_t tid)
Defined at line 395 of file ../../src/performance/experimental/profiler/targets.cc
zx::result<> AddProcess (ProcessTarget && process)
Add `process` into the job tree as a process with no parent job
Returns zx::ok if the process was successfully added,
ZX_ERR_ALREADY_EXISTS if there is already an existing process with the same pid
Defined at line 356 of file ../../src/performance/experimental/profiler/targets.cc
zx::result<> AddJob (std::span<const zx_koid_t> ancestry, JobTarget && job)
Add `job` into the job tree as a child to the job specified by `ancestry`.
Returns zx::ok if the job was successfully added,
ZX_ERR_NOT_FOUND if there is no matching ancestry
ZX_ERR_ALREADY_EXISTS if there is already an existing job at the location with the same job_id
Note: `ancestry` is the jobs that `job` will be placed under and does not include the job_id of
`job` itself.
Defined at line 342 of file ../../src/performance/experimental/profiler/targets.cc
zx::result<> RemoveThread (std::span<const zx_koid_t> job_path, zx_koid_t pid, zx_koid_t tid)
Defined at line 418 of file ../../src/performance/experimental/profiler/targets.cc
zx::result<> AddThread (std::span<const zx_koid_t> job_path, zx_koid_t pid, ThreadTarget && thread)
Add `thread` into the job tree as a child to the job specified by `job_path` in the process
`pid`
Returns zx::ok if the thread was successfully added,
ZX_ERR_NOT_FOUND if there is no matching job_path
ZX_ERR_ALREADY_EXISTS if there is already an existing thread at the location with the same tid
Defined at line 399 of file ../../src/performance/experimental/profiler/targets.cc
zx::result<> AddProcess (std::span<const zx_koid_t> job_path, ProcessTarget && process)
Add `process` into the job tree as a child in the job by `job_path`.
Returns zx::ok if the process was successfully added,
ZX_ERR_NOT_FOUND if there is no matching job_path
ZX_ERR_ALREADY_EXISTS if there is already an existing thread at the location with the same tid
Defined at line 360 of file ../../src/performance/experimental/profiler/targets.cc
zx::result<ProcessTarget *> GetProcess (std::span<const zx_koid_t> job_path, zx_koid_t pid)
Search `pid` as a ProcessTarget from the job tree indexed by `job_path`.
ZX_ERR_NOT_FOUND if there is no matching job_path and pid
Defined at line 374 of file ../../src/performance/experimental/profiler/targets.cc
void Clear ()
Defined at line 436 of file ../../src/performance/experimental/profiler/targets.cc
zx::result<> ForEachJob (const fit::function<zx::result<> (const JobTarget &)> & f)
Call `f` on each Job in the TargetTree. The order each job is visited is unspecified. If `f`
returns an error, the function will short circuit and immediately return the error code without
visiting any remaining jobs.
Defined at line 442 of file ../../src/performance/experimental/profiler/targets.cc
zx::result<> ForEachProcess (const fit::function<zx::result<> (std::span<const zx_koid_t>, const ProcessTarget &)> & f)
Call `f` on each top level unparented process as well as every process in each added job. The
order each process is visited is unspecified. If `f` returns an error, the function will short
circuit and immediately return the error code without visiting any remaining processes.
Defined at line 454 of file ../../src/performance/experimental/profiler/targets.cc