36 lines · plain
1## Test that BOLT-INFO is correctly formatted after profile quality reporting for2## a small binary.3 4# RUN: llvm-mc --filetype=obj --triple x86_64-unknown-unknown %s -o %t.o5# RUN: link_fdata %s %t.o %t.fdata6# RUN: llvm-strip --strip-unneeded %t.o7# RUN: %clang %cflags %t.o -o %t.exe -Wl,-q8# RUN: llvm-bolt %t.exe -o %t.bolt --data=%t.fdata \9# RUN: 2>&1 | FileCheck %s10 11# CHECK: BOLT-INFO: profile quality metrics for the hottest 2 functions (reporting top 5% values): function CFG discontinuity 0.00%; call graph flow conservation gap 0.00%; CFG flow conservation gap 0.00% (weighted) 0.00% (worst); exception handling usage 0.00% (of total BBEC) 0.00% (of total InvokeEC)12# CHECK-NEXT: BOLT-INFO:13 14 .text15 .globl func16 .type func, @function17func:18 pushq %rbp19 ret20LLfunc_end:21 .size func, LLfunc_end-func22 23 24 .globl main25 .type main, @function26main:27 pushq %rbp28 movq %rsp, %rbp29LLmain_func:30 call func31# FDATA: 1 main #LLmain_func# 1 func 0 0 50032 movl $4, %edi33 retq34.Lmain_end:35 .size main, .Lmain_end-main36