public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Mike Gulick <mgulick@mathworks.com>
To: gdb@sourceware.org
Cc: mgulick@mathworks.com
Subject: GDB memory usage with compressed debug info
Date: Tue, 16 Mar 2021 14:40:57 -0400	[thread overview]
Message-ID: <e68b723a-0cf9-0a53-6129-100abf608ba6@mathworks.com> (raw)

Hi,

I'm observing that GDB memory usage is much higher when I have debug 
info compressed with 'objcopy --compress-debug-sections'.  In a large 
C++ application, I see the instance with uncompressed debug info use 
46GB VIRTUAL memory and 11GB RSS, and the instance with compressed debug 
info is using 46GB VIRTUAL memory and 42GB RSS.  In case it matters, the 
debug info is separated from the original binary into its own file.

It seems like GDB must load the full uncompressed debug info into memory 
when the underlying files are compressed?

I'm currently using GDB 9.2.  I checked the 10.1 NEWS and didn't see 
anything that looked like it would have changed this result, but I'm 
happy to give it a try if you think it might help.

Is there any chance this could be improved with a patch to GDB, or is 
this just the nature of compressed debug data?

Also, FYI, the NEWS link for the GDB 10.1 release on the GDB home page 
points to the NEWS file for the 9.1 release.

Thanks!

-Mike


             reply	other threads:[~2021-03-16 18:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 18:40 Mike Gulick [this message]
2021-03-18 18:38 ` Mike Gulick
2021-03-22 18:09   ` Christian Biesinger
2021-03-24 19:59     ` Matt Rice
2021-03-24 22:52       ` Mike Gulick

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=e68b723a-0cf9-0a53-6129-100abf608ba6@mathworks.com \
    --to=mgulick@mathworks.com \
    --cc=gdb@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).