[PATCH] D37372: [XRay][compiler-rt] Make __xray_CustomEvent PIC friendlier and build a dynamic version of the XRay runtime

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 1 00:24:44 PDT 2017


dberris created this revision.
Herald added a subscriber: mgorny.

This change moves the __xray_CustomEvent trampoline implementation from
being written in X86 assembly to C++. This allows us to leverage the
toolchain's capability to define entries for the global object table
(GOT) for globals and procedure linkage table (PLT), instead of
attempting to write those routines down in assembly.

We also take the chance to build a dynamic version of the XRay library
to prepare for enabling the use of the XRay runtime as a dynamic
library. This will require a bit more changes down the line to have a
fully supported dynamic XRay library.

We'll start adding tests to make sure that we can actually use the XRay
library in a shared library in succeeding patches.


https://reviews.llvm.org/D37372

Files:
  lib/xray/CMakeLists.txt
  lib/xray/xray_trampoline_x86_64.S
  lib/xray/xray_trampoline_x86_64_customevent.cc
  test/xray/lit.cfg

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37372.113514.patch
Type: text/x-patch
Size: 8615 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170901/830fc22b/attachment.bin>


More information about the llvm-commits mailing list