search for: fxray

Displaying 20 results from an estimated 20 matches for "fxray".

Did you mean: xray
2019 Jan 21
2
[X-ray] How to check successful instrumentation and generate call trace?
Hi all, I want to test X-ray performance and compare it with other research tools, so I use Clang 7.0.0 to compile and instrument GNU binutils-2.3.1 with the following commands: cd binutils-2.31/ mkdir build cd build/ CC=$local/clang CXX=$local/clang++ CFLAGS=-fxray-instrument CXXFLAGS=-fxray-instrument ../configure --prefix=/home/zhangysh1995/local make Then I extract instrumentation map with llvm-xray extract addr2line and it returns: --- - { id: 1, address: 0x000000000041CD70, function: 0x000000000041CD70, kind: function-enter, always-instrument: false, f...
2017 Dec 05
2
XRay Trace of Clang, Loadable through Chrome Trace Viewer
Hi cfe-dev@ and llvm-dev@, I've attached a Chrome trace-viewer readable trace of a clang built with XRay instrumentation (additional build/link flags="-fxray-instrument -fxray-instruction-threshold=75") with the latest "top-of-trunk" version of clang with the recent updates to the XRay runtime supporting record filtering. To load the attached file, go to 'chrome://tracing' in your Chrome/Chromium browser and load the .gz file dir...
2018 Mar 11
1
Using Xray compilation with C programs
...already filed a bug for this issue: https://bugs.llvm.org/show_bug.cgi?id=34904 Is there any way to get around this bug or to solve this issue? Issue description from the filed bug: According to documentation it should be possible to use xray instrumentation on C program by specifying the flags -fxray-instrument. Linking fails when compiling the following program: ----8<----- (minimal.c) int main () { return 0; } ----8<----- $ clang --version clang version 6.0.0 (trunk 315272) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/jonasbu/local/bin $ clang -fxray-ins...
2017 Dec 05
2
[cfe-dev] XRay Trace of Clang, Loadable through Chrome Trace Viewer
...;> On Tue, Dec 5, 2017 at 9:49 AM, Dean Michael Berris via cfe-dev <cfe-dev at lists.llvm.org> wrote: >> Hi cfe-dev@ and llvm-dev@, >> >> I've attached a Chrome trace-viewer readable trace of a clang built with XRay instrumentation (additional build/link flags="-fxray-instrument -fxray-instruction-threshold=75") with the latest "top-of-trunk" version of clang with the recent updates to the XRay runtime supporting record filtering. >> >> To load the attached file, go to 'chrome://tracing' in your Chrome/Chromium browser and loa...
2016 Jul 20
2
[XRay] Build instrumented Clang, some analysis results
...llvm is set up appropriately $ cd llvm-build $ cmake -DCMAKE_BUILD_TYPE=Release -G Ninja ../llvm $ ninja $ cd .. 2) Build clang again, preferably in another build directory where you can use the clang and compiler-rt built in #1, this time with the following additional flags for CMAKE_CXX_FLAGS: `-fxray-instrument` `-fxray-instruction-threshold=1`. The second flag tells clang+llvm to instrument functions that have at least one instruction in it. An example session of this would look something like: $ mkdir xray-llvm-build $ cd xray-llvm-build $ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILE...
2016 Jun 28
2
XRay: Demo on x86_64/Linux almost done; some questions.
...-rt will now allow for building and running binaries with a very simple version of XRay included: http://reviews.llvm.org/D21612 (compiler-rt) http://reviews.llvm.org/D20352 (clang) http://reviews.llvm.org/D19904 (llvm) To use this on x86_64-unknown-linux-gnu you'd need to set the flags '-fxray-instrument' and if you'd like to instrument all functions, set '-fxray-instruction-threshold=1'. Apply those flags to all your object files, and link statically for best effect. Now, some questions before I continue: - What is the preferred way of controlling the behaviour of the...
2019 Feb 02
2
[llvm-xray] llvm-xray cannot log every functions
...ed programs: set(CMAKE_C_COMPILER "/home/shangatlab/Desktop/llvm_01_23_19/build/bin/clang") set(CMAKE_CXX_COMPILER "/home/shangatlab/Desktop/llvm_01_23_19/build/bin/clang++") project("trace test project") set(CMAKE_C_FLAGS "-fxray-instrument -fxray-instruction-threshold=1") set(CMAKE_CXX_FLAGS "-fxray-instrument -fxray-instruction-threshold=1") add_executable(matrix matrix.c ) As the official document said, I put on instruction threshold flag to 1, and is using the m...
2018 Aug 27
2
Testing LLVM XRay
Hi All, I am trying to test run clang XRay tool. I was following the steps at [1]. But the log file does not seem to get generated. According to the instructions I used 'fxray-instrument' switch when compiling and then specified 'patch_premain=true' at XRAY_OPTIONS. Is there anything else that I need to do? I am on a trunk build of clang. Could that be it? I am on clang version 8.0.0 (trunk 340502). Regards Buddhika [1] https://llvm.org/docs/XRayExample.htm...
2017 Jun 08
2
XRay threshold (bug?)
...threshold against Function::size() . However, Function::size() returns the number of basic blocks (as I understand, such as cycle bodies, if/else bodies, switch-case bodies, etc.), rather than the number of instructions. Was your intent to count the instructions instead? The name of the parameter -fxray-instruction-threshold=N suggests this, as well as XRay documentation at http://llvm.org/docs/XRay.html . If so, I see two options: 1. Count the number of MachineInstr`s in MachineFunction : this gives better estimate for the number of assembly instructions on the target. So a user can check in dis...
2016 Jun 22
2
x86: How to Force 2-byte `jmp` instruction in lowering
...iews.llvm.org/D20352 and compiler-rt patched with http://reviews.llvm.org/D21612) on Linux, I'm getting something different. Here's a sample of the transcript, and what I'm seeing: --->8 clang invocation 8<--- [16-06-23 3:33:42] dberris at dberris: ~/xray/llvm-build% ./bin/clang -fxray-instrument -x c++ -std=c++11 -o test.bin test.cc -g --verbose clang version 3.9.0 (http://llvm.org/git/clang.git 3ae26ac8b1c9c5db65f3dc0236139448b8b0520a) (http://llvm.org/git/llvm.git 8fd5dd6aa8a633eeb03b245cd0060479371fc521) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /usr/...
2016 Jun 17
2
RFC: Comprehensive Static Instrumentation
On Fri, Jun 17, 2016 at 5:42 AM Matthias Braun via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Some of this overlaps with the features in XRay ( > http://lists.llvm.org/pipermail/llvm-dev/2016-April/098901.html). > > Matthias beat me to it! >From reading the RFC, it seems that some of what XRay is doing on the instrumentation side is very similar to what CSI enables. The
2016 Jun 22
0
x86: How to Force 2-byte `jmp` instruction in lowering
...iler-rt patched with > http://reviews.llvm.org/D21612) on Linux, I'm getting something > different. Here's a sample of the transcript, and what I'm seeing: > > --->8 clang invocation 8<--- > [16-06-23 3:33:42] dberris at dberris: ~/xray/llvm-build% ./bin/clang > -fxray-instrument -x c++ -std=c++11 -o test.bin test.cc -g --verbose > clang version 3.9.0 (http://llvm.org/git/clang.git > 3ae26ac8b1c9c5db65f3dc0236139448b8b0520a) (http://llvm.org/git/llvm.git > 8fd5dd6aa8a633eeb03b245cd0060479371fc521) > Target: x86_64-unknown-linux-gnu > Thread model:...
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
...u May 17 12:56:46 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux I will demonstrate the behavior mentioned above by displaying the result from the test file and then the result from modifying the fdr-mode.cc test provided in the TestCases/Posix directory. ====UNMODIFIED fdr-mode.cc==== ./clang++ -fxray-instrument fdr-mode.cc -o fdr-mode XRAY_OPTIONS="patch_premain=false xray_mode=xray-fdr verbosity=1" XRAY_FDR_OPTIONS="func_duration_thr eshold_us=0" ./fdr-mode Logging before init. ==31756==Initializing FDR mode with options: buffer_size=16384:buffer_max=10 ==31756==XRay...
2016 Apr 29
2
RFC: XRay -- A Function Call Tracing System
...to indicate whether a function should either always or never be instrumentable. The intent is to propagate this attribute as text attributes on LLVM functions until we can consolidate the function instrumentation implementations to use this attribute too. 2. *Clang:* Add flags (`-fxray-instrument=`) to enable and control this behaviour. Further configuration flags will enable users to specify functions to always/never instrument, and add thresholds for some heuristics. 3. *LLVM:* Add new LLVM pseudo instructions for indicating where the instrumentation sleds sh...
2018 Jun 07
2
XRay TID mismatch when forking
...("\nTID of child: %lu\n", internal_syscall(SYSCALL(gettid))); break; } } return 0; } I compiled the test file using clang 7.0 and ran it: ================= ./clang++ -fxray-instrument test.cpp –o test XRAY_OPTIONS="patch_premain=true xray_mode=xray-basic verbosity=1" ./test The output shows that logger prints out the parent TID 11 times, but making the gettid syscall in the test shows that the TIDs of the children are different than their parent process....
2017 Mar 13
5
Use of the C++ standard library in XRay compiler-rt
On Sun, Mar 12, 2017, 4:10 PM Dean Michael Berris <dean.berris at gmail.com> wrote: > > > On 9 Mar 2017, at 09:32, David Blaikie via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > > > I agree that we should clean up the standard library usage even just for > consistency. > > > > +1 -- now that I think about it, it should be fairly doable
2017 Feb 11
2
Asan self host problems: Failed to deallocate
Trying to run a self host "ninja check-clang" with ASan enabled I hit a /lot/ of errors like this (strangely I hit none of these in check-llvm, only in check-clang): Any ideas? ==10525==ERROR: AddressSanitizer failed to deallocate 0x10800 (67584) bytes at address 0x631000014800 ==10525==AddressSanitizer CHECK failed:
2017 Feb 15
2
Asan self host problems: Failed to deallocate
...AL_DTOR_FLAG:INTERNAL=1 //Test COMPILER_RT_HAS_WUNUSED_PARAMETER_FLAG COMPILER_RT_HAS_WUNUSED_PARAMETER_FLAG:INTERNAL=1 //Test COMPILER_RT_HAS_WVARIADIC_MACROS_FLAG COMPILER_RT_HAS_WVARIADIC_MACROS_FLAG:INTERNAL=1 //Test COMPILER_RT_HAS_WX_FLAG COMPILER_RT_HAS_WX_FLAG:INTERNAL= //Compiler supports -fxray-instrument COMPILER_RT_HAS_XRAY_COMPILER_FLAG:INTERNAL=True //Test COMPILER_RT_HAS_Zi_FLAG COMPILER_RT_HAS_Zi_FLAG:INTERNAL= //Test COMPILER_RT_TARGET_HAS_ATOMICS COMPILER_RT_TARGET_HAS_ATOMICS:INTERNAL=1 //Test COMPILER_RT_TARGET_HAS_FCNTL_LCK COMPILER_RT_TARGET_HAS_FCNTL_LCK:INTERNAL=1 //ADVANCED...