This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Setting a variable is very slow.
- From: Daniel Jacobowitz <drow at false dot org>
- To: jagorak <jagorak at wp dot pl>
- Cc: gdb at sourceware dot org
- Date: Sat, 21 Apr 2007 09:41:17 -0400
- Subject: Re: Setting a variable is very slow.
- References: <1546343093.20070421134325@wp.pl>
On Sat, Apr 21, 2007 at 01:43:25PM +0100, jagorak wrote:
> I need to make hundreds of such assignments & calls. The problem is -
> setting a single variable is very slow (in most cases it takes much
> more time to set a single variable than to call a procedure, even if
> the procedure is not very simple).
>
> Any ideas why this is the case?
I know of some problems in this area, but it's not clear which one is
your problem here. Could you try building gdb with
--enable-profiling? It should generate a gmon.out. That might not
show the real problem; if you want to just build a debuggable version
and use oprofile, that might work better. It depends whether GDB is
eating CPU or being wasteful with ptrace operations.
--
Daniel Jacobowitz
CodeSourcery