all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: joakim@verona.se, Emacs developers <emacs-devel@gnu.org>
Subject: Re: valgrinding emacs?
Date: Fri, 23 Jan 2015 08:11:58 -0800	[thread overview]
Message-ID: <54C272CE.2010409@cs.ucla.edu> (raw)
In-Reply-To: <m3lhktcy18.fsf@exodia.verona.se>

[-- Attachment #1: Type: text/plain, Size: 453 bytes --]

joakim@verona.se wrote:
> I seem to recall that others have had success valgrinding emacs in the past.

It works for me, sort of, but it's kind of flaky.  I haven't used it recently, 
but I just now tried it on Fedora 21 x86-64 and got some warnings that I hope 
are false alarms.  I use the attached valgrind.supp file which is somewhat 
obsolescent now (it probably needs to be upgraded to match Fedora 21's quirks, 
and I haven't looked into that).


[-- Attachment #2: valgrind.supp --]
[-- Type: text/plain, Size: 1337 bytes --]

# valgrind suppression file
# Usage:
#    valgrind --suppressions=valgrind.supp ./temacs

# Conservative garbage collection inherently looks at uninitialized values,
# and Fgarbage_collect and its callees all depend on this.
# It's hard to separate out exactly which callees need to be listed here,
# since the C compiler can inline them.  Also, valgrind doesn't care
# about the use of uninitialized variables directly, only when their values
# are eventually used.  So just list Fgarbage_collect and its callees.
{
   Fgarbage_collect Cond - conservative garbage collection
   Memcheck:Cond
   ...
   fun:Fgarbage_collect
}
{
   Fgarbage_collect Value8 - conservative garbage collection
   Memcheck:Value8
   ...
   fun:Fgarbage_collect
}
# valgrind only looks at the last few callees on the stack, but
# mark_object can call itself recursively and deeply.  So list
# it too, in case Fgarbage_collect is a long way from the stack top.
{
   Fgarbage_collect Cond - conservative garbage collection
   Memcheck:Cond
   ...
   fun:mark_object
}
{
   Fgarbage_collect Value8 - conservative garbage collection
   Memcheck:Value8
   ...
   fun:mark_object
}

# On one circa-2011 x86-64 GNU/Linux platform, strlen is inlined to
# something that loads 4 bytes at a time.
{
   init_buffer optimized strlen
   Memcheck:Addr4
   fun:init_buffer
}

      parent reply	other threads:[~2015-01-23 16:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23 15:33 valgrinding emacs? joakim
2015-01-23 15:51 ` joakim
2015-01-23 16:11 ` Paul Eggert [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=54C272CE.2010409@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=joakim@verona.se \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.