This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3 1/2] mtrace: record backtrace of memory allocation/deallocation
- From: Carlos O'Donell <carlos at redhat dot com>
- To: Kyeong Yoo <kyeong dot yoo at alliedtelesis dot co dot nz>, libc-alpha at sourceware dot org
- Date: Wed, 13 Feb 2019 16:21:24 -0500
- Subject: Re: [PATCH v3 1/2] mtrace: record backtrace of memory allocation/deallocation
- References: <154994391316.1805.17529324723460079342.stgit@kyeongy-dl.ws.atlnz.lc>
On 2/11/19 10:58 PM, Kyeong Yoo wrote:
> When a memory leak is detected by mtrace, it is still difficult
> to identify the exact source code causing that issue if the program
> uses libraries or common functions.
>
> Now a backtrace of the calling functions for memory allocation and
> deallocation is also recorded. This new backtrace is displayed in
> a separate line with '#' prefix prior to the original trace record
> with '@' prefix.
>
> This extra backtrace is turned off by default and only turned on
> if valid number is set to the environment variable MALLOC_TRACE_LEVEL.
> Valid value in MALLOC_TRACE_LEVEL is between 1 and 15, which indicates
> the maximum number of recent function calls to display.
>
> The companion mtrace.pl script is also updated to parse backtrace info.
> And a new command argument "Maps" is added to mtrace.pl, which should
> be a copy of the program's maps file ("/proc/PID/maps"). This helps
> to interpret addresses from shared libraries.
> Also to make mtrace useful when analysing mtrace output for
> cross-compiled binary, two new command options are added:
> --solib-path=PATH and --addr2line=CMD.
Thank you very much for working on this feature.
Do you have copyright assignment with the FSF?
Please see the "Contribution Checklist"
https://sourceware.org/glibc/wiki/Contribution%20checklist
--
Cheers,
Carlos.