From 876ed52c8a3e459f4ad2197ced5f257b0294a446 Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Wed, 3 Feb 2016 06:27:38 +0000 Subject: [PATCH] Add a compatibility test llvm-svn: 259632 --- .../llvm-profdata/Inputs/compat.profdata.v4 | Bin 0 -> 1336 bytes llvm/test/tools/llvm-profdata/compat.proftext | 23 +++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 llvm/test/tools/llvm-profdata/Inputs/compat.profdata.v4 diff --git a/llvm/test/tools/llvm-profdata/Inputs/compat.profdata.v4 b/llvm/test/tools/llvm-profdata/Inputs/compat.profdata.v4 new file mode 100644 index 0000000000000000000000000000000000000000..7db0d1d3f3e9d42e88f9a64ecd3ac65e69e893ca GIT binary patch literal 1336 zcmeyLQ&5zjmf6U{fE{QsL&Vvj(n3%gD$Kx%s!ajPh0y}PYZyU7_5$iq83?5S76q~w zw82|g;X0auSp{D3-&j|7;Y8gYpytm8s9 zAFiIklm}Uy1Lm6ryLpktSzx~TP{)T=+(4QiS)38(%LqH{;&&Xei<>!N7q`bD&d9*~ z`sf6Er3H}!Q2RBYbY5a^szP~YNrpmkL1J=hF$2^Ku#iG_E{M$m6<}oGXP2zr literal 0 HcmV?d00001 diff --git a/llvm/test/tools/llvm-profdata/compat.proftext b/llvm/test/tools/llvm-profdata/compat.proftext index 139202d162e6..17855a7f0f9e 100644 --- a/llvm/test/tools/llvm-profdata/compat.proftext +++ b/llvm/test/tools/llvm-profdata/compat.proftext @@ -63,5 +63,26 @@ large_numbers # FORMATV2-NEXT: Total functions: 2 # FORMATV2-NEXT: Maximum function count: 499500 # FORMATV2-NEXT: Maximum internal block count: 1000000 +# +# RUN: llvm-profdata show %S/Inputs/compat.profdata.v4 -all-functions --counts | FileCheck %s -check-prefix=FORMATV4 - +# FORMATV4: Counters: +# FORMATV4: name with spaces: +# FORMATV4: Hash: 0x0000000000000400 +# FORMATV4: Counters: 2 +# FORMATV4: Function count: 0 +# FORMATV4: Block counts: [0] +# FORMATV4: function_count_only: +# FORMATV4: Hash: 0x0000000000000000 +# FORMATV4: Counters: 1 +# FORMATV4: Function count: 97531 +# FORMATV4: Block counts: [] +# FORMATV4: large_numbers: +# FORMATV4: Hash: 0x3fffffffffffffff +# FORMATV4: Counters: 6 +# FORMATV4: Function count: 2305843009213693952 +# FORMATV4: Block counts: [1152921504606846976, 576460752303423488, 288230376151711744, 144115188075855872, 72057594037927936] +# FORMATV4: Functions shown: 3 +# FORMATV4: Total functions: 3 +# FORMATV4: Maximum function count: 2305843009213693952 +# FORMATV4: Maximum internal block count: 1152921504606846976