[llvm-dev] How to dynamically turn on/off XRay tracing?

Brian Cain via llvm-dev llvm-dev at lists.llvm.org
Wed Sep 1 06:59:43 PDT 2021


The __xray_* functions described in https://llvm.org/docs/XRay.html can
trigger patching, unpatching, mode changes, etc.

"If you choose to not use the default logging implementation that comes
with the XRay runtime and/or control when/how the XRay instrumentation
runs, you may use the XRay APIs directly for doing so.
...
If all you need is runtime control over which functions are being traced at
any given time it is better to selectively patch and unpatch the individual
functions you need using the XRay Runtime Library’s __xray_patch_function()
method."


On Wed, Sep 1, 2021 at 2:23 AM 徐明杰 via llvm-dev <llvm-dev at lists.llvm.org>
wrote:

>
> Hi all!
> According to XRay whitepaper ("XRay: A Function Call Tracing System"),
> XRay tracing can be turned on and off dynamically without having to restart
> the server.
>
> However, I only found that we can use the XRAY_OPTIONS environment
> variable to enable or disable XRay at application start.
> Is there any way to turn on/off dynamically without having to restart the
> server?
>
> Regards,
> Xu Mingjie @ ByteDance
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>


-- 
-Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210901/15944316/attachment.html>


More information about the llvm-dev mailing list