class SystemInterface
Defined at line 26 of file ../../src/developer/debug/debug_agent/system_interface.h
Abstract interface that represents the system. This is eqivalent to ProcessHandle for processes
but for the system (for which there's not a clearly owned handle).
Public Methods
uint32_t GetNumCpus ()
Returns system statistics.
uint64_t GetPhysicalMemory ()
std::unique_ptr<JobHandle> GetRootJob ()
Returns a pointer to a job owned by this object (the root job is queried frequently). Returns
null if the root job was not available.
std::unique_ptr<BinaryLauncher> GetLauncher ()
Creates a BinaryLauncher. This is a creator for a launcher instead of
std::unique_ptr
<ProcessHandle
> LaunchProcess(...);
because the launch on Fuchsia requires two steps with possibly some caller-specific logic in
between.
If this requires mocking in the future, we should probably make the BinaryLauncher an abstract
interface that can itself be mocked.
ComponentManager & GetComponentManager ()
Returns the component manager for this system. Ownership stays with the SystemInterface.
LimboProvider & GetLimboProvider ()
Returns a reference to the limbo provider. This gives access to processes that have crashed and
are being held for attaching to the debugger. The limbo provider may have failed, in which
case it will be !Valid(). The reference is owned by this class.
std::string GetSystemVersion ()
Returns a string representation of the current system version.
void SystemInterface ()
Defined at line 28 of file ../../src/developer/debug/debug_agent/system_interface.h
void ~SystemInterface ()
Defined at line 29 of file ../../src/developer/debug/debug_agent/system_interface.h
void SystemInterface (SystemInterface && )
SystemInterface shouldn't be movable because ComponentManager keeps a pointer to us.
Defined at line 32 of file ../../src/developer/debug/debug_agent/system_interface.h
debug_ipc::ProcessTreeRecord GetProcessTree ()
Collects the process tree starting from the given job handle.
Defined at line 38 of file ../../src/developer/debug/debug_agent/system_interface.cc
std::unique_ptr<JobHandle> GetJob (zx_koid_t job_koid)
Returns a handle to the job/process with the given koid. Returns an empty pointer if it was not
found. This can also happen if the debug_agent doesn't have permission to see it.
Defined at line 45 of file ../../src/developer/debug/debug_agent/system_interface.cc
std::unique_ptr<ProcessHandle> GetProcess (zx_koid_t process_koid)
Defined at line 51 of file ../../src/developer/debug/debug_agent/system_interface.cc
zx_koid_t GetParentJobKoid (zx_koid_t job)
Returns the koid of the parent job given the koid of a job, or ZX_KOID_INVALID for root job.
Defined at line 57 of file ../../src/developer/debug/debug_agent/system_interface.cc
Friends
class ZirconSystemInterfaceTest_FilterMatchComponents_Test