From mboxrd@z Thu Jan 1 00:00:00 1970 From: tracemein@gmail.com (Naren) Date: Wed, 10 Feb 2010 01:50:53 +0100 Subject: [ltt-dev] UST - Problems in recording trace on a current process In-Reply-To: <201002091628.10137.pierre-marc.fournier@polymtl.ca> References: <19fa8ef31002081349v36a13174m1a031048048fd45c@mail.gmail.com> <201002091225.13893.pierre-marc.fournier@polymtl.ca> <19fa8ef31002091240s57b513e0v81f524795b0f77ac@mail.gmail.com> <201002091628.10137.pierre-marc.fournier@polymtl.ca> Message-ID: <19fa8ef31002091650k3363add7s10be22658cfa8eec@mail.gmail.com> Hi Pierre, >>So we have the answer to your problem. You cannot list the markers on your >>program (firefox) because it was not linked with libust. Linking a program to >>libust is essential in order to be able to trace it or to list markers. >>There are two ways of doing this. Either you can link it with the gcc >>option -lust at compile time, or you can link it at runtime using LD_PRELOAD. >>For example: >>LD_PRELOAD=/path/to/libust.so ./myprogram I did a LD_PRELOAD on libust.so Inside /usr/local/lib directory, i found three shared objects with the same name libust. I guess libust.so is the linker name and libust.so.0 and libust.so.0.0.0 are fully qualified names with libust.so.0 being linked to libust.so.0 .0.0 . Having found that running LD_PRELOAD on libust.so, again unfortunately, gave this error. Moreover, the other alternative also gave the same one. >>Another way to do the LD_PRELOAD trick is to use usttrace, which will do it >>automatically with -l: >>usttrace -l ./myprogram *ERROR: ld.so: object '/usr/local/lib/libust.so' from LD_PRELOAD cannot be preloaded: ignored.* * * *So, I tried LD_PRELOAD with libust.so.0.0.0, this time i didnt get any error.* * * *However, ustctl --list-markers pid , I am getting segmentation fault.* *I did a strace on that, and found these interesting traces.* * * * socket(PF_FILE, SOCK_STREAM, 0) = 3 connect(3, {sa_family=AF_FILE, path="/tmp/ust-app-socks/1709"}, 110) = 0 send(3, "list_markers", 12, MSG_NOSIGNAL) = 12 recv(3, "marker: metadata/core_marker_id "..., 1000, 0) = 1000 --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++ The full dump of strace can be found here http://pastebin.ca/1792101 . Is it a problem due to multiple shared objects, or does it necessitate another clean install of some libraries? Regards Naren * -------------- next part -------------- An HTML attachment was scrubbed... URL: From mboxrd@z Thu Jan 1 00:00:00 1970 From: tracemein@gmail.com (Naren) Date: Wed, 10 Feb 2010 01:50:53 +0100 Subject: [ltt-dev] UST - Problems in recording trace on a current process In-Reply-To: <201002091628.10137.pierre-marc.fournier@polymtl.ca> References: <19fa8ef31002081349v36a13174m1a031048048fd45c@mail.gmail.com> <201002091225.13893.pierre-marc.fournier@polymtl.ca> <19fa8ef31002091240s57b513e0v81f524795b0f77ac@mail.gmail.com> <201002091628.10137.pierre-marc.fournier@polymtl.ca> Message-ID: <19fa8ef31002091650k3363add7s10be22658cfa8eec@mail.gmail.com> Message-ID: <20100210005053.uAe7MoMTtGpl00MKqB2pgQ7YQD075iwD1vh9MsWCNlw@z> Hi Pierre, >>So we have the answer to your problem. You cannot list the markers on your >>program (firefox) because it was not linked with libust. Linking a program to >>libust is essential in order to be able to trace it or to list markers. >>There are two ways of doing this. Either you can link it with the gcc >>option -lust at compile time, or you can link it at runtime using LD_PRELOAD. >>For example: >>LD_PRELOAD=/path/to/libust.so ./myprogram I did a LD_PRELOAD on libust.so Inside /usr/local/lib directory, i found three shared objects with the same name libust. I guess libust.so is the linker name and libust.so.0 and libust.so.0.0.0 are fully qualified names with libust.so.0 being linked to libust.so.0 .0.0 . Having found that running LD_PRELOAD on libust.so, again unfortunately, gave this error. Moreover, the other alternative also gave the same one. >>Another way to do the LD_PRELOAD trick is to use usttrace, which will do it >>automatically with -l: >>usttrace -l ./myprogram *ERROR: ld.so: object '/usr/local/lib/libust.so' from LD_PRELOAD cannot be preloaded: ignored.* * * *So, I tried LD_PRELOAD with libust.so.0.0.0, this time i didnt get any error.* * * *However, ustctl --list-markers pid , I am getting segmentation fault.* *I did a strace on that, and found these interesting traces.* * * * socket(PF_FILE, SOCK_STREAM, 0) = 3 connect(3, {sa_family=AF_FILE, path="/tmp/ust-app-socks/1709"}, 110) = 0 send(3, "list_markers", 12, MSG_NOSIGNAL) = 12 recv(3, "marker: metadata/core_marker_id "..., 1000, 0) = 1000 --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++ The full dump of strace can be found here http://pastebin.ca/1792101 . Is it a problem due to multiple shared objects, or does it necessitate another clean install of some libraries? Regards Naren * -------------- next part -------------- An HTML attachment was scrubbed... URL: