<div><font color="#000000" size="2">Hi Jonathan,</font></div><div><font size="2"></font><font color="#000000"></font><br></div><div><font size="2"><font color="#000000">As to <span style="text-align: left; text-transform: none; text-indent: 0px; letter-spacing: normal; font-style: normal; word-spacing: 0px; display: inline !important; white-space: pre; orphans: 2; widows: 2; float: none; -webkit-text-stroke-width: 0px;">LD_PRELOAD, it is also used for <span style="text-transform: none; text-indent: 0px; letter-spacing: normal; font-style: normal; word-spacing: 0px; display: inline !important; white-space: normal; orphans: 2; widows: 2; float: none; -webkit-text-stroke-width: 0px;">privilege escalation. Will it be</span> regarded as vulnerability and forbidden on some Linux systems?</span></font></font></div><div><sign signid="98"><div><i></i><u></u><sub></sub><sup></sup><strike></strike><font size="2"></font><font color="#000000"></font><br></div><div><font color="#000000" size="2">Regards</font></div><div><font color="#000000" size="2">Hai</font></div></sign></div><div><div><font color="#000000" size="2"> </font></div><div> </div><includetail><div style="font:Verdana normal 14px;color:#000;"><div style="FONT-SIZE: 12px;FONT-FAMILY: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="FONT-SIZE: 12px;background:#efefef;padding:8px;"><div id="menu_sender"><b>From: </b> "Jonathan Rajotte-Julien"<jonathan.rajotte-julien@efficios.com>;</div><div><b>Date: </b> Tue, Jul 16, 2019 11:30 PM</div><div><b>To: </b> "杨海"<hai.yang@magic-shield.com>; <wbr></div><div><b>Cc: </b> "lttng-dev"<lttng-dev@lists.lttng.org>; <wbr></div><div><b>Subject: </b> Re:  回复:Re: [lttng-dev] Pros and Cons of LTTng</div></div><div> </div><div style="position:relative;"><div id="tmpcontent_res"></div>> From somewhere, I saw CPU cycles % with LTTng is even 1-2% lower than vanilla.<br><br>You might be referring to section 5.3 of [1], last paragraph.<br><br>[1] https://www.dorsal.polymtl.ca/en/system/files/desnoyers.pdf<br><br>In any cases, there is always an overhead when actively tracing (recording to<br>disk, network or even in flight recorder mode).<br><br>> Is it contributed by dynamic branch prediction or other instruction level<br>> optimization?<br><br>Note that these numbers were for a 2.6.30 kernel. Things might have changed a bit<br>since. As far as I know, the performance of an instrumented kernel is<br>independent from lttng since instrumentation of the kernel is a not only used by<br>lttng but by multiple projects. But it might help system engineers to accept to<br>turn on instrumentation for their kernel.<br><br>Anyhow, the speedup was attributed to the modification to the instruction and<br>data cache layout.<br><br>>In that way, the kernel or at least key libraries like libc is<br>> kind of re-compiled, right?<br><br>lttng-modules does not require any kernel recompilation. It uses kernel modules<br>to function.<br><br>Instrumenting libc directly might not ideal due to its nature. You can use<br>LD_PRELOAD and lttng-ust to shim and instrument libc function you are interested<br>in. For example, we already ship a shim for some libc functions [1] that you can<br>LD_PRELOAD.<br><br>[1] https://github.com/lttng/lttng-ust/tree/9d4d2a639afc19a1bd705ea560782917ac892596/liblttng-ust-libc-wrapper<br><br>Hope this helps.<br><br>Cheers<br><br>-- <br>Jonathan Rajotte-Julien<br>EfficiOS<br></div></div><!--<![endif]--></includetail></div>