34 lines · plain
1## This reproduces a bug with misidentification of a parent fragment.2 3RUN: split-file %p/Inputs/ambiguous_fragment.s %t4 5RUN: llvm-mc --filetype=obj --triple x86_64-unknown-unknown %t/file1 -o %t1.o6RUN: llvm-mc --filetype=obj --triple x86_64-unknown-unknown %t/file2 -o %t2.o7RUN: llvm-mc --filetype=obj --triple x86_64-unknown-unknown %t/file3 -o %t3.o8RUN: llvm-mc --filetype=obj --triple x86_64-unknown-unknown %t/file4 -o %t4.o9RUN: llvm-mc --filetype=obj --triple x86_64-unknown-unknown %t/file5 -o %t5.o10 11RUN: ld.lld %t1.o %t2.o %t3.o %t4.o %t5.o -o %t.exe \12RUN: --script %p/Inputs/ambiguous_fragment.script13 14RUN: llvm-objcopy %t.exe %t.exe2 \15RUN: --add-symbol=_Zfunc.cold.0=.text.cold:0x4,local,function \16RUN: --add-symbol=_Zfunc=.text:0xc,function17 18RUN: llvm-objdump --syms %t.exe2 | FileCheck %s --check-prefix=CHECK-SYMS19 20RUN: link_fdata %s %t.exe2 %t.preagg PREAGG21RUN: perf2bolt -v=1 %t.exe2 -p %t.preagg --pa -o %t.fdata -w %t.yaml | FileCheck %s22 23# PREAGG: B X:0 #__func# 1 024 25CHECK-SYMS: 0000000000020004 {{.*}} __func.cold.026CHECK-SYMS: 0000000000020004 {{.*}} _Zfunc.cold.027 28CHECK-NOT: BOLT-ERROR: parent function not found for __func.cold.029CHECK: BOLT-INFO: marking __func.cold.0/3(*4) as a fragment of __func/4(*3)30CHECK-NEXT: BOLT-INFO: marking __func.cold.0/1(*2) as a fragment of __func/1(*2)31CHECK-NEXT: BOLT-INFO: marking __func.cold.0/2(*2) as a fragment of __func/2(*2)32CHECK-NEXT: BOLT-INFO: marking __func.cold.0/3(*4) as a fragment of __func/3(*2)33CHECK-NEXT: BOLT-INFO: marking __func.cold.0/4(*2) as a fragment of __func/4(*3)34