From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15917 invoked by alias); 5 Mar 2013 13:52:15 -0000 Received: (qmail 15909 invoked by uid 22791); 5 Mar 2013 13:52:14 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,TW_VB X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 Mar 2013 13:52:08 +0000 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 1C278A522E; Tue, 5 Mar 2013 14:52:07 +0100 (CET) Date: Tue, 05 Mar 2013 13:52:00 -0000 From: Richard Biener To: Jakub Jelinek Cc: Vladimir Makarov , Tom Tromey , Jeff Law , gcc-patches@gcc.gnu.org Subject: Re: Patch ping In-Reply-To: <20130305134717.GI12913@tucnak.redhat.com> Message-ID: References: <20130305131224.GH12913@tucnak.redhat.com> <20130305134717.GI12913@tucnak.redhat.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2013-03/txt/msg00180.txt.bz2 On Tue, 5 Mar 2013, Jakub Jelinek wrote: > On Tue, Mar 05, 2013 at 02:26:03PM +0100, Richard Biener wrote: > > On Tue, 5 Mar 2013, Jakub Jelinek wrote: > > > Thanks for all the recent reviews of memory leak plugging patches, > > > there are 4 still unreviewed from last week though. > > > > > > - sched-deps leak fix: > > > http://gcc.gnu.org/ml/gcc-patches/2013-02/msg01197.html > > > > > > - LRA leak fix: > > > http://gcc.gnu.org/ml/gcc-patches/2013-02/msg01239.html > > > > > > - libcpp leak fix: > > > http://gcc.gnu.org/ml/gcc-patches/2013-02/msg01341.html > > > > > > - PCH leak fix + --enable-checking=valgrind changes to allow > > > --enable-checking=yes,valgrind bootstrap to succeed: > > > http://gcc.gnu.org/ml/gcc-patches/2013-03/msg00044.html > > > > That looks awkward ... isn't there a simple valgrind_disable () / > > valgrind_enable () way of disabling checking around this code? > > Unfortunately not. I went through all valgrind.h and memcheck.h > client calls. If at least there was a VALGRIND_GET_VBITS variants > that allowed getting all vbits, (i.e. whether something is unaddressable > vs. undefined vs. defined), rather than just if any of the vbits are > unaddressable, give up, otherwise return undefined vs. defined bits, > it would simplify the code. I hope perhaps future valgrind version > could add that, so it would be just VALGRIND_GET_VBITS2, > VALGRIND_MAKE_MEM_DEFINED before and VALGRIND_SET_VBITS2 at the end > (restore previous state). I've at least added __builtin_expect, > so the binary search code isn't in hot path. It isn't that slow, > during binary search I'm always testing just a single byte, and > say if we don't have any single memory allocations > 4GB, it will be > at most 37 valgrind client calls per objects, usually much smaller > number than that. Alternatively using a suppressions file during bootstrap might be possible ... maybe also useful for general valgrind debugging use? Richard.