mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
0695b20d9a
Since the profile can come from 32-bit machines, we need to check the pointer size. Change the magic number to facilitate this. Adds tests for reading 32-bit and 64-bit binaries (both big- and little-endian). The tests write a binary using printf in RUN lines (like raw-magic-but-no-header.test). Assuming the bots don't complain, this seems like a better way forward for testing RawInstrProfReader than committing binary files. <rdar://problem/16400648> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204557 91177308-0d34-0410-b5e6-96231b3b80d8
43 lines
1.2 KiB
Plaintext
43 lines
1.2 KiB
Plaintext
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\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\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\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\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: llvm-profdata show %t -all-functions -counts | FileCheck %s
|
|
|
|
CHECK: Counters:
|
|
CHECK: foo:
|
|
CHECK: Hash: 0x0000000000000001
|
|
CHECK: Counters: 1
|
|
CHECK: Function count: 19
|
|
CHECK: Block counts: []
|
|
CHECK: bar:
|
|
CHECK: Hash: 0x0000000000000002
|
|
CHECK: Counters: 2
|
|
CHECK: Function count: 55
|
|
CHECK: Block counts: [65]
|
|
CHECK: Functions shown: 2
|
|
CHECK: Total functions: 2
|
|
CHECK: Maximum function count: 55
|
|
CHECK: Maximum internal block count: 65
|