mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
llvm-profdata: Replace redundant tests with more targeted ones
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214548 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1,13 +0,0 @@
|
|||||||
foo
|
|
||||||
3
|
|
||||||
3
|
|
||||||
17
|
|
||||||
19
|
|
||||||
23
|
|
||||||
|
|
||||||
bar
|
|
||||||
3
|
|
||||||
3
|
|
||||||
29
|
|
||||||
31
|
|
||||||
37
|
|
@@ -1,7 +0,0 @@
|
|||||||
foo
|
|
||||||
4
|
|
||||||
4
|
|
||||||
11
|
|
||||||
22
|
|
||||||
33
|
|
||||||
44
|
|
@@ -1,7 +0,0 @@
|
|||||||
foo
|
|
||||||
4
|
|
||||||
4
|
|
||||||
7
|
|
||||||
6
|
|
||||||
5
|
|
||||||
4
|
|
56
test/tools/llvm-profdata/general.proftext
Normal file
56
test/tools/llvm-profdata/general.proftext
Normal file
@@ -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
|
@@ -12,34 +12,6 @@ FOO3: Total functions: 1
|
|||||||
FOO3: Maximum function count: 8
|
FOO3: Maximum function count: 8
|
||||||
FOO3: Maximum internal block count: 7
|
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 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
|
RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3EMPTY
|
||||||
FOO3EMPTY: foo:
|
FOO3EMPTY: foo:
|
||||||
|
Reference in New Issue
Block a user