From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11842 invoked by alias); 14 Feb 2007 20:48:47 -0000 Received: (qmail 11832 invoked by uid 22791); 14 Feb 2007 20:48:46 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 14 Feb 2007 20:48:40 +0000 Received: (qmail 20255 invoked from network); 14 Feb 2007 20:48:38 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 14 Feb 2007 20:48:38 -0000 To: gdb@sourceware.org Subject: Re: GDB and scripting languages - which References: <20070108222005.GA27451@nevyn.them.org> <20070210203307.GA27502@nevyn.them.org> <45D33263.2080403@adacore.com> <45D34E2E.7070701@adacore.com> From: Jim Blandy Date: Wed, 14 Feb 2007 21:23:00 -0000 In-Reply-To: (Jim Blandy's message of "Wed, 14 Feb 2007 12:04:59 -0800") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-02/txt/msg00147.txt.bz2 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 $