41 lines · plain
1# Check that --print-mem-data option works properly in llvm-bolt2 3# RUN: split-file %s %t4# RUN: %clang %cflags -fPIC -pie %t/main.s -o %t.exe -nostdlib -Wl,-q5# RUN: llvm-bolt %t.exe -o %t.bolt --print-mem-data=true --print-cfg \6# RUN: --data %t/fdata | FileCheck %s -check-prefix=CHECK-PRINT7# RUN: llvm-bolt %t.exe -o %t.bolt --print-cfg \8# RUN: --data %t/fdata | FileCheck %s -check-prefix=CHECK-DEFAULT9 10# CHECK-PRINT: ldr w2, [x1], #0x4 # MemoryAccessProfile: 7 total counts :11# CHECK-PRINT-NEXT: { 0x123: 1 },12# CHECK-PRINT-NEXT: { 0x456: 2 },13# CHECK-PRINT-NEXT: { 0xabc: 4 }14# CHECK-DEFAULT-NOT: MemoryAccessProfile15 16#--- main.s17 .text18 .align 419 .global main20 .type main, %function21main:22 sub sp, sp, #4823 add x1, sp, 824 add x3, sp, 4825 mov w0, 026.L2:27 ldr w2, [x1], 428 add w0, w0, w229 cmp x1, x330 bne .L231 add sp, sp, 4832 ret33 .size main, .-main34 35# The three memory access data generated by the load at36# offset 0x10 in the main.37#--- fdata384 main 10 4 otherSym 123 1394 main 10 4 otherSym 456 2404 main 10 4 otherSym abc 441