summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-readobj/ELFDumper.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2016-09-14 20:22:03 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2016-09-14 20:22:03 +0000
commit23f06e53d8c2febb80192f6ff93bce78a6af011d (patch)
treeafb1f3697ae9d2d39ce72b47eb495fa16ff6dc5e /llvm/tools/llvm-readobj/ELFDumper.cpp
parent3caf155bd3fc22b4d0c0e0dbe540290422ee085b (diff)
downloadbcm5719-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/tools/llvm-readobj/ELFDumper.cpp')
-rw-r--r--llvm/tools/llvm-readobj/ELFDumper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp
index 1c1b69aa31b..05c5ab34991 100644
--- a/llvm/tools/llvm-readobj/ELFDumper.cpp
+++ b/llvm/tools/llvm-readobj/ELFDumper.cpp
@@ -2366,7 +2366,7 @@ template <class ELFT> void ELFDumper<ELFT>::printStackMap() const {
ArrayRef<uint8_t> StackMapContentsArray =
unwrapOrError(Obj->getSectionContents(StackMapSection));
- prettyPrintStackMap(llvm::outs(), StackMapV1Parser<ELFT::TargetEndianness>(
+ prettyPrintStackMap(llvm::outs(), StackMapV2Parser<ELFT::TargetEndianness>(
StackMapContentsArray));
}
OpenPOWER on IntegriCloud