summaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll
diff options
context:
space:
mode:
authorDean Michael Berris <dberris@google.com>2017-08-23 04:49:41 +0000
committerDean Michael Berris <dberris@google.com>2017-08-23 04:49:41 +0000
commitd5e52ea44da48ad994dfb79092ad5f9609836752 (patch)
tree9588187fdafb39b22a35c230652a5c049b1e6c63 /test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll
parentd7276a40d87b89aed89978dec6457a5b8b3a0db5 (diff)
[XRay][CodeGen] Use PIC-friendly code in XRay sleds; remove synthetic references in .text
Summary: This change achieves two things: - Redefine the Custom Event handling instrumentation points emitted by the compiler to not require dynamic relocation of references to the __xray_CustomEvent trampoline. - Remove the synthetic reference we emit at the end of a function that we used to keep auxiliary sections alive in favour of SHF_LINK_ORDER associated with the section where the function is defined. To achieve the custom event handling change, we've had to introduce the concept of sled versioning -- this will need to be supported by the runtime to allow us to understand how to turn on/off the new version of the custom event handling sleds. That change has to land first before we change the way we write the sleds. To remove the synthetic reference, we rely on a relatively new linker feature that preserves the sections that are associated with each other. This allows us to limit the effects on the .text section of ELF binaries. Because we're still using absolute references that are resolved at runtime for the instrumentation map (and function index) maps, we mark these sections write-able. In the future we can re-define the entries in the map to use relative relocations instead that can be statically determined by the linker. That change will be a bit more invasive so we defer this for later. Depends on D36816. Reviewers: dblaikie, echristo, pcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36615 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311525 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll')
-rw-r--r--test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll b/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll
index 5017de835b5..3cec7cd699a 100644
--- a/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll
+++ b/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll
@@ -23,14 +23,11 @@ define i32 @foo() nounwind noinline uwtable "function-instrument"="xray-always"
; CHECK-LABEL: Ltmp1:
; CHECK-NEXT: bx lr
}
-; CHECK: .p2align 4
-; CHECK-NEXT: .long {{.*}}Lxray_fn_idx_synth_0
-; CHECK-NEXT: .section {{.*}}xray_instr_map{{.*}}
+; CHECK-LABEL: xray_instr_map
; CHECK-LABEL: Lxray_sleds_start0:
; CHECK: .long {{.*}}Lxray_sled_0
; CHECK: .long {{.*}}Lxray_sled_1
; CHECK-LABEL: Lxray_sleds_end0:
-; CHECK: .section {{.*}}xray_fn_idx{{.*}}
-; CHECK-LABEL: Lxray_fn_idx_synth_0:
+; CHECK-LABEL: xray_fn_idx
; CHECK: .long {{.*}}Lxray_sleds_start0
; CHECK-NEXT: .long {{.*}}Lxray_sleds_end0