This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [PATCH] Use mmap for symbol tables


Not a whole lot to add in addition to what others have already said.

One important note: you bypassed symfile_relocate_debug_section. 
Instead, this logic ought to live in there; if the debug section
has relocations, we can't mmap it, because we do need to modify
everything we read from disk.

There's some benefits other than the obvious to using read-only
mmap; you'll get better hot-cache performance because two consecutive
sessions can do DWARF processing on pages already read in, rather than
memcpy'ing them from the page cache.

I've got no qualms about mmapping the whole object.  We already are
likely to run into address space issues if the file is large enough
for this to matter.  I'm not real sympathetic to tools which edit
debugged binaries in place; and any standard build tools will unlink
the old file.

We can do the same thing on Windows and if there's a use for it on Unix
systems someone should investigate whether an equivalent hack helps on
native Windows.


-- 
Daniel Jacobowitz
CodeSourcery


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