brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 432797e Raw
40 lines · plain
1## This reproduces a bug where profile collected from perf without LBRs and2## converted into fdata-no-lbr format is reported to not contain profile for any3## functions.4 5# REQUIRES: system-linux6 7# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \8# RUN:   %s -o %t.o9# RUN: link_fdata --no-lbr %s %t.o %t.fdata10# RUN: FileCheck %s --input-file %t.fdata --check-prefix=CHECK-FDATA11# RUN: llvm-strip --strip-unneeded %t.o12# RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -nostdlib13# RUN: llvm-bolt %t.exe -o %t.out --data %t.fdata --dyno-stats -ba \14# RUN:    --print-only=_start 2>&1 | FileCheck %s --check-prefix=CHECK-BOLT15 16# CHECK-FDATA:      no_lbr17# CHECK-FDATA-NEXT: 1 _start [[#]] 118 19# CHECK-BOLT: BOLT-INFO: pre-processing profile using branch profile reader20# CHECK-BOLT: BOLT-INFO: operating with basic samples profiling data (no brstack).21# CHECK-BOLT: BOLT-INFO: 1 out of 1 functions in the binary (100.0%) have non-empty execution profile22 23  .globl _start24  .type _start, %function25_start:26  pushq	%rbp27  movq	%rsp, %rbp28  cmpl  $0x0, %eax29a:30# FDATA: 1 _start #a# 131  je b32  movl	$0x0, %eax33  jmp c34b:35  movl  $0x1, %eax36c:37  popq	%rbp38  retq39.size _start, .-_start40