Changeset View
Changeset View
Standalone View
Standalone View
docs/StackMaps.rst
Show First 20 Lines • Show All 323 Lines • ▼ Show 20 Lines | Header { | ||||
uint16 : Reserved (expected to be 0) | uint16 : Reserved (expected to be 0) | ||||
} | } | ||||
uint32 : NumFunctions | uint32 : NumFunctions | ||||
uint32 : NumConstants | uint32 : NumConstants | ||||
uint32 : NumRecords | uint32 : NumRecords | ||||
StkSizeRecord[NumFunctions] { | StkSizeRecord[NumFunctions] { | ||||
uint64 : Function Address | uint64 : Function Address | ||||
uint64 : Stack Size | uint64 : Stack Size | ||||
uint64 : Record Count | |||||
} | } | ||||
Constants[NumConstants] { | Constants[NumConstants] { | ||||
uint64 : LargeConstant | uint64 : LargeConstant | ||||
} | } | ||||
StkMapRecord[NumRecords] { | StkMapRecord[NumRecords] { | ||||
uint64 : PatchPoint ID | uint64 : PatchPoint ID | ||||
uint32 : Instruction Offset | uint32 : Instruction Offset | ||||
uint16 : Reserved (record flags) | uint16 : Reserved (record flags) | ||||
▲ Show 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | |||||
Stack Map Usage | Stack Map Usage | ||||
=============== | =============== | ||||
The stack map support described in this document can be used to | The stack map support described in this document can be used to | ||||
precisely determine the location of values at a specific position in | precisely determine the location of values at a specific position in | ||||
the code. LLVM does not maintain any mapping between those values and | the code. LLVM does not maintain any mapping between those values and | ||||
any higher-level entity. The runtime must be able to interpret the | any higher-level entity. The runtime must be able to interpret the | ||||
stack map record given only the ID, offset, and the order of the | stack map record given only the ID, offset, and the order of the | ||||
locations, which LLVM preserves. | locations, records, and functions, which LLVM preserves. | ||||
Note that this is quite different from the goal of debug information, | Note that this is quite different from the goal of debug information, | ||||
which is a best-effort attempt to track the location of named | which is a best-effort attempt to track the location of named | ||||
variables at every instruction. | variables at every instruction. | ||||
An important motivation for this design is to allow a runtime to | An important motivation for this design is to allow a runtime to | ||||
commandeer a stack frame when execution reaches an instruction address | commandeer a stack frame when execution reaches an instruction address | ||||
associated with a stack map. The runtime must be able to rebuild a | associated with a stack map. The runtime must be able to rebuild a | ||||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | |||||
Supported Architectures | Supported Architectures | ||||
======================= | ======================= | ||||
Support for StackMap generation and the related intrinsics requires | Support for StackMap generation and the related intrinsics requires | ||||
some code for each backend. Today, only a subset of LLVM's backends | some code for each backend. Today, only a subset of LLVM's backends | ||||
are supported. The currently supported architectures are X86_64, | are supported. The currently supported architectures are X86_64, | ||||
PowerPC, and Aarch64. | PowerPC, and Aarch64. | ||||