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


What kind of effect does this have on performance?  Is there a speed
benefit to it, or is it just that it allows multiple GDB's to share
memory?

I believe you might as well use MAP_PRIVATE, not MAP_SHARED.  The
kernel will still share memory with the block cache, the pages will
just be copy-on-write.  You don't want bugs in GDB to corrupt your
executables.

I understand that it would make your BFD code more complicated, but it
seems to me you want to map individual sections, not entire files. 
Again, this will still share memory with the block cache, so aside
from the complexity I don't see the downside.

The last time this was brought up, there was concern about mmap's
reliability and portability, but if I remember right, people weren't
specific about exactly where the problems were to be expected.  If
this is a decent performance win, I think we should consider it, and
sort out those portability issues as they arise.


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