<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>







<p class="p1"><span class="s1"><br></span></p><p class="p1"><span class="s1">[quehan@localhost objs]$ file ./nginx</span></p>
<p class="p1"><span class="s1">./nginx: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0xb7659abd6bd962b7033f3cc495ac8bb44ac9f044, not stripped</span></p><p class="p1"><span class="s1"><br></span></p><p class="p1"><span class="s1">







</span></p><p class="p1"><span class="s1">CFLAGS</span><span class="s2"> </span><span class="s3">= -finstrument-functions -pipe -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g</span></p><p class="p1"><span class="s3"><br></span></p><p class="p1"><span class="s1">[quehan@localhost objs]$ nm ./nginx | grep __cyg_profile_func</span></p><p class="p1"><span class="s1">                 U </span><span class="s2">__cyg_profile_func</span><span class="s1">_enter@@GLIBC_2.2.5</span></p><p class="p1"><span class="s3">









</span></p><p class="p1"><span class="s1">                 U </span><span class="s2">__cyg_profile_func</span><span class="s1">_exit@@GLIBC_2.2.5</span></p><p class="p1"><span class="s1"><br></span></p><p class="p1"><span class="s1">[quehan@localhost objs]$ cat /proc/2046/maps | grep lttng</span></p><p class="p1"><span class="s1">7f2298000000-7f2298009000 r-xp 00000000 fd:01 103870944                  /usr/lib/lib</span><span class="s2">lttng</span><span class="s1">-ust-tracepoint.so.0.0.0</span></p><p class="p1"><span class="s1">7f2298009000-7f2298208000 ---p 00009000 fd:01 103870944                  /usr/lib/lib</span><span class="s2">lttng</span><span class="s1">-ust-tracepoint.so.0.0.0</span></p><p class="p1"><span class="s1">7f2298208000-7f2298209000 r--p 00008000 fd:01 103870944                  /usr/lib/lib</span><span class="s2">lttng</span><span class="s1">-ust-tracepoint.so.0.0.0</span></p><p class="p1"><span class="s1">7f2298209000-7f229820a000 rw-p 00009000 fd:01 103870944                  /usr/lib/lib</span><span class="s2">lttng</span><span class="s1">-ust-tracepoint.so.0.0.0</span></p><p class="p1"><span class="s1">7f2298aaa000-7f2298af2000 r-xp 00000000 fd:01 103870951                  /usr/lib/lib</span><span class="s2">lttng</span><span class="s1">-ust.so.0.0.0</span></p><p class="p1"><span class="s1">7f2298af2000-7f2298cf2000 ---p 00048000 fd:01 103870951                  /usr/lib/lib</span><span class="s2">lttng</span><span class="s1">-ust.so.0.0.0</span></p><p class="p1"><span class="s1">7f2298cf2000-7f2298cf4000 r--p 00048000 fd:01 103870951                  /usr/lib/lib</span><span class="s2">lttng</span><span class="s1">-ust.so.0.0.0</span></p><p class="p1"><span class="s1">7f2298cf4000-7f2298cf9000 rw-p 0004a000 fd:01 103870951                  /usr/lib/lib</span><span class="s2">lttng</span><span class="s1">-ust.so.0.0.0</span></p><p class="p1"><span class="s1">7f2299d6a000-7f2299d6c000 r-xp 00000000 fd:01 103870981                  /usr/lib/lib</span><span class="s2">lttng</span><span class="s1">-ust-cyg-profile-fast.so.0.0.0</span></p><p class="p1"><span class="s1">7f2299d6c000-7f2299f6c000 ---p 00002000 fd:01 103870981                  /usr/lib/lib</span><span class="s2">lttng</span><span class="s1">-ust-cyg-profile-fast.so.0.0.0</span></p><p class="p1"><span class="s1">7f2299f6c000-7f2299f6d000 r--p 00002000 fd:01 103870981                  /usr/lib/lib</span><span class="s2">lttng</span><span class="s1">-ust-cyg-profile-fast.so.0.0.0</span></p><p class="p1"><span class="s1">7f2299f6d000-7f2299f6e000 rw-p 00003000 fd:01 103870981                  /usr/lib/lib</span><span class="s2">lttng</span><span class="s1">-ust-cyg-profile-fast.so.0.0.0</span></p><p class="p1"><span class="s1">7f229a18a000-7f229a18b000 r--s 00000000 00:11 18728                      /dev/shm/</span><span class="s2">lttng</span><span class="s1">-ust-wait-5-1000</span></p><p class="p1"><span class="s1">





















