* Re: Need Help In trace generation for malloc(), free() calls etc [not found] ` <CAPC3erkxTh9dSgahym7xsCjJXOV3D+kto-=UB-ApjSUOWYZVeA@mail.gmail.com> @ 2020-05-13 15:33 ` Jonathan Rajotte-Julien via lttng-dev 2020-05-13 15:33 ` [lttng-dev] " Jonathan Rajotte-Julien via lttng-dev [not found] ` <CAPC3erkfapoZu_WM=znEyj0ch1YiKeX7-JBiauoLh+Seee0TZA@mail.gmail.com> 0 siblings, 2 replies; 6+ messages in thread From: Jonathan Rajotte-Julien via lttng-dev @ 2020-05-13 15:33 UTC (permalink / raw) To: Abhinav Ranjan; +Cc: lttng-dev Hi Abhinav, Please refrain from using screenshots when pastebin could be used (code, commands, etc). On Wed, May 13, 2020 at 10:29:22AM +0530, Abhinav Ranjan via lttng-dev wrote: > Hello Sir, > I am Abhinav from India. > *Kindly Ignore the previous email.* > Actually I am very new to the Embedded System Engineering profession. In > fact I have been asked to do an independent project to instrumenting a c > application using LLTng concept to find/trace calls to malloc(), free() > calls. In fact i tried capturing the same as below steps but didn't > understand why after using LD_PRELOAD also malloc() and free() calls were > not traced. I am not sure whether my app was correct!! > > I followed the steps provided to create executable using -lltng-ust -ldl > 2.I executed it as: LD_PRELOAD=liblttng-ust-libc-wrapper.so ./executable > (initially as ./exe arg)) > 3. Then I followed commands to create , capture the events. and destroyed > it. Based on the screenshot "creation_trace.PNG", it seems that you enable only the event you defined (malloc_trace_investigation). Keep in mind that the libc wrapper defines its own tracepoints and tracepoint providers. It the case of the libc wrapper the tracepoint providers available are: lttng_ust_libc and lttng_ust_pthread Both have multiple tracepoints defined under them. Hence what you want for you experiment is something like this: lttng enable-event -u malloc_trace:investigation lttng enable-event -u 'lttng_ust_libc:*' Keep in mind that you can list the events available for a currently running app using: lttng list -u The app must be running for the listing work. Cheers. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [lttng-dev] Need Help In trace generation for malloc(), free() calls etc 2020-05-13 15:33 ` Need Help In trace generation for malloc(), free() calls etc Jonathan Rajotte-Julien via lttng-dev @ 2020-05-13 15:33 ` Jonathan Rajotte-Julien via lttng-dev [not found] ` <CAPC3erkfapoZu_WM=znEyj0ch1YiKeX7-JBiauoLh+Seee0TZA@mail.gmail.com> 1 sibling, 0 replies; 6+ messages in thread From: Jonathan Rajotte-Julien via lttng-dev @ 2020-05-13 15:33 UTC (permalink / raw) To: Abhinav Ranjan; +Cc: lttng-dev Hi Abhinav, Please refrain from using screenshots when pastebin could be used (code, commands, etc). On Wed, May 13, 2020 at 10:29:22AM +0530, Abhinav Ranjan via lttng-dev wrote: > Hello Sir, > I am Abhinav from India. > *Kindly Ignore the previous email.* > Actually I am very new to the Embedded System Engineering profession. In > fact I have been asked to do an independent project to instrumenting a c > application using LLTng concept to find/trace calls to malloc(), free() > calls. In fact i tried capturing the same as below steps but didn't > understand why after using LD_PRELOAD also malloc() and free() calls were > not traced. I am not sure whether my app was correct!! > > I followed the steps provided to create executable using -lltng-ust -ldl > 2.I executed it as: LD_PRELOAD=liblttng-ust-libc-wrapper.so ./executable > (initially as ./exe arg)) > 3. Then I followed commands to create , capture the events. and destroyed > it. Based on the screenshot "creation_trace.PNG", it seems that you enable only the event you defined (malloc_trace_investigation). Keep in mind that the libc wrapper defines its own tracepoints and tracepoint providers. It the case of the libc wrapper the tracepoint providers available are: lttng_ust_libc and lttng_ust_pthread Both have multiple tracepoints defined under them. Hence what you want for you experiment is something like this: lttng enable-event -u malloc_trace:investigation lttng enable-event -u 'lttng_ust_libc:*' Keep in mind that you can list the events available for a currently running app using: lttng list -u The app must be running for the listing work. Cheers. _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <CAPC3erkfapoZu_WM=znEyj0ch1YiKeX7-JBiauoLh+Seee0TZA@mail.gmail.com>]
* Re: Need Help In trace generation for malloc(), free() calls etc [not found] ` <CAPC3erkfapoZu_WM=znEyj0ch1YiKeX7-JBiauoLh+Seee0TZA@mail.gmail.com> @ 2020-05-13 18:04 ` Jonathan Rajotte-Julien via lttng-dev 2020-05-13 18:04 ` [lttng-dev] " Jonathan Rajotte-Julien via lttng-dev 2020-05-14 5:25 ` Abhinav Ranjan via lttng-dev 0 siblings, 2 replies; 6+ messages in thread From: Jonathan Rajotte-Julien via lttng-dev @ 2020-05-13 18:04 UTC (permalink / raw) To: Abhinav Ranjan; +Cc: lttng-dev Hi Abhinav, Please keep the mailing list in CC for all communication: lttng-dev@lists.lttng.org If not, I am not interested in helping you further. On Wed, May 13, 2020 at 09:26:52PM +0530, Abhinav Ranjan wrote: > Hi! Jonathan thank you so much for your help and reply! Sure I'll not use > snapshot from next time and follow your advice. > In fact I figured out the issue, but Jonathan I have one specific doubt I > wanted to trace malloc , free call from my app only but after using lttng > enable-event --userspace lttng_ust_libc:malloc I am seeing several malloc ( > in Trace Compass) probably from different tracepoints from lttng_ust_libc. You will see all malloc that the app does for its lifetime since you LD_PRELOAD the wrapper including any allocation lttng-ust does. Keep in mind that lttng-ust is not magic, lttng-ust spun threads and do some allocations to do its job. What outcome do you expect? We might be able to at least get you on the right path. In other word, what is your end goal? Cheers ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [lttng-dev] Need Help In trace generation for malloc(), free() calls etc 2020-05-13 18:04 ` Jonathan Rajotte-Julien via lttng-dev @ 2020-05-13 18:04 ` Jonathan Rajotte-Julien via lttng-dev 2020-05-14 5:25 ` Abhinav Ranjan via lttng-dev 1 sibling, 0 replies; 6+ messages in thread From: Jonathan Rajotte-Julien via lttng-dev @ 2020-05-13 18:04 UTC (permalink / raw) To: Abhinav Ranjan; +Cc: lttng-dev Hi Abhinav, Please keep the mailing list in CC for all communication: lttng-dev@lists.lttng.org If not, I am not interested in helping you further. On Wed, May 13, 2020 at 09:26:52PM +0530, Abhinav Ranjan wrote: > Hi! Jonathan thank you so much for your help and reply! Sure I'll not use > snapshot from next time and follow your advice. > In fact I figured out the issue, but Jonathan I have one specific doubt I > wanted to trace malloc , free call from my app only but after using lttng > enable-event --userspace lttng_ust_libc:malloc I am seeing several malloc ( > in Trace Compass) probably from different tracepoints from lttng_ust_libc. You will see all malloc that the app does for its lifetime since you LD_PRELOAD the wrapper including any allocation lttng-ust does. Keep in mind that lttng-ust is not magic, lttng-ust spun threads and do some allocations to do its job. What outcome do you expect? We might be able to at least get you on the right path. In other word, what is your end goal? Cheers _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Need Help In trace generation for malloc(), free() calls etc 2020-05-13 18:04 ` Jonathan Rajotte-Julien via lttng-dev 2020-05-13 18:04 ` [lttng-dev] " Jonathan Rajotte-Julien via lttng-dev @ 2020-05-14 5:25 ` Abhinav Ranjan via lttng-dev 2020-05-14 5:25 ` [lttng-dev] " Abhinav Ranjan via lttng-dev 1 sibling, 1 reply; 6+ messages in thread From: Abhinav Ranjan via lttng-dev @ 2020-05-14 5:25 UTC (permalink / raw) To: Jonathan Rajotte-Julien; +Cc: lttng-dev [-- Attachment #1.1: Type: text/plain, Size: 1417 bytes --] Thank You Sir, I am sorry for the inconvenience caused to you! Surely I'll take care of every suggestion you passed on to me. Once again I thank you for your wonderful help! Stay Safe and Happy!!! On Wed, 13 May 2020 at 23:34, Jonathan Rajotte-Julien < jonathan.rajotte-julien@efficios.com> wrote: > Hi Abhinav, > > Please keep the mailing list in CC for all communication: > lttng-dev@lists.lttng.org > > If not, I am not interested in helping you further. > > On Wed, May 13, 2020 at 09:26:52PM +0530, Abhinav Ranjan wrote: > > Hi! Jonathan thank you so much for your help and reply! Sure I'll not use > > snapshot from next time and follow your advice. > > In fact I figured out the issue, but Jonathan I have one specific doubt I > > wanted to trace malloc , free call from my app only but after using > lttng > > enable-event --userspace lttng_ust_libc:malloc I am seeing several > malloc ( > > in Trace Compass) probably from different tracepoints from > lttng_ust_libc. > > You will see all malloc that the app does for its lifetime since you > LD_PRELOAD > the wrapper including any allocation lttng-ust does. Keep in mind that > lttng-ust > is not magic, lttng-ust spun threads and do some allocations to do its job. > > What outcome do you expect? We might be able to at least get you on the > right > path. In other word, what is your end goal? > > Cheers > > -- Thanking You! Regards, Abhinav [-- Attachment #1.2: Type: text/html, Size: 2214 bytes --] [-- Attachment #2: Type: text/plain, Size: 156 bytes --] _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [lttng-dev] Need Help In trace generation for malloc(), free() calls etc 2020-05-14 5:25 ` Abhinav Ranjan via lttng-dev @ 2020-05-14 5:25 ` Abhinav Ranjan via lttng-dev 0 siblings, 0 replies; 6+ messages in thread From: Abhinav Ranjan via lttng-dev @ 2020-05-14 5:25 UTC (permalink / raw) To: Jonathan Rajotte-Julien; +Cc: lttng-dev [-- Attachment #1.1: Type: text/plain, Size: 1417 bytes --] Thank You Sir, I am sorry for the inconvenience caused to you! Surely I'll take care of every suggestion you passed on to me. Once again I thank you for your wonderful help! Stay Safe and Happy!!! On Wed, 13 May 2020 at 23:34, Jonathan Rajotte-Julien < jonathan.rajotte-julien@efficios.com> wrote: > Hi Abhinav, > > Please keep the mailing list in CC for all communication: > lttng-dev@lists.lttng.org > > If not, I am not interested in helping you further. > > On Wed, May 13, 2020 at 09:26:52PM +0530, Abhinav Ranjan wrote: > > Hi! Jonathan thank you so much for your help and reply! Sure I'll not use > > snapshot from next time and follow your advice. > > In fact I figured out the issue, but Jonathan I have one specific doubt I > > wanted to trace malloc , free call from my app only but after using > lttng > > enable-event --userspace lttng_ust_libc:malloc I am seeing several > malloc ( > > in Trace Compass) probably from different tracepoints from > lttng_ust_libc. > > You will see all malloc that the app does for its lifetime since you > LD_PRELOAD > the wrapper including any allocation lttng-ust does. Keep in mind that > lttng-ust > is not magic, lttng-ust spun threads and do some allocations to do its job. > > What outcome do you expect? We might be able to at least get you on the > right > path. In other word, what is your end goal? > > Cheers > > -- Thanking You! Regards, Abhinav [-- Attachment #1.2: Type: text/html, Size: 2214 bytes --] [-- Attachment #2: Type: text/plain, Size: 156 bytes --] _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-05-14 14:04 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CAPC3ern8bkAJDnOwoYh2Om44Q2GWAPsh140FW_aPGVkdUmCwkw@mail.gmail.com> [not found] ` <CAPC3erkxTh9dSgahym7xsCjJXOV3D+kto-=UB-ApjSUOWYZVeA@mail.gmail.com> 2020-05-13 15:33 ` Need Help In trace generation for malloc(), free() calls etc Jonathan Rajotte-Julien via lttng-dev 2020-05-13 15:33 ` [lttng-dev] " Jonathan Rajotte-Julien via lttng-dev [not found] ` <CAPC3erkfapoZu_WM=znEyj0ch1YiKeX7-JBiauoLh+Seee0TZA@mail.gmail.com> 2020-05-13 18:04 ` Jonathan Rajotte-Julien via lttng-dev 2020-05-13 18:04 ` [lttng-dev] " Jonathan Rajotte-Julien via lttng-dev 2020-05-14 5:25 ` Abhinav Ranjan via lttng-dev 2020-05-14 5:25 ` [lttng-dev] " Abhinav Ranjan via lttng-dev
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).