diff options
| author | Betul Buyukkurt <betulb@codeaurora.org> | 2015-11-18 18:14:55 +0000 |
|---|---|---|
| committer | Betul Buyukkurt <betulb@codeaurora.org> | 2015-11-18 18:14:55 +0000 |
| commit | 6fac1741c914939a7ca2f9a5b118dc27247f403c (patch) | |
| tree | e97807136d8bf5e75422c1a6c6b844e27294fda6 /llvm/test/tools/llvm-profdata | |
| parent | 808385f1aedc196e1b7b3ac88667aee8d5b8fa1d (diff) | |
| download | bcm5719-llvm-6fac1741c914939a7ca2f9a5b118dc27247f403c.tar.gz bcm5719-llvm-6fac1741c914939a7ca2f9a5b118dc27247f403c.zip | |
[PGO] Value profiling support
This change introduces an instrumentation intrinsic instruction for
value profiling purposes, the lowering of the instrumentation intrinsic
and raw reader updates. The raw profile data files for llvm-profdata
testing are updated.
llvm-svn: 253484
Diffstat (limited to 'llvm/test/tools/llvm-profdata')
| -rw-r--r-- | llvm/test/tools/llvm-profdata/Inputs/c-general.profraw | bin | 1384 -> 1776 bytes | |||
| -rw-r--r-- | llvm/test/tools/llvm-profdata/c-general.test | 6 | ||||
| -rw-r--r-- | llvm/test/tools/llvm-profdata/raw-32-bits-be.test | 13 | ||||
| -rw-r--r-- | llvm/test/tools/llvm-profdata/raw-32-bits-le.test | 13 | ||||
| -rw-r--r-- | llvm/test/tools/llvm-profdata/raw-64-bits-be.test | 13 | ||||
| -rw-r--r-- | llvm/test/tools/llvm-profdata/raw-64-bits-le.test | 13 | ||||
| -rw-r--r-- | llvm/test/tools/llvm-profdata/raw-two-profiles.test | 31 |
7 files changed, 64 insertions, 25 deletions
diff --git a/llvm/test/tools/llvm-profdata/Inputs/c-general.profraw b/llvm/test/tools/llvm-profdata/Inputs/c-general.profraw Binary files differindex e8cef21de5f..a4d94858a9e 100644 --- a/llvm/test/tools/llvm-profdata/Inputs/c-general.profraw +++ b/llvm/test/tools/llvm-profdata/Inputs/c-general.profraw diff --git a/llvm/test/tools/llvm-profdata/c-general.test b/llvm/test/tools/llvm-profdata/c-general.test index 01435303d44..efa9bfa18d7 100644 --- a/llvm/test/tools/llvm-profdata/c-general.test +++ b/llvm/test/tools/llvm-profdata/c-general.test @@ -6,7 +6,7 @@ REGENERATE: $ SRC=path/to/llvm REGENERATE: $ CFE=$SRC/tools/clang REGENERATE: $ TESTDIR=$SRC/test/tools/llvm-profdata REGENERATE: $ CFE_TESTDIR=$CFE/test/Profile -REGENERATE: $ clang -o a.out -fprofile-instr-generate $CFE_TESTDIR/test/Profile/c-general.c +REGENERATE: $ clang -o a.out -fprofile-instr-generate $CFE_TESTDIR/c-general.c REGENERATE: $ LLVM_PROFILE_FILE=$TESTDIR/Inputs/c-general.profraw ./a.out RUN: llvm-profdata show %p/Inputs/c-general.profraw -o - | FileCheck %s -check-prefix=CHECK @@ -14,11 +14,11 @@ RUN: llvm-profdata show %p/Inputs/c-general.profraw -o - --function=switches | F SWITCHES-LABEL: Counters: SWITCHES-NEXT: switches: -SWITCHES-NEXT: Hash: 0x0000000000000013 +SWITCHES-NEXT: Hash: 0x2618e4f23f2e8daa SWITCHES-NEXT: Counters: 19 SWITCHES-NEXT: Function count: 1 SWITCHES-LABEL: Functions shown: 1 -CHECK-LABEL: Total functions: 11 +CHECK-LABEL: Total functions: 12 CHECK-NEXT: Maximum function count: 1 CHECK-NEXT: Maximum internal block count: 100 diff --git a/llvm/test/tools/llvm-profdata/raw-32-bits-be.test b/llvm/test/tools/llvm-profdata/raw-32-bits-be.test index 86ac56d39f2..d20c36022fa 100644 --- a/llvm/test/tools/llvm-profdata/raw-32-bits-be.test +++ b/llvm/test/tools/llvm-profdata/raw-32-bits-be.test @@ -1,27 +1,36 @@ RUN: printf '\377lprofR\201' > %t -RUN: printf '\0\0\0\0\0\0\0\1' >> %t +RUN: printf '\0\0\0\0\0\0\0\2' >> %t RUN: printf '\0\0\0\0\0\0\0\2' >> %t RUN: printf '\0\0\0\0\0\0\0\3' >> %t RUN: printf '\0\0\0\0\0\0\0\6' >> %t RUN: printf '\0\0\0\0\1\0\0\0' >> %t RUN: printf '\0\0\0\0\2\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t RUN: printf '\0\0\0\3' >> %t RUN: printf '\0\0\0\1' >> %t RUN: printf '\0\0\0\0\0\0\0\1' >> %t RUN: printf '\2\0\0\0' >> %t RUN: printf '\1\0\0\0' >> %t +RUN: printf '\0\0\0\0' >> %t +RUN: printf '\0\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t RUN: printf '\0\0\0\3' >> %t RUN: printf '\0\0\0\2' >> %t RUN: printf '\0\0\0\0\0\0\0\2' >> %t RUN: printf '\2\0\0\03' >> %t RUN: printf '\1\0\0\10' >> %t +RUN: printf '\0\0\0\0' >> %t +RUN: printf '\0\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t RUN: printf '\0\0\0\0\0\0\0\023' >> %t RUN: printf '\0\0\0\0\0\0\0\067' >> %t RUN: printf '\0\0\0\0\0\0\0\101' >> %t -RUN: printf 'foobar' >> %t +RUN: printf 'foobar\0\0' >> %t RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s diff --git a/llvm/test/tools/llvm-profdata/raw-32-bits-le.test b/llvm/test/tools/llvm-profdata/raw-32-bits-le.test index 9325e7eb0f5..1bd81a87fba 100644 --- a/llvm/test/tools/llvm-profdata/raw-32-bits-le.test +++ b/llvm/test/tools/llvm-profdata/raw-32-bits-le.test @@ -1,27 +1,36 @@ RUN: printf '\201Rforpl\377' > %t -RUN: printf '\1\0\0\0\0\0\0\0' >> %t +RUN: printf '\2\0\0\0\0\0\0\0' >> %t RUN: printf '\2\0\0\0\0\0\0\0' >> %t RUN: printf '\3\0\0\0\0\0\0\0' >> %t RUN: printf '\6\0\0\0\0\0\0\0' >> %t RUN: printf '\0\0\0\1\0\0\0\0' >> %t RUN: printf '\0\0\0\2\0\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t RUN: printf '\3\0\0\0' >> %t RUN: printf '\1\0\0\0' >> %t RUN: printf '\1\0\0\0\0\0\0\0' >> %t RUN: printf '\0\0\0\2' >> %t RUN: printf '\0\0\0\1' >> %t +RUN: printf '\0\0\0\0' >> %t +RUN: printf '\0\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t RUN: printf '\3\0\0\0' >> %t RUN: printf '\2\0\0\0' >> %t RUN: printf '\02\0\0\0\0\0\0\0' >> %t RUN: printf '\03\0\0\2' >> %t RUN: printf '\10\0\0\1' >> %t +RUN: printf '\0\0\0\0' >> %t +RUN: printf '\0\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t RUN: printf '\023\0\0\0\0\0\0\0' >> %t RUN: printf '\067\0\0\0\0\0\0\0' >> %t RUN: printf '\101\0\0\0\0\0\0\0' >> %t -RUN: printf 'foobar' >> %t +RUN: printf 'foobar\0\0' >> %t RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s diff --git a/llvm/test/tools/llvm-profdata/raw-64-bits-be.test b/llvm/test/tools/llvm-profdata/raw-64-bits-be.test index b97d8b5dac6..902cedd476a 100644 --- a/llvm/test/tools/llvm-profdata/raw-64-bits-be.test +++ b/llvm/test/tools/llvm-profdata/raw-64-bits-be.test @@ -1,27 +1,36 @@ RUN: printf '\377lprofr\201' > %t -RUN: printf '\0\0\0\0\0\0\0\1' >> %t +RUN: printf '\0\0\0\0\0\0\0\2' >> %t RUN: printf '\0\0\0\0\0\0\0\2' >> %t RUN: printf '\0\0\0\0\0\0\0\3' >> %t RUN: printf '\0\0\0\0\0\0\0\6' >> %t RUN: printf '\0\0\0\1\0\4\0\0' >> %t RUN: printf '\0\0\0\2\0\4\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t RUN: printf '\0\0\0\3' >> %t RUN: printf '\0\0\0\1' >> %t RUN: printf '\0\0\0\0\0\0\0\1' >> %t RUN: printf '\0\0\0\2\0\4\0\0' >> %t RUN: printf '\0\0\0\1\0\4\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t RUN: printf '\0\0\0\3' >> %t RUN: printf '\0\0\0\2' >> %t RUN: printf '\0\0\0\0\0\0\0\02' >> %t RUN: printf '\0\0\0\2\0\4\0\03' >> %t RUN: printf '\0\0\0\1\0\4\0\10' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t RUN: printf '\0\0\0\0\0\0\0\023' >> %t RUN: printf '\0\0\0\0\0\0\0\067' >> %t RUN: printf '\0\0\0\0\0\0\0\101' >> %t -RUN: printf 'foobar' >> %t +RUN: printf 'foobar\0\0' >> %t RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s diff --git a/llvm/test/tools/llvm-profdata/raw-64-bits-le.test b/llvm/test/tools/llvm-profdata/raw-64-bits-le.test index 0e6853811ec..d2f410a6bb9 100644 --- a/llvm/test/tools/llvm-profdata/raw-64-bits-le.test +++ b/llvm/test/tools/llvm-profdata/raw-64-bits-le.test @@ -1,27 +1,36 @@ RUN: printf '\201rforpl\377' > %t -RUN: printf '\1\0\0\0\0\0\0\0' >> %t +RUN: printf '\2\0\0\0\0\0\0\0' >> %t RUN: printf '\2\0\0\0\0\0\0\0' >> %t RUN: printf '\3\0\0\0\0\0\0\0' >> %t RUN: printf '\6\0\0\0\0\0\0\0' >> %t RUN: printf '\0\0\4\0\1\0\0\0' >> %t RUN: printf '\0\0\4\0\2\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t RUN: printf '\3\0\0\0' >> %t RUN: printf '\1\0\0\0' >> %t RUN: printf '\1\0\0\0\0\0\0\0' >> %t RUN: printf '\0\0\4\0\2\0\0\0' >> %t RUN: printf '\0\0\4\0\1\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t RUN: printf '\03\0\0\0' >> %t RUN: printf '\02\0\0\0' >> %t RUN: printf '\02\0\0\0\0\0\0\0' >> %t RUN: printf '\03\0\4\0\2\0\0\0' >> %t RUN: printf '\10\0\4\0\1\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t +RUN: printf '\0\0\0\0\0\0\0\0' >> %t RUN: printf '\023\0\0\0\0\0\0\0' >> %t RUN: printf '\067\0\0\0\0\0\0\0' >> %t RUN: printf '\101\0\0\0\0\0\0\0' >> %t -RUN: printf 'foobar' >> %t +RUN: printf 'foobar\0\0' >> %t RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s diff --git a/llvm/test/tools/llvm-profdata/raw-two-profiles.test b/llvm/test/tools/llvm-profdata/raw-two-profiles.test index be78793215e..09eb121adf3 100644 --- a/llvm/test/tools/llvm-profdata/raw-two-profiles.test +++ b/llvm/test/tools/llvm-profdata/raw-two-profiles.test @@ -1,48 +1,51 @@ RUN: printf '\201rforpl\377' > %t-foo.profraw -RUN: printf '\1\0\0\0\0\0\0\0' >> %t-foo.profraw +RUN: printf '\2\0\0\0\0\0\0\0' >> %t-foo.profraw RUN: printf '\1\0\0\0\0\0\0\0' >> %t-foo.profraw RUN: printf '\1\0\0\0\0\0\0\0' >> %t-foo.profraw RUN: printf '\3\0\0\0\0\0\0\0' >> %t-foo.profraw RUN: printf '\0\0\4\0\1\0\0\0' >> %t-foo.profraw RUN: printf '\0\0\4\0\2\0\0\0' >> %t-foo.profraw +RUN: printf '\0\0\0\0\0\0\0\0' >> %t-foo.profraw +RUN: printf '\0\0\0\0\0\0\0\0' >> %t-foo.profraw +RUN: printf '\0\0\0\0\0\0\0\0' >> %t-foo.profraw RUN: printf '\3\0\0\0' >> %t-foo.profraw RUN: printf '\1\0\0\0' >> %t-foo.profraw RUN: printf '\1\0\0\0\0\0\0\0' >> %t-foo.profraw RUN: printf '\0\0\4\0\2\0\0\0' >> %t-foo.profraw RUN: printf '\0\0\4\0\1\0\0\0' >> %t-foo.profraw +RUN: printf '\0\0\0\0\0\0\0\0' >> %t-foo.profraw +RUN: printf '\0\0\0\0\0\0\0\0' >> %t-foo.profraw +RUN: printf '\0\0\0\0\0\0\0\0' >> %t-foo.profraw RUN: printf '\023\0\0\0\0\0\0\0' >> %t-foo.profraw -RUN: printf 'foo' >> %t-foo.profraw +RUN: printf 'foo\0\0\0\0\0' >> %t-foo.profraw RUN: printf '\201rforpl\377' > %t-bar.profraw -RUN: printf '\1\0\0\0\0\0\0\0' >> %t-bar.profraw +RUN: printf '\2\0\0\0\0\0\0\0' >> %t-bar.profraw RUN: printf '\1\0\0\0\0\0\0\0' >> %t-bar.profraw RUN: printf '\2\0\0\0\0\0\0\0' >> %t-bar.profraw RUN: printf '\3\0\0\0\0\0\0\0' >> %t-bar.profraw RUN: printf '\0\0\6\0\1\0\0\0' >> %t-bar.profraw RUN: printf '\0\0\6\0\2\0\0\0' >> %t-bar.profraw +RUN: printf '\0\0\0\0\0\0\0\0' >> %t-bar.profraw +RUN: printf '\0\0\0\0\0\0\0\0' >> %t-bar.profraw +RUN: printf '\0\0\0\0\0\0\0\0' >> %t-bar.profraw RUN: printf '\3\0\0\0' >> %t-bar.profraw RUN: printf '\2\0\0\0' >> %t-bar.profraw RUN: printf '\2\0\0\0\0\0\0\0' >> %t-bar.profraw RUN: printf '\0\0\6\0\2\0\0\0' >> %t-bar.profraw RUN: printf '\0\0\6\0\1\0\0\0' >> %t-bar.profraw +RUN: printf '\0\0\0\0\0\0\0\0' >> %t-bar.profraw +RUN: printf '\0\0\0\0\0\0\0\0' >> %t-bar.profraw +RUN: printf '\0\0\0\0\0\0\0\0' >> %t-bar.profraw RUN: printf '\067\0\0\0\0\0\0\0' >> %t-bar.profraw RUN: printf '\101\0\0\0\0\0\0\0' >> %t-bar.profraw -RUN: printf 'bar' >> %t-bar.profraw - -Versions of the profiles that are padded to eight byte alignment. -RUN: cat %t-foo.profraw > %t-foo-padded.profraw -RUN: printf '\0\0\0\0\0' >> %t-foo-padded.profraw -RUN: cat %t-bar.profraw > %t-bar-padded.profraw -RUN: printf '\0\0\0\0\0' >> %t-bar-padded.profraw - -RUN: cat %t-foo-padded.profraw %t-bar.profraw > %t-pad-between.profraw -RUN: cat %t-foo-padded.profraw %t-bar-padded.profraw > %t-pad.profraw +RUN: printf 'bar\0\0\0\0\0' >> %t-bar.profraw -RUN: llvm-profdata show %t-pad-between.profraw -all-functions -counts | FileCheck %s +RUN: cat %t-foo.profraw %t-bar.profraw > %t-pad.profraw RUN: llvm-profdata show %t-pad.profraw -all-functions -counts | FileCheck %s CHECK: Counters: |