</span></p><p class="p1"><span class="s1">7f229a18b000-7f229a18c000 r--s 00000000 00:11 18727                      /dev/shm/</span><span class="s2">lttng</span><span class="s1">-ust-wait-5</span></p><p class="p1"><span class="s1"><br></span></p><p class="p1"><span class="s1"><br></span></p><p class="p1"><span class="s3">Nginx is a very famous lightweight http server, and I use the latest lttng suits, I can't resolve this.</span></p><p class="p1"><span class="s3"><br></span></p><br><div><hr id="stopSpelling">Date: Wed, 20 May 2015 16:28:41 +0000<br>From: mathieu.desnoyers@efficios.com<br>To: portlet@outlook.com<br>CC: lttng-dev@lists.lttng.org<br>Subject: Re: [lttng-dev] lttng function tracing nginx problem<br><br><div style="font-family:times new roman, new york, times, serif;font-size:12pt;color:#000000;"><div><br></div><hr id="ecxzwchr"><blockquote style="border-left:2px solid #1010FF;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}

.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}

--></style><div dir="ltr">hi all,<div><br></div><div>I compile the nginx-1.4.7 with FLAG <span style="font-size:12pt;">-finstrument-functions</span><span style="font-size:12pt;"> , and start nginx like this:</span></div><div><span style="font-size:12pt;"><br></span></div><div><p class="ecxp1"><span class="ecxs1">LD_PRELOAD=liblttng-ust-cyg-profile-fast.so  ./nginx</span></p><p class="ecxp1"><span class="ecxs1"><br></span></p><p class="ecxp1"><span class="ecxs1">Then I use the command </span><span style="font-size:12pt;">lttng list --userspace and got nothing like this:</span></p><p class="ecxp1"><br></p><p class="ecxp1"><span class="ecxs1">UST events:</span></p><p class="ecxp1"><span class="ecxs1">-------------</span></p><p class="ecxp1"><span class="ecxs1">None</span></p><p class="ecxp1"><span class="ecxs1"><br></span></p><p class="ecxp1"><span class="ecxs1"><br class="ecxApple-interchange-newline">I don't understand why I can't get the func_exit/entry events from nginx.</span></p></div></div></blockquote><div><br></div><div>Is the "ngix" executable a binary executable or a shell script ?<br></div><div><br></div><div>Can you give us the output of "file ./ngix" ?<br></div><div><br></div><div>You might want to try<br></div><div><br></div><div>export LD_PRELOAD=liblttng-ust-cyg-profile-fast.so<br></div><div>./ngix<br></div><div><br></div><div>Thanks,<br></div><div><br></div><div>Mathieu<br></div><div><br></div><div><br></div><blockquote style="border-left:2px solid #1010FF;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><div><p class="ecxp1"><span style="font-size:12pt;"><br></span></p><p class="ecxp1"><span style="font-size:12pt;">By the way, I test function tracing with a single c source file and works well, output like this:</span></p><p class="ecxp1"><span class="ecxs1"><br></span></p><p class="ecxp1"><span class="ecxs1">UST events:</span></p><p class="ecxp1"><span class="ecxs1">-------------</span></p><p class="ecxp2"><br></p><p class="ecxp1"><span class="ecxs1">PID: 4687 - Name: ./tt</span></p><p class="ecxp1"><span class="ecxs1">      lttng_ust_cyg_profile:func_exit (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)</span></p><p class="ecxp1"><span class="ecxs1">      lttng_ust_cyg_profile:func_entry (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)</span></p><p class="ecxp1"><span class="ecxs1">      lttng_ust_tracef:event (loglevel: TRACE_DEBUG (14)) (type: tracepoint)</span></p><p class="ecxp1"><span class="ecxs1">














</span></p><p class="ecxp1"><span class="ecxs1">      ust_baddr_statedump:soinfo (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)</span></p><p class="ecxp1"><span class="ecxs1"><br></span></p><p class="ecxp1"><span class="ecxs1"><br></span></p><p class="ecxp1">Wishing for help.</p></div></div><br>_______________________________________________<br>lttng-dev mailing list<br>lttng-dev@lists.lttng.org<br>http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev<br></blockquote><div><br><br></div><div><br></div><div>-- <br></div><div><span></span>Mathieu Desnoyers<br>EfficiOS Inc.<br>http://www.efficios.com<span></span><br></div></div></div>                                      </div></body>
</html>