222 lines · plain
1# REQUIRES: x862 3# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t4# RUN: ld.lld -e A %t -o %t25# RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=NOSORT6 7# RUN: echo "A B 10" > %t.call_graph8# RUN: echo "A B 10" >> %t.call_graph9# RUN: echo "Aa B 80" >> %t.call_graph10# RUN: echo "A C 40" >> %t.call_graph11# RUN: echo "B C 30" >> %t.call_graph12# RUN: echo "C D 90" >> %t.call_graph13# RUN: echo "PP TS 100" >> %t.call_graph14# RUN: echo "_init2 _init 24567837" >> %t.call_graph15# RUN: echo "TS QC 9001" >> %t.call_graph16# RUN: echo "TooManyPreds0 TooManyPreds 10" >> %t.call_graph17# RUN: echo "TooManyPreds1 TooManyPreds 10" >> %t.call_graph18# RUN: echo "TooManyPreds2 TooManyPreds 10" >> %t.call_graph19# RUN: echo "TooManyPreds3 TooManyPreds 10" >> %t.call_graph20# RUN: echo "TooManyPreds4 TooManyPreds 10" >> %t.call_graph21# RUN: echo "TooManyPreds5 TooManyPreds 10" >> %t.call_graph22# RUN: echo "TooManyPreds6 TooManyPreds 10" >> %t.call_graph23# RUN: echo "TooManyPreds7 TooManyPreds 10" >> %t.call_graph24# RUN: echo "TooManyPreds8 TooManyPreds 10" >> %t.call_graph25# RUN: echo "TooManyPreds9 TooManyPreds 10" >> %t.call_graph26# RUN: echo "TooManyPreds10 TooManyPreds 11" >> %t.call_graph27# RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph --call-graph-profile-sort=hfsort -o %t228# RUN: llvm-readobj --symbols %t2 | FileCheck %s29 30# RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph --call-graph-profile-sort=cdsort -o %t231# RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=CDSORT32## --call-graph-profile-sort=cdsort is the default.33# RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph -o %t2b34# RUN: cmp %t2 %t2b35 36# RUN: not ld.lld -e A %t --call-graph-ordering-file %t.call_graph --call-graph-profile-sort=sort \37# RUN: -o /dev/null 2>&1 | FileCheck %s --check-prefix=UNKNOWN38 39# UNKNOWN: error: unknown --call-graph-profile-sort= value: sort40 41 .section .text.D,"ax",@progbits42D:43 retq44 45 .section .text.C,"ax",@progbits46 .globl C47C:48 retq49 50 .section .text.B,"ax",@progbits51 .globl B52B:53 retq54 55 .section .text.A,"ax",@progbits56 .globl A57A:58Aa:59 retq60 61 .section .ponies,"ax",@progbits,unique,162 .globl TS63TS:64 retq65 66 .section .ponies,"ax",@progbits,unique,267 .globl PP68PP:69 retq70 71 .section .other,"ax",@progbits,unique,172 .globl QC73QC:74 retq75 76 .section .other,"ax",@progbits,unique,277 .globl GB78GB:79 retq80 81 .section .init,"ax",@progbits,unique,182 .globl _init83_init:84 retq85 86 .section .init,"ax",@progbits,unique,287 .globl _init288_init2:89 retq90 91 .section .text.TooManyPreds,"ax",@progbits92TooManyPreds:93 retq94 retq95 retq96 retq97 retq98 retq99 retq100 retq101 retq102 retq103 104 .section .text.TooManyPreds0,"ax",@progbits105TooManyPreds0:106 retq107 108 .section .text.TooManyPreds1,"ax",@progbits109TooManyPreds1:110 retq111 112 .section .text.TooManyPreds2,"ax",@progbits113TooManyPreds2:114 retq115 116 .section .text.TooManyPreds3,"ax",@progbits117TooManyPreds3:118 retq119 120 .section .text.TooManyPreds4,"ax",@progbits121TooManyPreds4:122 retq123 124 .section .text.TooManyPreds5,"ax",@progbits125TooManyPreds5:126 retq127 128 .section .text.TooManyPreds6,"ax",@progbits129TooManyPreds6:130 retq131 132 .section .text.TooManyPreds7,"ax",@progbits133TooManyPreds7:134 retq135 136 .section .text.TooManyPreds8,"ax",@progbits137TooManyPreds8:138 retq139 140 .section .text.TooManyPreds9,"ax",@progbits141TooManyPreds9:142 retq143 144 .section .text.TooManyPreds10,"ax",@progbits145TooManyPreds10:146 retq147 148# CHECK: Name: D149# CHECK-NEXT: Value: 0x201123150# CHECK: Name: TooManyPreds151# CHECK-NEXT: Value: 0x201124152# CHECK: Name: TooManyPreds10153# CHECK-NEXT: Value: 0x201138154# CHECK: Name: C155# CHECK-NEXT: Value: 0x201122156# CHECK: Name: B157# CHECK-NEXT: Value: 0x201121158# CHECK: Name: A159# CHECK-NEXT: Value: 0x201120160# CHECK: Name: TS161# CHECK-NEXT: Value: 0x20113D162# CHECK: Name: PP163# CHECK-NEXT: Value: 0x20113C164# CHECK: Name: QC165# CHECK-NEXT: Value: 0x20113E166# CHECK: Name: GB167# CHECK-NEXT: Value: 0x20113F168# CHECK: Name: _init169# CHECK-NEXT: Value: 0x201140170# CHECK: Name: _init2171# CHECK-NEXT: Value: 0x201141172 173# CDSORT: Name: D174# CDSORT-NEXT: Value: 0x201123175# CDSORT: Name: TooManyPreds176# CDSORT-NEXT: Value: 0x20112F177# CDSORT: Name: TooManyPreds10178# CDSORT-NEXT: Value: 0x20112E179# CDSORT: Name: C180# CDSORT-NEXT: Value: 0x201122181# CDSORT: Name: B182# CDSORT-NEXT: Value: 0x201121183# CDSORT: Name: A184# CDSORT-NEXT: Value: 0x201120185# CDSORT: Name: TS186# CDSORT-NEXT: Value: 0x20113D187# CDSORT: Name: PP188# CDSORT-NEXT: Value: 0x20113C189# CDSORT: Name: QC190# CDSORT-NEXT: Value: 0x20113E191# CDSORT: Name: GB192# CDSORT-NEXT: Value: 0x20113F193# CDSORT: Name: _init194# CDSORT-NEXT: Value: 0x201140195# CDSORT: Name: _init2196# CDSORT-NEXT: Value: 0x201141197 198# NOSORT: Name: D199# NOSORT-NEXT: Value: 0x201120200# NOSORT: Name: TooManyPreds201# NOSORT-NEXT: Value: 0x201124202# NOSORT: Name: TooManyPreds10203# NOSORT-NEXT: Value: 0x201138204# NOSORT: Name: C205# NOSORT-NEXT: Value: 0x201121206# NOSORT: Name: B207# NOSORT-NEXT: Value: 0x201122208# NOSORT: Name: A209# NOSORT-NEXT: Value: 0x201123210# NOSORT: Name: TS211# NOSORT-NEXT: Value: 0x201139212# NOSORT: Name: PP213# NOSORT-NEXT: Value: 0x20113A214# NOSORT: Name: QC215# NOSORT-NEXT: Value: 0x20113B216# NOSORT: Name: GB217# NOSORT-NEXT: Value: 0x20113C218# NOSORT: Name: _init219# NOSORT-NEXT: Value: 0x20113D220# NOSORT: Name: _init2221# NOSORT-NEXT: Value: 0x20113E222