From: taj@intergate.bc.ca (Taj Khattra)
Subject: mpr-1.5 - a poor man's memory profiler
Date: 1997/02/13 [thread overview]
Message-ID: <pgpmoose.199702132018.3922@liw.clinet.fi> (raw)
-----BEGIN PGP SIGNED MESSAGE-----
I have uploaded mpr-1.5 to sunsite.unc.edu:/incoming/Linux/mpr-1.5.tar.gz.
It should move to directory /pub/Linux/devel/lang/c soon.
This release contains some performance enhancements (especially for
'mpr -f -l'). There are no new features.
Here are some excerpts from README:
This is version 1.5 of mpr, a poor man's memory profiling package for
Unix programs. It supports both C and C++ programs.
mpr can be used to find malloc/realloc memory leaks and memory
allocation statistics and patterns - it does not find memory
corruption errors. It uses a simple, brute force strategy - log all
memory alloc/free requests to a file and then post-process this log
file once the program has terminated.
mpr keeps track of the entire call chain leading up to a memory
alloc/free request, making it much easier to find memory allocation
problems. This is superior to conventional methods of keeping track of
only the immediate caller of a memory alloc/free routine, e.g. using
__FILE__ and __LINE__.
To give you an idea of what mpr can do, here are some sample outputs
for the example program that is included with mpr-1.5.
memory allocations grouped by call chains:
(column2=number of allocs, column3=amount allocated)
main(tst.c,58) 45 1440
foo(bar.c,14):bar(bar.c,28):main(tst.c,65) 200 2000
main(tst.c,53) 200 3200
foo(bar.c,19):bar(bar.c,28):main(tst.c,65) 200 4000
foo(tst.c,36):main(tst.c,64) 200 12800
foo(baz.c,21):baz(baz.c,29):main(tst.c,66) 200 51200
memory leaks grouped by call chains:
(column2=number of allocs leaked, column3=amount leaked)
main(tst.c,58) 21 672
main(tst.c,53) 45 720
foo(bar.c,14):bar(bar.c,28):main(tst.c,65) 92 920
foo(bar.c,19):bar(bar.c,28):main(tst.c,65) 101 2020
foo(tst.c,36):main(tst.c,64) 94 6016
foo(baz.c,21):baz(baz.c,29):main(tst.c,66) 108 27648
memory allocations grouped by size:
(column1=size, column2=number of allocs)
10 200
16 200
20 200
32 45
64 200
256 200
memory leaks grouped by size:
(column1=size, column2=number of allocs leaked)
10 92
16 45
20 101
32 21
64 94
256 108
Here is a summary of changes from previous versions:
1.5
- mprfl: created a new version that uses a more efficient strategy
(suggested by Hugh W. Holbrook <holbrook@dsg.stanford.edu>) to
create the pc->file/line mapping when using 'mpr -f -l'.
See README.SLOW for details.
- mpr: moved pc mapping awk script to mprmap.
- mprmap: created from mpr.
- README.SLOW: explains what has been done to speed up 'mpr -f -l'.
- README.PERL: Added pointer to Hugh W. Holbrook's perl port.
- old/{mpr, mprfl}: saved previous versions. See old/README.
- config/btgcc.c: created. May be useful to people trying to port
to a new architecture.
Here is the LSM entry:
Begin3
Title: mpr - a poor man's memory profiler for Unix programs
Version: 1.5
Entered-date: 09FEB97
Description: mpr can be used to find malloc/realloc memory leaks and
memory allocation statistics and patterns - it does not
find memory corruption errors.
Keywords: memory leak, memory profile, malloc
Author: taj@intergate.bc.ca (Taj Khattra)
Maintained-by:
Primary-site: sunsite.unc.edu /pub/Linux/devel/lang/c
90261 mpr-1.5.tar.gz
699 mpr-1.5.lsm
Alternate-site:
Original-site:
Platforms: x86-linux, x86-sco, vax-ultrix
Copying-policy: almost public domain
End
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
iQCVAwUBMwNawoQRll5MupLRAQFZWgP/WKOqM+qEPufSiuwdqiAgaPh9luHCt7tF
HPk7wejgTUQ7tvvLn4PY2lrjGs2rvvm3UzNHMfRxqMQL9I5KxC4XQvoAviWx/NDS
jFBKn49TWydZWCfA133K4O3BeKhreo7o4qPuxiaWe6jN7sP41liOgmoZzK0ZDM18
PnEEUHnwdGE=
=PpyN
-----END PGP SIGNATURE-----
--
This article has been digitally signed by the moderator, using PGP.
http://www.iki.fi/liw/lars-public-key.asc has PGP key for validating signature.
Send submissions for comp.os.linux.announce to: linux-announce@news.ornl.gov
PLEASE remember a short description of the software and the LOCATION.
This group is archived at http://www.iki.fi/liw/linux/cola.html
reply other threads:[~1997-02-13 5:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox