This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: fail to improve psymtab memory consumption



Daniel Berlin <dan@cgsoftware.com> writes:
> >> I actually use mmap when possible, but that's for speed, rather than
> >> memory savings.
> > 
> > Is it really faster?
> Yes, because it saves buffer copying (I think, it's 2am, which is
> about the time i usually say something stupid, so feel free to smack
> me around if i'm wrong)
> (You don't have to dandy about copying buffers into the right
> place. With an mmap'd area, it's already *in* the right place.)

Right --- your process shares pages with the kernel's buffer cache.
You don't have any numbers handy, do you?

> >> It doesn't buy us anything if we still mmap the entire section, and
> >> then touch every part. :)
> > 
> > Which we do when in building the partial symbol table.
> Right.
> 
> However, since we lazily read in full symbols, we don't have this
> behavior unless you force readin of all the symbols. You can do this
> with maint check symtabs, or using the pathological unchecked for case
> of find_pc_sect_symtab with a pc of 0. We should immediately return
> NULL in that case, since nothing contains the symbol table for pc 0,
> but instead, we convert every psymtab to symtab looking for the symtab
> for a plainly invalid memory address. We of course, never find it, and
> return NULL anyway, but not before wasting a ton of time and memory.
> Whoops.

Heh.  That's what I thought, too.  _start is at zero on some embedded
systems.  :(

2001-05-05  Jim Blandy  <jimb@redhat.com>

	* breakpoint.c (check_duplicates): Use the breakpoint's type, not
	its address, to decide whether it's a watchpoint or not.  Zero
	is a valid code address.
	(update_breakpoints_after_exec): Admonishing comments.
	* breakpoint.h (struct breakpoint): Doc fixes.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]