[llvm-dev] Testing LLVM XRay

83 views
Skip to first unread message

buddhika chamith via llvm-dev

unread,
Aug 27, 2018, 1:33:24 PM8/27/18
to llvm...@lists.llvm.org
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

buddhika chamith via llvm-dev

unread,
Aug 27, 2018, 1:36:07 PM8/27/18
to llvm...@lists.llvm.org

Dean Michael Berris via llvm-dev

unread,
Aug 27, 2018, 7:25:57 PM8/27/18
to buddhika chamith, llvm...@lists.llvm.org
Hi Buddhika,

On Tue, 28 Aug 2018 at 3:36 am, buddhika chamith via llvm-dev <llvm...@lists.llvm.org> wrote:

On Mon, Aug 27, 2018 at 1:33 PM, buddhika chamith <chamib...@gmail.com> wrote:
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).

Apologies for that, it seems the documentation is out of date. You need to add `xray_mode=xray-basic` to the options. That should look like:

XRAY_OPTIONS="patch_premain=true:xray_mode=xray-basic"

We should update the documentation with that. Note that llvm.org/docs/XRay.html should already have the updated instructions.

Cheers
--
Dean

buddhika chamith via llvm-dev

unread,
Aug 27, 2018, 7:48:00 PM8/27/18
to Dean Michael Berris, llvm...@lists.llvm.org
Great! Now it works.

Thanks

Reply all
Reply to author
Forward
0 new messages