[PATCH] D36816: [XRay][compiler-rt] Support sled versioning for custom event sleds

Keith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 17 17:23:32 PDT 2017


kpw added inline comments.


================
Comment at: lib/xray/xray_x86_64.cc:77
 static constexpr uint16_t MovR10Seq = 0xba41;
 static constexpr uint16_t Jmp9Seq = 0x09eb;
 static constexpr uint16_t Jmp20Seq = 0x14eb;
----------------
If 0x09eb is Jmp9Seq and 0x14eb is Jmp20Seq, I would expect Jmp16Seq to be 0x10eb.

0x0feb would match this pattern as Jmp15Seq. I think the confusion might come from address being relative to the *next* instruction.


================
Comment at: test/xray/TestCases/Linux/custom-event-logging.cc:5
 // RUN: XRAY_OPTIONS="patch_premain=false verbosity=1 xray_naive_log=false xray_logfile_base=custom-event-logging.xray-" %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_xray -std=c++11 -fpic -fpie %s -o %t
+// RUN: XRAY_OPTIONS="patch_premain=false verbosity=1 xray_naive_log=false xray_logfile_base=custom-event-logging.xray-" %run %t 2>&1 | FileCheck %s
----------------
Is the position independent code stuff related to the sled change or just along for the ride?


https://reviews.llvm.org/D36816





More information about the llvm-commits mailing list