<div dir="ltr">The __xray_* functions described in <a href="https://llvm.org/docs/XRay.html">https://llvm.org/docs/XRay.html</a> can trigger patching, unpatching, mode changes, etc.<br><br>"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. <br>...<br>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."<div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 1, 2021 at 2:23 AM 徐明杰 via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div id="gmail-m_3778851570952652193appVersion:飞书-4.8.1-editorVersion:0.9.6"></div><div><div style="line-height:1.68"><div style="font-family:arial,helvetica,sans-serif;color:rgb(31,35,41);line-height:1.68"><div dir="auto" style="margin:4px 0px"><br></div><div dir="auto" style="margin:4px 0px"><span>Hi all!</span></div><div dir="auto" style="margin:4px 0px"><span>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.</span></div><div dir="auto" style="margin:4px 0px"><br></div><div dir="auto" style="margin:4px 0px"><span>However, I only found that we can use the XRAY_OPTIONS environment variable to enable or disable XRay at application start.</span></div><div dir="auto" style="margin:4px 0px"><span>Is there any way to turn on/off dynamically without having to restart the server?</span></div><div dir="auto" style="margin:4px 0px"><br></div><div dir="auto" style="margin:4px 0px"><span>Regards,</span></div><div dir="auto" style="margin:4px 0px"><span style="font-family:arial,helvetica,sans-serif;font-size:14px;color:rgb(31,35,41)">Xu Mingjie @ ByteDance</span></div></div></div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">-Brian</div>