summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-profdata
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/tools/llvm-profdata')
-rw-r--r--llvm/test/tools/llvm-profdata/Inputs/instr-remap.expected29
-rw-r--r--llvm/test/tools/llvm-profdata/Inputs/instr-remap.proftext25
-rw-r--r--llvm/test/tools/llvm-profdata/Inputs/instr-remap.remap1
-rw-r--r--llvm/test/tools/llvm-profdata/Inputs/sample-remap.expected16
-rw-r--r--llvm/test/tools/llvm-profdata/Inputs/sample-remap.proftext18
-rw-r--r--llvm/test/tools/llvm-profdata/Inputs/sample-remap.remap2
-rw-r--r--llvm/test/tools/llvm-profdata/instr-remap.test2
-rw-r--r--llvm/test/tools/llvm-profdata/sample-remap.test2
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
OpenPOWER on IntegriCloud