namespace internal

Records

Functions

OrderToSize

size_t OrderToSize(T order)

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

IndexForOffset

size_t IndexForOffset(size_t offset)

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

FitOrder

BlockOrder FitOrder(size_t size)

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

Returns the smallest order such that (kMinOrderSize << order) >= size. Size must be non-zero.

GetState

shared_ptr GetState(const Inspector * inspector)

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

Internal accessor for obtaining fields from an Inspector.

ScanBlocks

zx_status_t ScanBlocks(const uint8_t * buffer, size_t size, function_impl callback)

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

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.

GetBlock

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

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

Get a pointer to a block in the snapshot by index. Returns nullptr if the index is out of bounds.

GetOrder

BlockOrder GetOrder(const Block * block)

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

GetType

BlockType GetType(const Block * block)

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

PayloadCapacity

size_t PayloadCapacity(BlockOrder order)

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

SizeForArrayPayload

optional SizeForArrayPayload( BlockType payload_type)

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

ArrayCapacity

optional ArrayCapacity(BlockOrder order, BlockType type)

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

BlockSizeForPayload

size_t BlockSizeForPayload(size_t payload_size)

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

GetArraySlot

T * GetArraySlot(B * block, size_t index)

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

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

GetArraySlotForString

optional GetArraySlotForString(const Block * block, size_t index)

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

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.

SetArraySlotForString

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

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

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`.

SetHeaderVmoSize

void SetHeaderVmoSize(Block * block, size_t headerVmoSize)

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

GetHeaderVmoSize

optional GetHeaderVmoSize(const Block * block)

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

ArrayBlockFormatToDisplay

ArrayDisplayFormat ArrayBlockFormatToDisplay( ArrayBlockFormat format)

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

ReadFromSnapshotTree

result ReadFromSnapshotTree(const SnapshotTree & tree)

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

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

TesterLoadStringReference

optional TesterLoadStringReference(const State & state, BlockIndex index)

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

Enums

enum class BlockType
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 19 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/block.h

enum class PropertyBlockFormat
kUtf8 0

The property is a UTF-8 string.

kBinary 1

The property is a binary string of uint8_t.

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

enum class ArrayBlockFormat
kDefault 0

The array stores N raw values in N slots.

kLinearHistogram 1

The array is a linear histogram with N buckets and N+4 slots, which are: - param_floor_value - param_step_size - underflow_bucket - ...N buckets... - overflow_bucket

kExponentialHistogram 2

The array is an exponential histogram with N buckets and N+5 slots, which are: - param_floor_value - param_initial_step - param_step_multiplier - underflow_bucket - ...N buckets... - overflow_bucket

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

enum class LinkBlockDisposition
kChild 0

The linked sub-hierarchy root is a child of the LINK_VALUE's parent.

kInline 1

The linked sub-hierarchy root's properties and children belong to the LINK_VALUE's parent.

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

enum StringReferenceWrapperDiscriminant
isStringLiteral 0
isStringReference 1

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