class Inspector
Defined at line 64 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.
Public Methods
void Inspector ()
Construct a new Inspector.
Defined at line 21 of file ../../zircon/system/ulib/inspect/inspector.cc
void Inspector (const InspectSettings & settings)
Construct a new Inspector with the given settings.
Defined at line 23 of file ../../zircon/system/ulib/inspect/inspector.cc
void Inspector (zx::vmo vmo)
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.
Defined at line 39 of file ../../zircon/system/ulib/inspect/inspector.cc
zx::vmo DuplicateVmo ()
Returns a duplicated read-only version of the VMO backing this inspector.
Defined at line 74 of file ../../zircon/system/ulib/inspect/inspector.cc
std::optional<zx::vmo> FrozenVmoCopy ()
Returns a read-only, page-by-page copy-on-write duplicate of the backing VMO.
Defined at line 66 of file ../../zircon/system/ulib/inspect/inspector.cc
std::optional<zx::vmo> CopyVmo ()
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.
Defined at line 84 of file ../../zircon/system/ulib/inspect/inspector.cc
std::optional<std::vector<uint8_t>> CopyBytes ()
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.
Defined at line 94 of file ../../zircon/system/ulib/inspect/inspector.cc
InspectStats GetStats ()
Returns stats about this Inspector.
Defined at line 103 of file ../../zircon/system/ulib/inspect/inspector.cc
Node & GetRoot ()
Returns a reference to the root node owned by this inspector.
Defined at line 110 of file ../../zircon/system/ulib/inspect/inspector.cc
bool operator bool ()
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.
Defined at line 111 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/inspector.h
template <typename T>
void emplace (T value)
Emplace a value to be owned by this Inspector.
Defined at line 115 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/inspector.h
void ClearRecorded ()
Clear the recorded values owned by this Inspector.
Defined at line 121 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/inspector.h
void CreateStatsNode ()
Adds a lazy node to this Inspector that will collect stats data about this
Inspector when accessed.
Defined at line 134 of file ../../zircon/system/ulib/inspect/inspector.cc
std::vector<std::string> GetChildNames ()
Gets the names of the inspectors linked off of this inspector.
Defined at line 112 of file ../../zircon/system/ulib/inspect/inspector.cc
fpromise::promise<Inspector> OpenChild (const std::string & name)
Open a child of this inspector by name.
Returns a promise for the opened inspector.
Defined at line 114 of file ../../zircon/system/ulib/inspect/inspector.cc
void AtomicUpdate (AtomicUpdateCallbackFn callback)
Execute |callback| under a single lock of the Inspect VMO.
This callback receives a reference to the root of the inspect hierarchy.
Defined at line 118 of file ../../zircon/system/ulib/inspect/inspector.cc
Friends
shared_ptr Inspector (const Inspector * inspector)