Memory Profiling Tool

10 messages, 6 authors, 2003-09-05 · open the first message on its own page

Memory Profiling Tool

From: <hidden>
Date: 2003-09-02 13:43:55

Is there any memory profiling and leak detection tool available which works
for both PPC and X86??

Thanks.

Ravi.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: Memory Profiling Tool

From: Dan Kegel <hidden>
Date: 2003-09-02 20:51:23

mss59@att.net wrote:
Is there any memory profiling and leak detection tool available which
works for both PPC and X86??
Here's what I know about.
1. There's a utility built into glibc which may be of some help:
http://www.gnu.org/manual/glibc-2.2.5/html_node/Allocation-Debugging.html#Allocation%20Debugging
but it's a bit minimal.

2. x86 only - valgrind, of course.  God's gift to x86 programmers.  Shame
it's not been ported to ppc.

3. libmudflap.  This is very promising; see
http://people.redhat.com/dnovillo/Papers/nordu2003-slides.pdf
http://www.linux.org.uk/~ajh/gcc/gccsummit-2003-proceedings.pdf
However, it's part of the SSA branch of gcc-3.4, so you'll need to use
something like http://kegel.com/crosstool to build it.
I am hoping to try this out on ppc sometime, but haven't yet.
FWIW, it's provided with Red Hat's taroon beta, so it must
be getting close to usable.

If you're debugging c++, you should also read
http://gcc.gnu.org/onlinedocs/libstdc++/debug.html
- Dan

--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: Memory Profiling Tool

From: Der Herr Hofrat <hidden>
Date: 2003-09-04 05:58:32

Is there any memory profiling and leak detection tool available which works
for both PPC and X86??
bgcc - bounds checking gcc - its a patch to gcc

the output will look something like this but can be tuned with compile time options:

