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

建構 ID,用於識別模組建構作業的字串。

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 彈性

定義於 fuchsia.memory.sampler/sampler.fidl

新增:HEAD
序數Variant類型說明
record_allocation RecordAllocationEvent
record_deallocation RecordDeallocationEvent

常數

名稱值類型說明
BUILD_ID_BYTES 20 uint32

建構 ID 是長度為 20 個位元組的序列。