[llvm-dev] [X-ray] How to check successful instrumentation and generate call trace?

张雨姗(ZHANG Yushan)-11310380 via llvm-dev llvm-dev at lists.llvm.org
Sun Jan 20 21:16:59 PST 2019


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, function-name: '' }
- { id: 1, address: 0x000000000041D026, function: 0x000000000041CD70, kind: function-exit, always-instrument: false, function-name: '' }
- { id: 2, address: 0x000000000041D4F0, function: 0x000000000041D4F0, kind: function-enter, always-instrument: false, function-name: '' }
- { id: 2, address: 0x000000000041DAFA, function: 0x000000000041D4F0, kind: function-exit, always-instrument: false, function-name: '' }
- { id: 3, address: 0x000000000041E570, function: 0x000000000041E570, kind: function-enter, always-in
......
......



Does the map mean that no function is instrumented? Should I change my commands?
BTW, after instrumentation could I run the binary and get trace directly?


Here is the link to current documentation: https://llvm.org/docs/XRay.html


Thank you all,
Yushan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190121/33e72680/attachment.html>


More information about the llvm-dev mailing list