Bounds Checking GCC v gcc-3.2.2-3.1 Copyright (C) 1995 Richard W.M. Jones
Bounds Checking comes with ABSOLUTELY NO WARRANTY. For details see file
`COPYING' that should have come with the source to this program.
Bounds Checking is free software, and you are welcome to redistribute it
under certain conditions. See the file `COPYING' for details.
For more information, set GCC_BOUNDS_OPTS to `-help'
Bounds library call frequency statistics:
  Calls to push, pop, param function:        1, 1, 0
  Calls to add, delete stack:                1, 1
  Calls to add, delete heap:                 1, 0
                                             ^^^^
                                       malloc but no free..

  Calls to check pointer +/- integer:        0
  Calls to check array references:           0
  Calls to check pointer differences:        0
  Calls to check object references:          0
  Calls to check component references:       0
  Calls to check truth, falsity of pointers: 0, 0
  Calls to check <, >, <=, >= of pointers:   0
  Calls to check ==, != of pointers:         0
  Calls to check p++, ++p, p--, --p:         0, 0, 0, 0
  References to unchecked static, stack:     0, 0

hofrat

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Is there any tool like purify(memory leak check tool) for Embedded Linux/ELDK environment

From: John Zhou <hidden>
Date: 2003-09-04 11:02:49

Dear all,

Is there any tool like purify(memory leak check tool) for Embedded Linux/ELDK environment?

Best Regards,
John Zhou

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: Memory Profiling Tool

From: Dan Kegel <hidden>
Date: 2003-09-04 14:42:16

Der Herr Hofrat wrote:
quoted
Is there any memory profiling and leak detection tool available which works
for both PPC and X86??
bgcc - bounds checking gcc - its a patch to gcc

the output will look something like this but can be tuned with compile time options:

Bounds Checking GCC v gcc-3.2.2-3.1 Copyright (C) 1995 Richard W.M. Jones ...
Hey!  I didn't know that was still alive!  Thanks for the tip!
There's even a version for gcc-3.3.1 at
http://web.inter.nl.net/hcc/Haj.Ten.Brugge/

- Dan

--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

display top CPU processes top tool

From: John Zhou <hidden>
Date: 2003-09-05 08:26:02

Hi, all

I'm using "top" tool to display top CPU processes and system running information in my Embedded Linux based on PowerPC. But, when I run "top" command in prompt #, it's coming on:

# set
PS2=>
PS1=#
IFS=
USER=root
SHELL=/bin/sh
PATH=/usr/bin:/bin:/usr/sbin:/sbin
HOME=/
TERM=ansi
#
# top
top: Unknown terminal "ansi" in $TERM
#

I changed to :

# export TERM=VT100
# set
PS2=>
PS1=#
IFS=
USER=root
SHELL=/bin/sh
PATH=/usr/bin:/bin:/usr/sbin:/sbin
HOME=/
TERM=VT100
# top
top: Unknown terminal "VT100" in $TERM
#

Another question:

How to use "top" with option to save cpu information to a log file?

Thanks for any help.

John Zhou

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: display top CPU processes top tool

From: Jaap-Jan Boor <hidden>
Date: 2003-09-05 09:02:27

Do you have a /etc/TERMCAP ?

On vrijdag, sep 5, 2003, at 10:26 Europe/Amsterdam, John Zhou wrote:
Hi, all

I'm using "top" tool to display top CPU processes and system running
information in my Embedded Linux based on PowerPC. But, when I run
"top" command in prompt #, it's coming on:

# set
PS2=>
PS1=#
IFS=
USER=root
SHELL=/bin/sh
PATH=/usr/bin:/bin:/usr/sbin:/sbin
HOME=/
TERM=ansi
#
# top
top: Unknown terminal "ansi" in $TERM
#

I changed to :

# export TERM=VT100
# set
PS2=>
PS1=#
IFS=
USER=root
SHELL=/bin/sh
PATH=/usr/bin:/bin:/usr/sbin:/sbin
HOME=/
TERM=VT100
# top
top: Unknown terminal "VT100" in $TERM
#

Another question:

How to use "top" with option to save cpu information to a log file?

Thanks for any help.

John Zhou

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

RE: display top CPU processes top tool

From: John Zhou <hidden>
Date: 2003-09-05 09:23:24

Yes. I have a /etc/TERMCAP. But it's still failed. need other changes ?

Thanks for your email.

-----Original Message-----
From: owner-linuxppc-embedded@lists.linuxppc.org
[mailto:owner-linuxppc-embedded@lists.linuxppc.org]On Behalf Of Jaap-Jan
Boor
Sent: Friday, September 05, 2003 5:02 PM
To: zjzhou@newrocktech.com
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: display top CPU processes top tool



Do you have a /etc/TERMCAP ?

On vrijdag, sep 5, 2003, at 10:26 Europe/Amsterdam, John Zhou wrote:
Hi, all

I'm using "top" tool to display top CPU processes and system running
information in my Embedded Linux based on PowerPC. But, when I run
"top" command in prompt #, it's coming on:

# set
PS2=>
PS1=#
IFS=
USER=root
SHELL=/bin/sh
PATH=/usr/bin:/bin:/usr/sbin:/sbin
HOME=/
TERM=ansi
#
# top
top: Unknown terminal "ansi" in $TERM
#

I changed to :

# export TERM=VT100
# set
PS2=>
PS1=#
IFS=
USER=root
SHELL=/bin/sh
PATH=/usr/bin:/bin:/usr/sbin:/sbin
HOME=/
TERM=VT100
# top
top: Unknown terminal "VT100" in $TERM
#

Another question:

How to use "top" with option to save cpu information to a log file?

Thanks for any help.

John Zhou

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: display top CPU processes top tool

From: Dan Kegel <hidden>
Date: 2003-09-05 16:00:05

John Zhou wrote:
Jaap-Jan wrote:
quoted
On vrijdag, sep 5, 2003, at 10:26 Europe/Amsterdam, John Zhou wrote:
quoted
top: Unknown terminal "ansi" in $TERM
top: Unknown terminal "VT100" in $TERM
Do you have a /etc/TERMCAP ?
Yes. I have a /etc/TERMCAP. But it's still failed. need other changes ?
Use strace to see what it's looking for.
- Dan


--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: display top CPU processes top tool

From: Mark Hatle <hidden>
Date: 2003-09-05 16:39:38

I bet that top is linked with ncurses instead of termcap.  As such look
at /usr/share/terminfo on the target and make sure the appropriate
directories and terminal emulations are there.

--Mark

Dan Kegel wrote:
John Zhou wrote:
quoted
Jaap-Jan wrote:
quoted
On vrijdag, sep 5, 2003, at 10:26 Europe/Amsterdam, John Zhou wrote:
quoted
top: Unknown terminal "ansi" in $TERM
top: Unknown terminal "VT100" in $TERM

Do you have a /etc/TERMCAP ?

Yes. I have a /etc/TERMCAP. But it's still failed. need other changes ?

Use strace to see what it's looking for.
- Dan


--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045




** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help