diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-09-14 20:22:03 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-09-14 20:22:03 +0000 |
commit | 23f06e53d8c2febb80192f6ff93bce78a6af011d (patch) | |
tree | afb1f3697ae9d2d39ce72b47eb495fa16ff6dc5e /llvm/docs/StackMaps.rst | |
parent | 3caf155bd3fc22b4d0c0e0dbe540290422ee085b (diff) | |
download | bcm5719-llvm-23f06e53d8c2febb80192f6ff93bce78a6af011d.tar.gz bcm5719-llvm-23f06e53d8c2febb80192f6ff93bce78a6af011d.zip |
[Stackmap] Added callsite counts to emitted function information.
Summary:
It was previously not possible for tools to use solely the stackmap
information emitted to reconstruct the return addresses of callsites in
the map, which is necessary to use the information to walk a stack. This
patch adds per-function callsite counts when emitting the stackmap
section in order to resolve the problem. Note that this slightly alters
the stackmap format, so external tools parsing these maps will need to
be updated.
**Problem Details:**
Records only store their offset from the beginning of the function they
belong to. While these records and the functions are output in program
order, it is not possible to determine where the end of one function's
records are without the callsite count when processing the records to
compute return addresses.
Patch by Kavon Farvardin!
Reviewers: atrick, ributzka, sanjoy
Subscribers: nemanjai
Differential Revision: https://reviews.llvm.org/D23487
llvm-svn: 281532
Diffstat (limited to 'llvm/docs/StackMaps.rst')
-rw-r--r-- | llvm/docs/StackMaps.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/docs/StackMaps.rst b/llvm/docs/StackMaps.rst index 5bdae38b699..a78fde16c2b 100644 --- a/llvm/docs/StackMaps.rst +++ b/llvm/docs/StackMaps.rst @@ -319,7 +319,7 @@ format of this section follows: .. code-block:: none Header { - uint8 : Stack Map Version (current version is 1) + uint8 : Stack Map Version (current version is 2) uint8 : Reserved (expected to be 0) uint16 : Reserved (expected to be 0) } @@ -329,6 +329,7 @@ format of this section follows: StkSizeRecord[NumFunctions] { uint64 : Function Address uint64 : Stack Size + uint64 : Record Count } Constants[NumConstants] { uint64 : LargeConstant @@ -434,7 +435,7 @@ precisely determine the location of values at a specific position in the code. LLVM does not maintain any mapping between those values and 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 -locations, which LLVM preserves. +locations, records, and functions, which LLVM preserves. Note that this is quite different from the goal of debug information, which is a best-effort attempt to track the location of named @@ -508,4 +509,3 @@ Support for StackMap generation and the related intrinsics requires some code for each backend. Today, only a subset of LLVM's backends are supported. The currently supported architectures are X86_64, PowerPC, and Aarch64. - |