brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.6 KiB · 705e5ef Raw
62 lines · plain
1// Header2//3// INSTR_PROF_RAW_HEADER(uint64_t, Magic, __llvm_profile_get_magic())4// INSTR_PROF_RAW_HEADER(uint64_t, Version, __llvm_profile_get_version())5// INSTR_PROF_RAW_HEADER(uint64_t, BinaryIdsSize, __llvm_write_binary_ids(NULL))6// INSTR_PROF_RAW_HEADER(uint64_t, DataSize, DataSize)7// INSTR_PROF_RAW_HEADER(uint64_t, CountersSize, CountersSize)8// INSTR_PROF_RAW_HEADER(uint64_t, NumBitmaskBytes, NumBitmaskBytes)9// INSTR_PROF_RAW_HEADER(uint64_t, NamesSize,  NamesSize)10// INSTR_PROF_RAW_HEADER(uint64_t, CountersDelta, (uintptr_t)CountersBegin)11// INSTR_PROF_RAW_HEADER(uint64_t, BitmaskDelta, (uintptr_t)BitmaskBegin)12// INSTR_PROF_RAW_HEADER(uint64_t, NamesDelta, (uintptr_t)NamesBegin)13// INSTR_PROF_RAW_HEADER(uint64_t, VNamesSize, VNamesSize)14// INSTR_PROF_RAW_HEADER(uint64_t, NumVTables, NumVTables)15// INSTR_PROF_RAW_HEADER(uint64_t, ValueKindLast, IPVK_Last)16 17// gnuwin32 printf does not work for this test because it will print \15 (CR)18// whenever \12 (LF) is in the input string.19UNSUPPORTED: system-windows20RUN: printf '\201rforpl\377' > %t.profraw21RUN: printf '\12\0\0\0\0\0\0\0' >> %t.profraw22RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw23RUN: printf '\1\0\0\0\0\0\0\0' >> %t.profraw24RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw25RUN: printf '\1\0\0\0\0\0\0\0' >> %t.profraw26RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw27RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw28RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw29RUN: printf '\10\0\0\0\0\0\0\0' >> %t.profraw30RUN: printf '\0\0\4\0\1\0\0\0' >> %t.profraw31RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw32RUN: printf '\0\0\4\0\2\0\0\0' >> %t.profraw33RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw34RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw35RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw36 37// Data Section38//39// struct ProfData {40// #define INSTR_PROF_DATA(Type, LLVMType, Name, Initializer) \41//    Type Name;42// #include "llvm/ProfileData/InstrProfData.inc"43// };44 45RUN: printf '\254\275\030\333\114\302\370\134' >> %t.profraw46RUN: printf '\1\0\0\0\0\0\0\0' >> %t.profraw47RUN: printf '\0\0\4\0\1\0\0\0' >> %t.profraw48RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw49RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw50RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw51RUN: printf '\1\0\0\0\0\0\0\0' >> %t.profraw52RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw53 54RUN: printf '\023\0\0\0\0\0\0\0' >> %t.profraw55RUN: printf '\3\0foo\0\0\0' >> %t.profraw56 57// Write some garbage data at the end so we get "not enough space for another header" message58RUN: printf '\x03\x00\' >> %t.profraw59 60RUN: not llvm-profdata show %t.profraw 2>&1 | FileCheck %s61CHECK: malformed instrumentation profile data: not enough space for another header62