mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
This replaces the llvm-profdata tool with a version that uses the recently introduced Profile library. The new tool has the ability to generate and summarize profdata files as well as merging them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203704 91177308-0d34-0410-b5e6-96231b3b80d8
39 lines
1.5 KiB
Plaintext
39 lines
1.5 KiB
Plaintext
RUN: llvm-profdata generate %p/Inputs/empty.profdata.input | llvm-profdata show -all-functions -counts - | FileCheck %s --check-prefix=EMPTY
|
|
|
|
EMPTY: Total functions: 0
|
|
EMPTY: Maximum function count: 0
|
|
EMPTY: Maximum internal block count: 0
|
|
|
|
RUN: llvm-profdata generate %p/Inputs/foo3-1.profdata.input | llvm-profdata show -all-functions -counts - | FileCheck %s --check-prefix=FOO3
|
|
|
|
FOO3: foo:
|
|
FOO3: Counters: 3
|
|
FOO3: Function count: 1
|
|
FOO3: Block counts: [2, 3]
|
|
FOO3: Total functions: 1
|
|
FOO3: Maximum function count: 1
|
|
FOO3: Maximum internal block count: 3
|
|
|
|
RUN: llvm-profdata generate %p/Inputs/foo3bar3-1.profdata.input | llvm-profdata show -all-functions -counts - | FileCheck %s --check-prefix=FOO3BAR3
|
|
|
|
FOO3BAR3: foo:
|
|
FOO3BAR3: Counters: 3
|
|
FOO3BAR3: Function count: 2
|
|
FOO3BAR3: Block counts: [3, 5]
|
|
FOO3BAR3: bar:
|
|
FOO3BAR3: Counters: 3
|
|
FOO3BAR3: Function count: 7
|
|
FOO3BAR3: Block counts: [11, 13]
|
|
FOO3BAR3: Total functions: 2
|
|
FOO3BAR3: Maximum function count: 7
|
|
FOO3BAR3: Maximum internal block count: 13
|
|
|
|
RUN: not llvm-profdata generate %p/Inputs/invalid-count-later.profdata.input -o /dev/null 2>&1 | FileCheck %s --check-prefix=INVALID-COUNT-LATER
|
|
INVALID-COUNT-LATER: error: {{.*}}: Failed to read counter
|
|
|
|
RUN: not llvm-profdata generate %p/Inputs/bad-hash.profdata.input -o /dev/null 2>&1 | FileCheck %s --check-prefix=BAD-HASH
|
|
BAD-HASH: error: {{.*}}: Failed to read hash
|
|
|
|
RUN: not llvm-profdata generate %p/Inputs/wrong-count.profdata.input -o /dev/null 2>&1 | FileCheck %s --check-prefix=BAD-FUNCTION-COUNT
|
|
BAD-FUNCTION-COUNT: error: {{.*}}: Truncated file
|