From: Jonathan Rajotte-Julien via lttng-dev <lttng-dev@lists.lttng.org>
To: Abhinav Ranjan <abhi.abhinav240@gmail.com>
Cc: lttng-dev@lists.lttng.org
Subject: Re: [lttng-dev] Need Help In trace generation for malloc(), free() calls etc
Date: Wed, 13 May 2020 11:33:12 -0400 [thread overview]
Message-ID: <20200513153312.GA2381108@joraj-alpa> (raw)
Message-ID: <20200513153312.A_aLo16tZpovLe6hYgVamYNBAZm7SmPCJWBB5TQ2vh4@z> (raw)
In-Reply-To: <CAPC3erkxTh9dSgahym7xsCjJXOV3D+kto-=UB-ApjSUOWYZVeA@mail.gmail.com>
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
next parent reply other threads:[~2020-05-13 15:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAPC3ern8bkAJDnOwoYh2Om44Q2GWAPsh140FW_aPGVkdUmCwkw@mail.gmail.com>
[not found] ` <CAPC3erkxTh9dSgahym7xsCjJXOV3D+kto-=UB-ApjSUOWYZVeA@mail.gmail.com>
2020-05-13 15:33 ` Jonathan Rajotte-Julien via lttng-dev [this message]
2020-05-13 15:33 ` [lttng-dev] Need Help In trace generation for malloc(), free() calls etc 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200513153312.GA2381108@joraj-alpa \
--to=lttng-dev@lists.lttng.org \
--cc=abhi.abhinav240@gmail.com \
--cc=jonathan.rajotte-julien@efficios.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).