Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@codesourcery.com>
To: gdb@sourceware.org
Subject: Re: GDB and scripting languages - which
Date: Wed, 14 Feb 2007 21:23:00 -0000	[thread overview]
Message-ID: <m3ire4h3dm.fsf@codesourcery.com> (raw)
In-Reply-To: <m33b58ijys.fsf@codesourcery.com> (Jim Blandy's message of "Wed, 14 Feb 2007 12:04:59 -0800")


Some rough info on resource consumption.  The "VSZ" column says how
much virtual memory the process is consuming, and the "RSS" column
says how much is actually in physical memory at the moment.  RSS is a
better indicator of the actual impact a program is having.

In the tests shown here, Python uses about 2.4x as much memory as Lua,
and 4% as much memory as GDB does debugging itself, having set and hit
a breakpoint on main.

I think both Python and Lua's resource consumption is reasonable for
our application.

$ cd ~/uberbaum/build-cvs-out/gdb
$ ./gdb gdb
GNU gdb 6.6.50.20070130-cvs
Copyright (C) 2007 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
Setting up the environment for debugging gdb.
Breakpoint 1 at 0x8087612: file /home/jimb/uberbaum/cvs-out/gdb/utils.c, line 819.
Breakpoint 2 at 0x80c2ea5: file /home/jimb/uberbaum/cvs-out/gdb/cli/cli-cmds.c, line 201.
(top-gdb) b main
Breakpoint 3 at 0x807eb65: file /home/jimb/uberbaum/cvs-out/gdb/gdb.c, line 30.
(top-gdb) run
Starting program: /home/jimb/uberbaum/build-cvs-out/gdb/gdb 

Breakpoint 3, main (argc=
During symbol reading, incomplete CFI data; unspecified registers (e.g., eax) at 0x807eb62.
1, argv=0xbffb2f74) at /home/jimb/uberbaum/cvs-out/gdb/gdb.c:30
30        memset (&args, 0, sizeof args);
(top-gdb) ps uww -C gdb
Undefined command: "ps".  Try "help".
(top-gdb) shell ps uww -C gdb
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
jimb      8104  5.7  2.6  59116 54032 pts/2    S+   12:44   0:00 ./gdb gdb
jimb      8107  0.0  0.0   5208   500 pts/2    T    12:44   0:00 /home/jimb/uberbaum/build-cvs-out/gdb/gdb
(top-gdb) quit
The program is running.  Exit anyway? (y or n) y
$ python
Python 2.4.4 (#1, Oct 23 2006, 13:58:00) 
[GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
[1]+  Stopped                 python
$ ps uww -C python
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
jimb      8071  0.0  0.1   6240  2632 pts/2    T    12:41   0:00 python
$ lua
Lua 5.1.1  Copyright (C) 1994-2006 Lua.org, PUC-Rio
> 
[2]+  Stopped                 lua
$ ps uww -C lua
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
jimb      8074  0.0  0.0   4548  1116 pts/2    T    12:41   0:00 lua
$ 


  parent reply	other threads:[~2007-02-14 20:48 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-08 22:20 Daniel Jacobowitz
2007-01-08 22:39 ` Kip Macy
2007-01-08 22:42   ` Daniel Jacobowitz
2007-01-08 23:03     ` Kip Macy
2007-01-08 22:40 ` Bob Rossi
2007-01-09 20:11 ` Jim Blandy
2007-01-09 20:23   ` Bob Rossi
2007-01-09 21:37     ` Paul Koning
2007-01-09 21:42       ` Daniel Jacobowitz
2007-01-09 21:48       ` Nick Roberts
2007-01-09 21:53         ` Daniel Jacobowitz
2007-01-11  4:31           ` Nick Roberts
2007-01-11  5:06             ` Daniel Jacobowitz
2007-01-13  8:30           ` Eli Zaretskii
2007-01-09 21:55         ` Kip Macy
2007-01-11 14:56       ` Robert Dewar
2007-01-11 15:07         ` Robert Dewar
2007-01-09 20:30   ` Mark Kettenis
2007-01-13  8:32 ` Eli Zaretskii
2007-02-10 12:28   ` Eli Zaretskii
2007-02-10 18:10     ` Pedro Alves
2007-02-10 20:33     ` Daniel Jacobowitz
2007-02-12 17:47       ` Jim Blandy
2007-02-12 21:36         ` Eli Zaretskii
2007-02-12 21:59           ` Robert Dewar
2007-02-12 22:07             ` Daniel Jacobowitz
2007-02-12 22:07               ` Robert Dewar
2007-02-14  5:57           ` Jim Blandy
2007-02-14 15:42             ` Eli Zaretskii
2007-02-14 16:01               ` Paul Koning
2007-02-14 17:50                 ` Eli Zaretskii
2007-02-14 16:06               ` Daniel Jacobowitz
2007-02-14 18:01                 ` Eli Zaretskii
2007-02-14 18:45                   ` Daniel Jacobowitz
2007-02-14 17:37               ` Robert Dewar
2007-02-14 18:24                 ` Eli Zaretskii
2007-02-14 18:29                   ` Robert Dewar
2007-02-14 18:33                     ` Eli Zaretskii
2007-02-14 18:34                       ` Robert Dewar
2007-02-14 20:14                     ` Jim Blandy
2007-02-14 20:56                       ` Robert Dewar
2007-02-14 21:47                         ` Jim Blandy
2007-02-14 21:23                       ` Jim Blandy [this message]
2007-02-14 21:46                         ` Robert Dewar
2007-02-14 20:10               ` Jim Blandy
2007-02-15  1:03                 ` Gaius Mulley
2007-02-17 13:53                 ` Eli Zaretskii
2007-02-17 14:07                   ` Daniel Jacobowitz
2007-02-18  4:11                     ` Robert Dewar
2007-02-19 22:17                       ` Jim Blandy
2007-01-15 18:29 Kaz Kylheku
2007-01-15 21:20 ` Eli Zaretskii
2007-01-16  0:17   ` Kip Macy
2007-01-17 19:09 ` Jim Blandy
2007-01-16  0:38 Kaz Kylheku
2007-01-17 19:24 ` Jim Blandy

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=m3ire4h3dm.fsf@codesourcery.com \
    --to=jimb@codesourcery.com \
    --cc=gdb@sourceware.org \
    /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