From mboxrd@z Thu Jan 1 00:00:00 1970 From: tracemein@gmail.com (Naren) Date: Tue, 9 Feb 2010 21:40:50 +0100 Subject: [ltt-dev] UST - Problems in recording trace on a current process In-Reply-To: <201002091225.13893.pierre-marc.fournier@polymtl.ca> References: <19fa8ef31002081349v36a13174m1a031048048fd45c@mail.gmail.com> <201002091142.33606.pierre-marc.fournier@polymtl.ca> <19fa8ef31002090911x67b99823v54f0e423ff6ea121@mail.gmail.com> <201002091225.13893.pierre-marc.fournier@polymtl.ca> Message-ID: <19fa8ef31002091240s57b513e0v81f524795b0f77ac@mail.gmail.com> Message-ID: <20100209204050.9MwPcWT0eaPmVaXXJ_J_v5pow3mbghofVPSxs8oBroM@z> Hi Pierre, >>- the program you want to trace has been linked dynamically against libust. >>You can do so with the ldd tool The program i want to trace is firefox with pid 1684. Here are the results of ldd'ing firefox *root at naren-laptop:/tmp# ldd /usr/lib/firefox-3.5.7/firefox-3.5* * **linux-gate.so.1 => (0xb7f27000)* * **libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7efc000)* * **libasound.so.2 => /usr/lib/libasound.so.2 (0xb7e35000)* * **libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7e30000)* * **libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7d3e000)* * **libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7d18000)* * **libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7cfa000)* * **libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7bb5000)* * **/lib/ld-linux.so.2 (0xb7f28000)* * **librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7bab000)* Here are the results of ldd'ing ustctl *root at naren-laptop:/tmp# ldd /usr/local/bin/ustctl * * **linux-gate.so.1 => (0xb80ce000)* * **liburcu-bp.so.0 => /usr/local/lib/liburcu-bp.so.0 (0xb80b8000)* * **libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7f73000)* * **libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7f59000)* * **/lib/ld-linux.so.2 (0xb80cf000)* * * Here are the results of ldd'ing ustd (i am not sure whether it is helpful) *root at naren-laptop:/tmp# ldd -v /usr/local/bin/ustd* * **linux-gate.so.1 => (0xb7fe9000)* * **libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7fbe000)* * **liburcu-bp.so.0 => /usr/local/lib/liburcu-bp.so.0 (0xb7fba000)* * **libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7e74000)* * **/lib/ld-linux.so.2 (0xb7fea000)* * * * **Version information:* * **/usr/local/bin/ustd:* * **libc.so.6 (GLIBC_2.4) => /lib/tls/i686/cmov/libc.so.6* * **libc.so.6 (GLIBC_2.1) => /lib/tls/i686/cmov/libc.so.6* * **libc.so.6 (GLIBC_2.8) => /lib/tls/i686/cmov/libc.so.6* * **libc.so.6 (GLIBC_2.2) => /lib/tls/i686/cmov/libc.so.6* * **libc.so.6 (GLIBC_2.3.4) => /lib/tls/i686/cmov/libc.so.6* * **libc.so.6 (GLIBC_2.0) => /lib/tls/i686/cmov/libc.so.6* * **libpthread.so.0 (GLIBC_2.1) => /lib/tls/i686/cmov/libpthread.so.0* * **libpthread.so.0 (GLIBC_2.3.3) => /lib/tls/i686/cmov/libpthread.so.0* * **libpthread.so.0 (GLIBC_2.0) => /lib/tls/i686/cmov/libpthread.so.0* * **/lib/tls/i686/cmov/libpthread.so.0:* * **ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2* * **ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2* * **ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2* * **libc.so.6 (GLIBC_2.1.3) => /lib/tls/i686/cmov/libc.so.6* * **libc.so.6 (GLIBC_2.1) => /lib/tls/i686/cmov/libc.so.6* * **libc.so.6 (GLIBC_2.3.2) => /lib/tls/i686/cmov/libc.so.6* * **libc.so.6 (GLIBC_2.2) => /lib/tls/i686/cmov/libc.so.6* * **libc.so.6 (GLIBC_PRIVATE) => /lib/tls/i686/cmov/libc.so.6* * **libc.so.6 (GLIBC_2.0) => /lib/tls/i686/cmov/libc.so.6* * **/usr/local/lib/liburcu-bp.so.0:* * **ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2* * **libpthread.so.0 (GLIBC_2.0) => /lib/tls/i686/cmov/libpthread.so.0* * **libc.so.6 (GLIBC_2.1.3) => /lib/tls/i686/cmov/libc.so.6* * **libc.so.6 (GLIBC_2.0) => /lib/tls/i686/cmov/libc.so.6* * **/lib/tls/i686/cmov/libc.so.6:* * **ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2* * **ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2* * **ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2* >>you did a "make install" when you upgraded your ust. You would get this >>error if ustctl and your traced program were linked against different >>versions of libust.so For what i infer, none of these are hooked up with libust. Have i missed out any because i didn't even have the opportunity of starting a trace on firefox, since i was not able to list markers. *Moreover, another unrelated nitpick.* In the manual http://lttng.org/files/ust/manual/ust.html, under section "5.2 Setting up the recording manually", the command given to enable markers "$ ustctl --enable-marker 1234 ust/mymark" . However, after some reverse engineering, i found out that "parse_opts_long" function "ustctl.c" file expects pid to be the last argument and it is giving "*ustctl[1813/1813]: Error: The pid "ust/1" is invalid. (in parse_opts_long() at ustctl.c:159)*" error. Hence it would be "$ ustctl --enable-marker ust/mymark 1234". I am not sure of this though. Can you clarify? Regards, Naren -------------- next part -------------- An HTML attachment was scrubbed... URL: