Displaying 7 results from an estimated 7 matches for "xray_always_instrument".
2018 Jun 08
2
XRay FDR mode doesn’t log main thread calls
...UIRES: built-in-llvm-tree
#include "xray/xray_log_interface.h"
#include <cassert>
#include <chrono>
#include <cstdio>
#include <iostream>
#include <stdlib.h>
#include <thread>
#include <time.h>
thread_local uint64_t var = 0;
[[clang::xray_always_instrument]] void __attribute__((noinline)) fC() {
++var; }
[[clang::xray_always_instrument]] void __attribute__((noinline)) fB() {
fC(); }
[[clang::xray_always_instrument]] void __attribute__((noinline)) fA() {
fB(); }
[[clang::xray_always_instrument, clang::xray_log_args(1)]]
void __attribute__((n...
2016 Jun 28
2
XRay: Demo on x86_64/Linux almost done; some questions.
...fferent places, are there suggestions for where the docs should live?
Cheers
PS. An example log of how to use XRay with clang+llvm+compiler-rt with the
above patches:
[16-06-28 17:21:02] dberris at dberris: ~/xray/llvm-build% cat test.cc
#include <cstdio>
#include <cassert>
[[clang::xray_always_instrument]] void foo() { std::printf("Hello,
XRay!\n"); }
[[clang::xray_never_instrument]] void bar() { std::printf("Not
instrumented\n"); }
extern void baz(); // defined in other.cc
int main(int argc, char* argv[]) {
printf("main has started.\n");
bar();
foo();
baz(...
2019 Feb 02
2
[llvm-xray] llvm-xray cannot log every functions
...;
void enterData(int firstMatrix[][10], int secondMatrix[][10], int rowFirst, int columnFirst, int rowSecond, int columnSecond);
void multiplyMatrices(int firstMatrix[][10], int secondMatrix[][10], int multResult[][10], int rowFirst, int columnFirst, int rowSecond, int columnSecond) __attribute__((xray_always_instrument));
void display(int mult[][10], int rowFirst, int columnSecond);
int main()
{
int firstMatrix[10][10], secondMatrix[10][10], mult[10][10], rowFirst, columnFirst, rowSecond, columnSecond, i, j, k;
printf("Enter rows and column for first matrix: ");
scanf("%d %d", &rowFirst,...
2016 Jun 22
2
x86: How to Force 2-byte `jmp` instruction in lowering
...-lc -lgcc
--as-needed -lgcc_s --no-as-needed
/usr/lib/gcc/x86_64-linux-gnu/4.8/crtend.o
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crtn.o
--->8 clang invocation 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();
}
-...
2016 Jun 22
0
x86: How to Force 2-byte `jmp` instruction in lowering
...sr/lib/gcc/x86_64-linux-gnu/4.8/crtend.o
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crtn.o
> --->8 clang invocation 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");
&...
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