[ltt-dev] UST - Problems in recording trace on a current process
Douglas Santos
douglas.santos at polymtl.ca
Tue Feb 9 16:25:51 EST 2010
Quoting Naren <tracemein at gmail.com>:
> 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)*
You need to instrument the code and link it with libust.
Which seems isn't the case here.
http://lttng.org/files/ust/manual/ust.html#Instrumenting-an-application
here's an ldd example of a instrumented and linked prog.
$ ldd ../test/mk
linux-vdso.so.1 => (0x00007fff919ff000)
libust.so.0 => /usr/local/lib/libust.so.0 (0x00007fe81031d000)
libc.so.6 => /lib/libc.so.6 (0x00007fe80ffae000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe810542000)
liburcu-bp.so.0 => /usr/local/lib/liburcu-bp.so.0 (0x00007fe80fdab000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007fe80fb8f000)
> 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?
The correct order is ustctl COMMAND PID
More information about the lttng-dev
mailing list