51 lines · plain
1## Test that BOLT gracefully handles a YAML profile with unknown keys.2 3# REQUIRES: system-linux4# RUN: split-file %s %t5# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %t/main.s -o %t.o6# RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -nostdlib7# RUN: llvm-bolt %t.exe -o %t.null --data %t/profile.yaml \8# RUN: --profile-ignore-hash -v=1 2>&1 | FileCheck %s9# CHECK: warning: unknown key 'unknown-header-key'10# CHECK: warning: unknown key 'unknown_succ_key'11# CHECK: warning: unknown key 'unknown_block_key'12# CHECK: warning: unknown key 'unknown_function_key'13# CHECK: warning: unknown key 'unknown_toplev_key'14#--- main.s15 .globl main16 .type main, %function17main:18 .cfi_startproc19 cmpl $0x0, %eax20 jne .LBB021.LBB0:22 retq23 .cfi_endproc24.size main, .-main25#--- profile.yaml26---27header:28 profile-version: 129 binary-name: 'yaml-multiple-profiles.test.tmp.exe'30 binary-build-id: '<unknown>'31 profile-flags: [ lbr ]32 profile-origin: branch profile reader33 profile-events: ''34 dfs-order: false35 unknown-header-key: true36functions:37 - name: 'main'38 fid: 139 hash: 0x50BBA3441D43649140 exec: 141 nblocks: 142 blocks:43 - bid: 044 insns: 245 hash: 0x4D4D8FAF7D4C000046 succ: [ { bid: 1, cnt: 0, unknown_succ_key: 0x10 } ]47 unknown_block_key: [ ]48 unknown_function_key: 149unknown_toplev_key: ''50...51