git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Aguilar <davvid@gmail.com>
To: Mike Hommey <mh@glandium.org>
Cc: Jeff King <peff@peff.net>,
	Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>,
	Alexander Kuleshov <kuleshovmail@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH] Makefile: do not compile git with debugging symbols by default
Date: Tue, 27 Jan 2015 00:43:39 -0800	[thread overview]
Message-ID: <20150127084338.GA37443@gmail.com> (raw)
In-Reply-To: <20150122225517.GB31912@glandium.org>

On Fri, Jan 23, 2015 at 07:55:17AM +0900, Mike Hommey wrote:
> On Thu, Jan 22, 2015 at 01:35:38PM -0500, Jeff King wrote:
> > On Thu, Jan 22, 2015 at 06:36:41PM +0100, Matthieu Moy wrote:
> > 
> > > > Yes, main point is size of executable.
> > > 
> > > The Git executable is a few megabytes, i.e. 0.001% the size of a really
> > > small hard disk. The benefit seems really negligible to me.
> > 
> > I don't know the layout of the symbols with respect to the code, or
> > whether the stripped version might reduce memory pressure. So in theory
> > it could have a performance impact.
> 
> It doesn't. Debugging info is in a part of the file that is not mapped
> in memory, and in a part that can be removed without affecting the rest
> of the file, so it's more or less at the end.

It goes even further.  These days Fedora systems strip debug
info out into separate files and packages while creating rpms
debuginfo packages are created automatically and provide
debuginfo files under /usr/lib/debug, where gdb knows to look by
default.

Alexander, one nice thing about the Makefile is that it supports
you creating a file in your Git worktree called "config.mak"
with the following content:

CFLAGS = -O2 -Wall

If you do that then git will build without debug info and you
won't have to specify CFLAGS when invoking "make".
Hopefully that's easy and convenient enough.

cheers,
-- 
David

      reply	other threads:[~2015-01-27  8:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22 12:50 [PATCH] Makefile: do not compile git with debugging symbols by default Alexander Kuleshov
2015-01-22 13:00 ` Jeff King
2015-01-22 15:09   ` Mike Hommey
2015-01-22 16:51   ` Alexander Kuleshov
2015-01-22 16:53     ` Alexander Kuleshov
2015-01-22 17:36     ` Matthieu Moy
2015-01-22 18:35       ` Jeff King
2015-01-22 22:55         ` Mike Hommey
2015-01-27  8:43           ` David Aguilar [this message]

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=20150127084338.GA37443@gmail.com \
    --to=davvid@gmail.com \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=kuleshovmail@gmail.com \
    --cc=mh@glandium.org \
    --cc=peff@peff.net \
    /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 NNTP newsgroup(s).