fuchsia.memory.sampler

新增:29

协议

采样器

在 fuchsia.memory.sampler/sampler.fidl 中定义

用于渗漏进程分配信息的接口。

RecordAllocation

添加:HEAD

请求

名称类型
payload RecordAllocationEvent

RecordDeallocation

添加:HEAD

请求

名称类型
payload RecordDeallocationEvent

SetProcessInfo

传达相关的进程信息,以便进行符号化。

请求

名称类型
payload SamplerSetProcessInfoRequest

SetSharedSocket

提供用于发送分配记录的套接字。

添加:HEAD

请求

名称类型
socket handle<socket>

TABLES

ExecutableSegment

在 fuchsia.memory.sampler/sampler.fidl 中定义

与 ELF 模块中的可执行段对应的地址区域。

序数字段类型说明
start_address uint64

在内存中映射的区域的起始位置。

size uint64

属于该区域的地址范围的大小。

relative_address uint64

加载前 ELF 二进制文件中区域的偏移量。

ModuleMap

在 fuchsia.memory.sampler/sampler.fidl 中定义

模块符号化所需的信息。 表示与性能分析器相关的 ELF 模块子集。此映射的主要应用场景是堆栈轨迹的符号化。

序数字段类型说明
build_id vector<uint8>:20

Build ID,一个唯一标识模块 build 的字符串。

executable_segments vector<ExecutableSegment>

可执行片段的集合。

RecordAllocationEvent

在 fuchsia.memory.sampler/sampler.fidl 中定义

添加:HEAD

序数字段类型说明
address uint64

分配的地址,用于唯一标识分配。

stack_trace StackTrace

在分配点收集的堆栈帧。

size uint64

此分配的大小(以字节为单位)。

sampling_interval_bytes uint64

对此分配进行采样时生效的采样间隔。

RecordDeallocationEvent

在 fuchsia.memory.sampler/sampler.fidl 中定义

添加:HEAD

序数字段类型说明
address uint64

解除分配的地址,用于唯一标识解除分配。

stack_trace StackTrace

在释放点收集的堆栈帧。

SamplerSetProcessInfoRequest

在 fuchsia.memory.sampler/sampler.fidl 中定义

序数字段类型说明
process_name string:32
module_map vector<ModuleMap>

StackTrace

在 fuchsia.memory.sampler/sampler.fidl 中定义

堆栈轨迹,作为堆栈帧的集合。

序数字段类型说明
stack_frames vector<uint64>

帧指针的有序向量,从较窄的位置到较宽的位置。

UNIONS

SamplerDatagram flexible

在 fuchsia.memory.sampler/sampler.fidl 中定义

添加:HEAD
序数变体类型说明
record_allocation RecordAllocationEvent
record_deallocation RecordDeallocationEvent

常量

名称值类型说明
BUILD_ID_BYTES 20 uint32

build ID 是一个长度为 20 字节的序列。