class Inspector
Defined at line 61 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/inspector.h
The entry point into the Inspection API.
An Inspector wraps a particular tree of Inspect data.
This class is thread safe and copyable.
Functions
Inspector
public void Inspector()
Defined at line 21 of file ../../zircon/system/ulib/inspect/inspector.cc
Construct a new Inspector.
Inspector
public void Inspector(const InspectSettings & settings)
Defined at line 23 of file ../../zircon/system/ulib/inspect/inspector.cc
Construct a new Inspector with the given settings.
Inspector
public void Inspector(
vmo
vmo)
Defined at line 39 of file ../../zircon/system/ulib/inspect/inspector.cc
Construct a new Inspector backed by the given VMO.
The VMO must support ZX_RIGHT_WRITE, ZX_VM_CAN_MAP_WRITE, ZX_VM_CAN_MAP_READ permissions, and must be exclusively written to via the constructed Inspector.
If an invalid VMO is passed all Node operations will have no effect.
DuplicateVmo
public
vmo
DuplicateVmo()
Defined at line 74 of file ../../zircon/system/ulib/inspect/inspector.cc
Returns a duplicated read-only version of the VMO backing this inspector.
FrozenVmoCopy
public cpp17::optional<zx::vmo> FrozenVmoCopy()
Defined at line 66 of file ../../zircon/system/ulib/inspect/inspector.cc
Returns a read-only, page-by-page copy-on-write duplicate of the backing VMO.
CopyVmo
public cpp17::optional<zx::vmo> CopyVmo()
Defined at line 84 of file ../../zircon/system/ulib/inspect/inspector.cc
Returns a copied version of the VMO backing this inspector.
The returned copy will always be a consistent snapshot of the inspector state, truncated to include only relevant pages from the underlying VMO.
CopyBytes
public cpp17::optional<std::vector<uint8_t>> CopyBytes()
Defined at line 94 of file ../../zircon/system/ulib/inspect/inspector.cc
Returns a copy of the bytes of the VMO backing this inspector.
The returned bytes will always be a consistent snapshot of the inspector state, truncated to include only relevant bytes from the underlying VMO.
GetStats
public
InspectStats
GetStats()
Defined at line 103 of file ../../zircon/system/ulib/inspect/inspector.cc
Returns stats about this Inspector.
operator bool
public bool operator bool()
Defined at line 108 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/inspector.h
Boolean value of an Inspector is whether it is actually backed by a VMO.
This method returns false if and only if Node operations on the Inspector are no-ops.
GetRoot
public Node & GetRoot()
Defined at line 110 of file ../../zircon/system/ulib/inspect/inspector.cc
Returns a reference to the root node owned by this inspector.
emplace
public void emplace(T value)
Defined at line 112 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/inspector.h
Emplace a value to be owned by this Inspector.
ClearRecorded
public void ClearRecorded()
Defined at line 118 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/inspector.h
Clear the recorded values owned by this Inspector.
CreateStatsNode
public void CreateStatsNode()
Defined at line 133 of file ../../zircon/system/ulib/inspect/inspector.cc
Adds a lazy node to this Inspector that will collect stats data about this Inspector when accessed.
GetChildNames
public std::vector<std::string> GetChildNames()
Defined at line 112 of file ../../zircon/system/ulib/inspect/inspector.cc
Gets the names of the inspectors linked off of this inspector.
OpenChild
public fpromise::promise<Inspector> OpenChild(const std::string & name)
Defined at line 114 of file ../../zircon/system/ulib/inspect/inspector.cc
Open a child of this inspector by name.
Returns a promise for the opened inspector.
AtomicUpdate
public void AtomicUpdate(AtomicUpdateCallbackFn callback)
Defined at line 118 of file ../../zircon/system/ulib/inspect/inspector.cc
Execute |callback| under a single lock of the Inspect VMO.
This callback receives a reference to the root of the inspect hierarchy.