From: Andrew Cagney <ac131313@cygnus.com>
To: Daniel Berlin <dan@cgsoftware.com>
Cc: Jim Blandy <jimb@cygnus.com>, gdb-patches@sources.redhat.com
Subject: Re: PATCH: fail to improve psymtab memory consumption
Date: Mon, 23 Jul 2001 20:36:00 -0000 [thread overview]
Message-ID: <3B5CD3B6.9060106@cygnus.com> (raw)
In-Reply-To: <87d76uerh8.fsf@cgsoftware.com>
>>> 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.)
>
>
> Nathan myers confirms my suspicion, as well.
>
> http://pgsql.profnet.pl/mhonarc/pgsql-hackers/2001-05/msg01233.html
> "
> Using mmap() in place of disk read() almost always results in enough
> performance improvement to make doing so worth a lot of disruption."
> "
Does this require serial or random file i/o?
> Everything i can pull up on google says mmap is so much faster than
> malloc+fread that it's not even funny, which means it's not just that
> it feels faster. On a 100 meg debug info file, you can easily notice
> the difference.
What the heck. I'll think out loud.
The dwarf2 sections are parsed serially, correct? That means either:
o the entire section is read in (a large
slow file cache thrashing copy) and then
parse that buffer
o the section is mmap'd - gdb's memory image
grows by a large amount
o the section is read, bit by bit, on demand
using FILE and the hosts buffer cache.
Some OS's even implement this as a mmap().
I don't know but back in the good old days CPU's and disks were vaguely
comparable. How a days, the disks are the same speed but the CPU's are
fasater. Simple FILE I/O could prove faster than you're expecting.
Andrew
next prev parent reply other threads:[~2001-07-23 20:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20010720212013.7DA695E9D8@zwingli.cygnus.com>
2001-07-20 15:17 ` Daniel Berlin
2001-07-20 22:22 ` Jim Blandy
2001-07-20 23:17 ` Daniel Berlin
2001-07-21 8:50 ` Jim Blandy
2001-07-23 20:36 ` Andrew Cagney [this message]
2001-07-23 22:15 ` Daniel Berlin
2001-07-24 7:49 ` Andrew Cagney
2001-07-24 9:47 ` Daniel Berlin
2001-07-24 9:16 ` Kevin Buettner
2001-07-24 9:35 ` Christopher Faylor
2001-07-24 10:13 ` Frank Ch. Eigler
2001-07-24 10:57 ` Christopher Faylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3B5CD3B6.9060106@cygnus.com \
--to=ac131313@cygnus.com \
--cc=dan@cgsoftware.com \
--cc=gdb-patches@sources.redhat.com \
--cc=jimb@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox