diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-09-13 20:22:02 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-09-13 20:22:02 +0000 |
| commit | 3164fcfd273b37931e30a631f525d52ac2897fc0 (patch) | |
| tree | d479607972de427c95f835c932659126e37ab436 /llvm/test/tools/llvm-profdata | |
| parent | 2ce2652716aa1314d23b70895c67c6043842d7bd (diff) | |
| download | bcm5719-llvm-3164fcfd273b37931e30a631f525d52ac2897fc0.tar.gz bcm5719-llvm-3164fcfd273b37931e30a631f525d52ac2897fc0.zip | |
Add flag to llvm-profdata to allow symbols in profile data to be remapped, and
add a tool to generate symbol remapping files.
Summary:
The new tool llvm-cxxmap builds a symbol mapping table from a file containing
a description of partial equivalences to apply to mangled names and files
containing old and new symbol tables.
Reviewers: davidxl
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D51470
llvm-svn: 342168
Diffstat (limited to 'llvm/test/tools/llvm-profdata')
8 files changed, 95 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-profdata/Inputs/instr-remap.expected b/llvm/test/tools/llvm-profdata/Inputs/instr-remap.expected new file mode 100644 index 00000000000..f5ff5273011 --- /dev/null +++ b/llvm/test/tools/llvm-profdata/Inputs/instr-remap.expected @@ -0,0 +1,29 @@ +# IR level Instrumentation Flag +:ir +bar +# Func Hash: +1234 +# Num Counters: +2 +# Counter Values: +31 +42 + +bar +# Func Hash: +5678 +# Num Counters: +2 +# Counter Values: +500 +600 + +baz +# Func Hash: +5678 +# Num Counters: +2 +# Counter Values: +7 +8 + diff --git a/llvm/test/tools/llvm-profdata/Inputs/instr-remap.proftext b/llvm/test/tools/llvm-profdata/Inputs/instr-remap.proftext new file mode 100644 index 00000000000..ddd66719d8b --- /dev/null +++ b/llvm/test/tools/llvm-profdata/Inputs/instr-remap.proftext @@ -0,0 +1,25 @@ +# :ir is the flag to indicate this is IR level profile. +:ir +foo +1234 +2 +1 +2 + +bar +1234 +2 +30 +40 + +foo +5678 +2 +500 +600 + +baz +5678 +2 +7 +8 diff --git a/llvm/test/tools/llvm-profdata/Inputs/instr-remap.remap b/llvm/test/tools/llvm-profdata/Inputs/instr-remap.remap new file mode 100644 index 00000000000..d675fa44e50 --- /dev/null +++ b/llvm/test/tools/llvm-profdata/Inputs/instr-remap.remap @@ -0,0 +1 @@ +foo bar diff --git a/llvm/test/tools/llvm-profdata/Inputs/sample-remap.expected b/llvm/test/tools/llvm-profdata/Inputs/sample-remap.expected new file mode 100644 index 00000000000..863ea1e0725 --- /dev/null +++ b/llvm/test/tools/llvm-profdata/Inputs/sample-remap.expected @@ -0,0 +1,16 @@ +main:184019:0 + 4: 534 + 4.2: 534 + 5: 1075 + 5.1: 1075 + 6: 2080 + 7: 534 + 9: 2064 _Z3bazi:1471 _Z3fooi:631 + 10: inline2:2000 + 1: 2000 + 10: inline42:1000 + 1: 1000 +_Z3bazi:40602:2437 + 1: 2437 +_Z3fooi:7711:610 + 1: 610 diff --git a/llvm/test/tools/llvm-profdata/Inputs/sample-remap.proftext b/llvm/test/tools/llvm-profdata/Inputs/sample-remap.proftext new file mode 100644 index 00000000000..33fce647b43 --- /dev/null +++ b/llvm/test/tools/llvm-profdata/Inputs/sample-remap.proftext @@ -0,0 +1,18 @@ +_Z3bari:20301:1437 + 1: 1437 +_Z3fooi:7711:610 + 1: 610 +main:184019:0 + 4: 534 + 4.2: 534 + 5: 1075 + 5.1: 1075 + 6: 2080 + 7: 534 + 9: 2064 _Z3bari:1471 _Z3fooi:631 + 10: inline1:1000 + 1: 1000 + 10: inline2:2000 + 1: 2000 +_Z3bazi:20301:1000 + 1: 1000 diff --git a/llvm/test/tools/llvm-profdata/Inputs/sample-remap.remap b/llvm/test/tools/llvm-profdata/Inputs/sample-remap.remap new file mode 100644 index 00000000000..465c45cf25b --- /dev/null +++ b/llvm/test/tools/llvm-profdata/Inputs/sample-remap.remap @@ -0,0 +1,2 @@ +_Z3bari _Z3bazi +inline1 inline42 diff --git a/llvm/test/tools/llvm-profdata/instr-remap.test b/llvm/test/tools/llvm-profdata/instr-remap.test new file mode 100644 index 00000000000..159b7374ac3 --- /dev/null +++ b/llvm/test/tools/llvm-profdata/instr-remap.test @@ -0,0 +1,2 @@ +; RUN: llvm-profdata merge -text %S/Inputs/instr-remap.proftext -r %S/Inputs/instr-remap.remap -o %t.output +; RUN: diff %S/Inputs/instr-remap.expected %t.output diff --git a/llvm/test/tools/llvm-profdata/sample-remap.test b/llvm/test/tools/llvm-profdata/sample-remap.test new file mode 100644 index 00000000000..a6afd925ff9 --- /dev/null +++ b/llvm/test/tools/llvm-profdata/sample-remap.test @@ -0,0 +1,2 @@ +; RUN: llvm-profdata merge -sample -text %S/Inputs/sample-remap.proftext -r %S/Inputs/sample-remap.remap -o %t.output +; RUN: diff %S/Inputs/sample-remap.expected %t.output |

