Enumerations

enum BlockType
Name Value
kFree 0
kReserved 1
kHeader 2
kNodeValue 3
kIntValue 4
kUintValue 5
kDoubleValue 6
kBufferValue 7
kExtent 8
kName 9
kTombstone 10
kArrayValue 11
kLinkValue 12
kBoolValue 13
kStringReference 14

Defined at line 21 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/block.h

enum PropertyBlockFormat
Name Value
kUtf8 0
kBinary 1
kStringReference 2

Defined at line 39 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/block.h

enum ArrayBlockFormat
Name Value
kDefault 0
kLinearHistogram 1
kExponentialHistogram 2

Defined at line 50 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/block.h

enum LinkBlockDisposition
Name Value
kChild 0
kInline 1

Defined at line 72 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/block.h

enum StringReferenceWrapperDiscriminant
Name Value
isStringLiteral 0
isStringReference 1

Defined at line 444 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/types.h

Records

Functions

  • template <typename T>
    size_t OrderToSize (T order)

    Defined at line 56 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/limits.h

  • size_t IndexForOffset (size_t offset)

    Defined at line 60 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/limits.h

  • BlockOrder FitOrder (size_t size)

    Returns the smallest order such that (kMinOrderSize

    <

    <

    order) >= size.

    Size must be non-zero.

    Defined at line 85 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/block.h

  • std::shared_ptr<State> GetState (const Inspector * inspector)

    Internal accessor for obtaining fields from an Inspector.

    Defined at line 156 of file ../../zircon/system/ulib/inspect/inspector.cc

  • zx_status_t ScanBlocks (const uint8_t * buffer, size_t size, fit::function<bool (BlockIndex, const Block *)> callback)

    Read blocks out of the buffer.

    For each block that it found, this function calls the callback function

    with the block's index and a pointer to the block. If the callback

    returns false, it will not be called again.

    Returns ZX_OK if the buffer was valid and successfully loaded,

    otherwise returns an error describing what went wrong.

    Defined at line 11 of file ../../zircon/system/ulib/inspect/vmo/scanner.cc

  • const Block * GetBlock (const Snapshot * snapshot, BlockIndex index)

    Get a pointer to a block in the snapshot by index.

    Returns nullptr if the index is out of bounds.

    Defined at line 193 of file ../../zircon/system/ulib/inspect/vmo/snapshot.cc

  • BlockOrder GetOrder (const Block * block)

    Defined at line 200 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/block.h

  • BlockType GetType (const Block * block)

    Defined at line 204 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/block.h

  • size_t PayloadCapacity (BlockOrder order)

    Defined at line 208 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/block.h

  • std::optional<size_t> SizeForArrayPayload (const BlockType payload_type)

    Defined at line 212 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/block.h

  • std::optional<size_t> ArrayCapacity (BlockOrder order, BlockType type)

    Defined at line 226 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/block.h

  • size_t BlockSizeForPayload (size_t payload_size)

    Defined at line 235 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/block.h

  • template <typename T, typename B, typename = std::enable_if_t<std::is_same<typename std::decay_t<B>, Block>::value>, typename = std::enable_if_t < std::is_const<B>::value ? std::is_const<T>::value
                                                                                                : true >>
    T * GetArraySlot (B * block, size_t index)

    check that the return pointer is at least as const as the input block

    Defined at line 250 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/block.h

  • std::optional<BlockIndex> GetArraySlotForString (const Block * block, size_t index)

    Get a BlockIndex pointing to a string reference from a string array `Block`.

    This can't return a pointer because the VMO representation of block indexes is smaller

    than the C++ one, so a string reference's BlockIndex written directly to the array

    through the pointer would overwrite other data.

    Defined at line 275 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/block.h

  • void SetArraySlotForString (Block * block, size_t index_into_array, BlockIndex value)

    Set the value of a string array at `index_into_array` with a `BlockIndex`, `value`,

    pointing to a string reference.

    Necessary to have a helper function instead of returning a mutable pointer into the array

    for the reasons noted on `GetArraySlotForString`.

    Defined at line 289 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/block.h

  • void SetHeaderVmoSize (Block * block, size_t headerVmoSize)

    Defined at line 301 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/block.h

  • std::optional<size_t> GetHeaderVmoSize (const Block * block)

    Defined at line 309 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/block.h

  • ArrayDisplayFormat ArrayBlockFormatToDisplay (ArrayBlockFormat format)

    Defined at line 354 of file ../../zircon/system/ulib/inspect/reader.cc

  • fpromise::result<Hierarchy> ReadFromSnapshotTree (const SnapshotTree & tree)

    Parses a tree of snapshots into its corresponding Hierarchy, following all links.

    Defined at line 558 of file ../../zircon/system/ulib/inspect/reader.cc

  • std::optional<std::string> TesterLoadStringReference (const State & stateBlockIndex index)

    Defined at line 1364 of file ../../zircon/system/ulib/inspect/vmo/state.cc