search for: __xray_patch

Displaying 6 results from an estimated 6 matches for "__xray_patch".

2016 Jun 22
2
x86: How to Force 2-byte `jmp` instruction in lowering
...ion 8<--- The test.cc is simply: --->8 test.cc 8<--- #include <cstdio> #include <cassert> [[clang::xray_always_instrument]] void foo() { std::printf("Hello, XRay!\n"); } void bar() { std::printf("Not instrumented\n"); } extern "C" { extern int __xray_patch(); } int main(int argc, char* argv[]) { printf("main has started.\n"); bar(); foo(); __xray_patch(); foo(); } --->8 test.cc 8<--- A snippet of the disassembly (llvm-objdump -disassemble test.bin) looks like: --->8 disassembly 8<--- _Z3foov: 400cb0: e9 09 0...
2016 Jun 22
0
x86: How to Force 2-byte `jmp` instruction in lowering
...test.cc 8<--- > #include <cstdio> > #include <cassert> > > [[clang::xray_always_instrument]] void foo() { std::printf("Hello, > XRay!\n"); } > > void bar() { std::printf("Not instrumented\n"); } > > extern "C" { > extern int __xray_patch(); > } > > int main(int argc, char* argv[]) { > printf("main has started.\n"); > bar(); > foo(); > __xray_patch(); > foo(); > } > --->8 test.cc 8<--- > > A snippet of the disassembly (llvm-objdump -disassemble test.bin) looks > like:...
2016 Jun 22
0
x86: How to Force 2-byte `jmp` instruction in lowering
Hmm. Odd. I just rebuilt from scratch and it seems to work with the test/CodeGen/X86/xray-attribute-instrumentation.ll test case outputing straight to obj: llc -filetype=obj -o ~/a.o -mtriple=x86_64-apple-macosx < test/CodeGen/X86/xray-attribute-instrumentation.ll What test case are you using? In any case, the issue appears to be that llvm doesn't realize that the target address is
2016 Jun 22
3
x86: How to Force 2-byte `jmp` instruction in lowering
On Wed, Jun 22, 2016 at 6:05 AM Nirav Davé <niravd at google.com> wrote: > This appears to work: > > auto Target = OutContext.createLinkerPrivateTempSymbol(); > > with > > auto Target = OutContext.createTempSymbol(); > > -Nirav > > Thanks Nirav -- I tried this but I'm still getting a "jmpq <address>" with this incantation when I load and
2018 Jun 08
2
XRay FDR mode doesn’t log main thread calls
...=16384:buffer_max=10"); assert(status == XRayLogInitStatus::XRAY_LOG_INITIALIZED); std::cout << "Init status " << status << std::endl; // CHECK: Init status {{.*}} std::cout << "Patching..." << std::endl; // CHECK: Patching... __xray_patch(); fA(); fC(); fB(); fA(); fC(); std::thread other_thread([]() { fC(); fB(); fA(); fArg(1); }); other_thread.join(); std::cout << "Joined" << std::endl; // CHECK: Joined std::cout << "Finalize status " <&l...
2016 Apr 29
2
RFC: XRay -- A Function Call Tracing System
...locations. This will work even in non-debug builds and the sections will be merged by the linker. 5. *compiler-rt:* Implement a few functions in compiler-rt under either profiling or under a new library (we'd like to call it "xray") that look like the following: `__xray_patch(...)` <- takes a function pointer, installs some code at runtime in the instrumentation points; the provided function will be user-provided. `__xray_cleanup()` <- removes the instrumentation code and turns them back into the "nop sleds". `__xray_dump_table(...)` <-...