diff --git a/test/tools/llvm-profdata/Inputs/foo3bar3-2.proftext b/test/tools/llvm-profdata/Inputs/foo3bar3-2.proftext deleted file mode 100644 index f1f10bd6f3d..00000000000 --- a/test/tools/llvm-profdata/Inputs/foo3bar3-2.proftext +++ /dev/null @@ -1,13 +0,0 @@ -foo -3 -3 -17 -19 -23 - -bar -3 -3 -29 -31 -37 diff --git a/test/tools/llvm-profdata/Inputs/foo4-1.proftext b/test/tools/llvm-profdata/Inputs/foo4-1.proftext deleted file mode 100644 index 31d2a2ce756..00000000000 --- a/test/tools/llvm-profdata/Inputs/foo4-1.proftext +++ /dev/null @@ -1,7 +0,0 @@ -foo -4 -4 -11 -22 -33 -44 diff --git a/test/tools/llvm-profdata/Inputs/foo4-2.proftext b/test/tools/llvm-profdata/Inputs/foo4-2.proftext deleted file mode 100644 index 01d8309b5ce..00000000000 --- a/test/tools/llvm-profdata/Inputs/foo4-2.proftext +++ /dev/null @@ -1,7 +0,0 @@ -foo -4 -4 -7 -6 -5 -4 diff --git a/test/tools/llvm-profdata/general.proftext b/test/tools/llvm-profdata/general.proftext new file mode 100644 index 00000000000..591d2628d77 --- /dev/null +++ b/test/tools/llvm-profdata/general.proftext @@ -0,0 +1,56 @@ + + +# RUN: llvm-profdata merge %s -o %t.profdata + +# RUN: llvm-profdata show %t.profdata --function function_count_only --counts | FileCheck %s -check-prefix=FUNC_COUNT_ONLY +function_count_only +0 +1 +97531 +# FUNC_COUNT_ONLY: Hash: 0x{{0+$}} +# FUNC_COUNT_ONLY-NEXT: Counters: 1 +# FUNC_COUNT_ONLY-NEXT: Function count: 97531 +# FUNC_COUNT_ONLY-NEXT: Block counts: [] + +# RUN: llvm-profdata show %t.profdata --function "name with spaces" --counts | FileCheck %s -check-prefix=SPACES +name with spaces +1024 +2 +0 +0 +# SPACES: Hash: 0x{{0+}}400 +# SPACES-NEXT: Counters: 2 +# SPACES-NEXT: Function count: 0 +# SPACES-NEXT: Block counts: [0] + +# RUN: llvm-profdata show %t.profdata --function large_numbers --counts | FileCheck %s -check-prefix=LARGENUM +large_numbers +4611686018427387903 +6 +2305843009213693952 +1152921504606846976 +576460752303423488 +288230376151711744 +144115188075855872 +72057594037927936 +# LARGENUM: Hash: 0x3fffffffffffffff +# LARGENUM-NEXT: Counters: 6 +# LARGENUM-NEXT: Function count: 2305843009213693952 +# LARGENUM-NEXT: Block counts: [1152921504606846976, 576460752303423488, 288230376151711744, 144115188075855872, 72057594037927936] + +# RUN: llvm-profdata show %t.profdata --function NOSUCHFUNC | FileCheck %s -check-prefix=NOSUCHFUNC +# NOSUCHFUNC-NOT: Counters: +# NOSUCHFUNC: Functions shown: 0 + +# RUN: llvm-profdata show %t.profdata --function _ | FileCheck %s -check-prefix=SOMEFUNCS +# SOMEFUNCS: Counters: +# SOMEFUNCS: function_count_only: +# SOMEFUNCS: large_numbers: +# SOMEFUNCS: Functions shown: 2 + +# RUN: llvm-profdata show %t.profdata | FileCheck %s -check-prefix=SUMMARY +# SUMMARY-NOT: Counters: +# SUMMARY-NOT: Functions shown: +# SUMMARY: Total functions: 3 +# SUMMARY: Maximum function count: 2305843009213693952 +# SUMMARY: Maximum internal block count: 1152921504606846976 diff --git a/test/tools/llvm-profdata/multiple-inputs.test b/test/tools/llvm-profdata/multiple-inputs.test index 35f530a1f0f..616efe92bb8 100644 --- a/test/tools/llvm-profdata/multiple-inputs.test +++ b/test/tools/llvm-profdata/multiple-inputs.test @@ -12,34 +12,6 @@ FOO3: Total functions: 1 FOO3: Maximum function count: 8 FOO3: Maximum internal block count: 7 -RUN: llvm-profdata merge %p/Inputs/foo4-1.proftext %p/Inputs/foo4-2.proftext -o %t -RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO4 -RUN: llvm-profdata merge %p/Inputs/foo4-2.proftext %p/Inputs/foo4-1.proftext -o %t -RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO4 -FOO4: foo: -FOO4: Counters: 4 -FOO4: Function count: 18 -FOO4: Block counts: [28, 38, 48] -FOO4: Total functions: 1 -FOO4: Maximum function count: 18 -FOO4: Maximum internal block count: 48 - -RUN: llvm-profdata merge %p/Inputs/foo3bar3-1.proftext %p/Inputs/foo3bar3-2.proftext -o %t -RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3BAR3 -RUN: llvm-profdata merge %p/Inputs/foo3bar3-2.proftext %p/Inputs/foo3bar3-1.proftext -o %t -RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3BAR3 -FOO3BAR3: foo: -FOO3BAR3: Counters: 3 -FOO3BAR3: Function count: 19 -FOO3BAR3: Block counts: [22, 28] -FOO3BAR3: bar: -FOO3BAR3: Counters: 3 -FOO3BAR3: Function count: 36 -FOO3BAR3: Block counts: [42, 50] -FOO3BAR3: Total functions: 2 -FOO3BAR3: Maximum function count: 36 -FOO3BAR3: Maximum internal block count: 50 - RUN: llvm-profdata merge %p/Inputs/empty.proftext %p/Inputs/foo3-1.proftext -o %t RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3EMPTY FOO3EMPTY: foo: