summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-profdata/Inputs
diff options
context:
space:
mode:
authorWenlei He <aktoon@gmail.com>2019-08-20 20:52:00 +0000
committerWenlei He <aktoon@gmail.com>2019-08-20 20:52:00 +0000
commit5adace352d5ef63fe344dc95a375bd33040ea987 (patch)
tree8247dcac8fda3ef360d345a46e1a15aa4c35d286 /llvm/test/tools/llvm-profdata/Inputs
parent48e81e8e10ed869f986a256127327713d362eec8 (diff)
downloadbcm5719-llvm-5adace352d5ef63fe344dc95a375bd33040ea987.tar.gz
bcm5719-llvm-5adace352d5ef63fe344dc95a375bd33040ea987.zip
[AutoFDO] Make call targets order deterministic for sample profile
Summary: StringMap is used for storing call target to frequency map for AutoFDO. However the iterating order of StringMap is non-deterministic, which leads to non-determinism in AutoFDO profile output. Now new API getSortedCallTargets and SortCallTargets are added for deterministic ordering and output. Roundtrip test for text profile and binary profile is added. Reviewers: wmi, davidxl, danielcdh Subscribers: hiraditya, mgrang, llvm-commits, twoh Tags: #llvm Differential Revision: https://reviews.llvm.org/D66191 llvm-svn: 369440
Diffstat (limited to 'llvm/test/tools/llvm-profdata/Inputs')
-rw-r--r--llvm/test/tools/llvm-profdata/Inputs/sample-profile.proftext8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/test/tools/llvm-profdata/Inputs/sample-profile.proftext b/llvm/test/tools/llvm-profdata/Inputs/sample-profile.proftext
index e34128faabc..f9f87dfd661 100644
--- a/llvm/test/tools/llvm-profdata/Inputs/sample-profile.proftext
+++ b/llvm/test/tools/llvm-profdata/Inputs/sample-profile.proftext
@@ -1,7 +1,3 @@
-_Z3bari:20301:1437
- 1: 1437
-_Z3fooi:7711:610
- 1: 610
main:184019:0
4: 534
4.2: 534
@@ -14,3 +10,7 @@ main:184019:0
1: 1000
10: inline2:2000
1: 2000
+_Z3bari:20301:1437
+ 1: 1437
+_Z3fooi:7711:610
+ 1: 610
OpenPOWER on IntegriCloud