llvm-6502/test/tools/llvm-profdata/simple.test
Justin Bogner 496d7f66a0 ProfileData: Introduce InstrProfWriter using the naive text format
This isn't a format we'll want to write out in practice, but moving it
to the writer library simplifies llvm-profdata and isolates it from
further changes to the format.

This also allows us to update the tests to not rely on the text output
format.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204489 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-21 17:46:22 +00:00

69 lines
3.0 KiB
Plaintext

RUN: llvm-profdata merge %p/Inputs/foo3-1.profdata %p/Inputs/foo3-2.profdata 2>&1 | llvm-profdata show - -all-functions -counts | FileCheck %s --check-prefix=FOO3
RUN: llvm-profdata merge %p/Inputs/foo3-2.profdata %p/Inputs/foo3-1.profdata 2>&1 | llvm-profdata show - -all-functions -counts | FileCheck %s --check-prefix=FOO3
FOO3: foo:
FOO3: Counters: 3
FOO3: Function count: 8
FOO3: Block counts: [7, 6]
FOO3: Total functions: 1
FOO3: Maximum function count: 8
FOO3: Maximum internal block count: 7
RUN: llvm-profdata merge %p/Inputs/foo4-1.profdata %p/Inputs/foo4-2.profdata 2>&1 | llvm-profdata show - -all-functions -counts | FileCheck %s --check-prefix=FOO4
RUN: llvm-profdata merge %p/Inputs/foo4-2.profdata %p/Inputs/foo4-1.profdata 2>&1 | llvm-profdata show - -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.profdata %p/Inputs/foo3bar3-2.profdata 2>&1 | llvm-profdata show - -all-functions -counts | FileCheck %s --check-prefix=FOO3BAR3
RUN: llvm-profdata merge %p/Inputs/foo3bar3-2.profdata %p/Inputs/foo3bar3-1.profdata 2>&1 | llvm-profdata show - -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.profdata %p/Inputs/foo3-1.profdata 2>&1 | llvm-profdata show - -all-functions -counts | FileCheck %s --check-prefix=FOO3EMPTY
FOO3EMPTY: foo:
FOO3EMPTY: Counters: 3
FOO3EMPTY: Function count: 1
FOO3EMPTY: Block counts: [2, 3]
FOO3EMPTY: Total functions: 1
FOO3EMPTY: Maximum function count: 1
FOO3EMPTY: Maximum internal block count: 3
RUN: llvm-profdata merge %p/Inputs/foo3-1.profdata %p/Inputs/foo3bar3-1.profdata 2>&1 | llvm-profdata show - -all-functions -counts | FileCheck %s --check-prefix=FOO3FOO3BAR3
FOO3FOO3BAR3: foo:
FOO3FOO3BAR3: Counters: 3
FOO3FOO3BAR3: Function count: 3
FOO3FOO3BAR3: Block counts: [5, 8]
FOO3FOO3BAR3: bar:
FOO3FOO3BAR3: Counters: 3
FOO3FOO3BAR3: Function count: 7
FOO3FOO3BAR3: Block counts: [11, 13]
FOO3FOO3BAR3: Total functions: 2
FOO3FOO3BAR3: Maximum function count: 7
FOO3FOO3BAR3: Maximum internal block count: 13
RUN: llvm-profdata merge %p/Inputs/foo3-1.profdata %p/Inputs/bar3-1.profdata 2>&1 | llvm-profdata show - -all-functions -counts | FileCheck %s --check-prefix=DISJOINT
DISJOINT: foo:
DISJOINT: Counters: 3
DISJOINT: Function count: 1
DISJOINT: Block counts: [2, 3]
DISJOINT: bar:
DISJOINT: Counters: 3
DISJOINT: Function count: 1
DISJOINT: Block counts: [2, 3]
DISJOINT: Total functions: 2
DISJOINT: Maximum function count: 1
DISJOINT: Maximum internal block count: 3