fuchsia.memory.sampler

Added: NEXT

PROTOCOLS

Sampler

Defined in fuchsia.memory.sampler/sampler.fidl

Interface used to exfiltrate process allocation information.

RecordAllocation

Record an allocation.

Request

NameType
payload SamplerRecordAllocationRequest

RecordDeallocation

Record a deallocation.

Request

NameType
payload SamplerRecordDeallocationRequest

SetProcessInfo

Communicate relevant process information to facilitate symbolization.

If called several times, the last process_name prevails, but the module_map is added to the existing map for the process. If a client needs to send a module_map that does not fit in a single message, they can split it and send it across several messages.

Request

NameType
payload SamplerSetProcessInfoRequest

TABLES

ExecutableSegment

Defined in fuchsia.memory.sampler/sampler.fidl

Address region that corresponds to an executable segment in an ELF module.

OrdinalFieldTypeDescription
start_address uint64

Start of the region as mapped in memory.

size uint64

Size of the range of addresses that are part of the region.

relative_address uint64

Offset of the region in the ELF binary before loading.

ModuleMap

Defined in fuchsia.memory.sampler/sampler.fidl

Information necessary for the symbolization of a module. Represents the subset of an ELF module relevant for the purposes of the profiler. The main use case for this map is the symbolization of stack traces.

OrdinalFieldTypeDescription
build_id vector<uint8>:20

Build ID, a string which uniquely identifies a module build.

executable_segments vector<ExecutableSegment>

Collection of executable segments.

SamplerRecordAllocationRequest

Defined in fuchsia.memory.sampler/sampler.fidl

OrdinalFieldTypeDescription
address uint64

Address of the allocation, to uniquely identify it.

stack_trace StackTrace

Stack frames collected at the allocation point.

A client is free to truncate their stack traces to a size below the maximum size of a message that can be sent over the channel. If a client sends a StackTrace that causes to exceed the maximum size of the message, then the record will be dropped until RFC-0196 is implemented.

size uint64

Size (in bytes) of this allocation.

SamplerRecordDeallocationRequest

Defined in fuchsia.memory.sampler/sampler.fidl

OrdinalFieldTypeDescription
address uint64

Address of the deallocation, to uniquely identify it.

stack_trace StackTrace

Stack frames collected at the deallocation point.

A client is free to truncate their stack traces to a size below the maximum size of a message that can be sent over the channel. If a client sends a StackTrace that causes to exceed the maximum size of the message, then the record will be dropped until RFC-0196 is implemented.

SamplerSetProcessInfoRequest

Defined in fuchsia.memory.sampler/sampler.fidl

OrdinalFieldTypeDescription
process_name string:32

Name of the instrumented process.

module_map vector<ModuleMap>

Current module layout, for symbolization.

StackTrace

Defined in fuchsia.memory.sampler/sampler.fidl

A stack trace, as a collection of stack frames.

OrdinalFieldTypeDescription
stack_frames vector<uint64>

Ordered vector of frame pointers, from the narrower to the wider location.

CONSTANTS

NameValueTypeDescription
BUILD_ID_BYTES 20 uint32

A build ID is a 20 bytes long sequence.