From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12534 invoked by alias); 6 May 2012 07:49:43 -0000 Received: (qmail 12525 invoked by uid 22791); 6 May 2012 07:49:42 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,TW_VG X-Spam-Check-By: sourceware.org Received: from mailrelay020.isp.belgacom.be (HELO mailrelay020.isp.belgacom.be) (195.238.6.95) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 06 May 2012 07:49:28 +0000 X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBAJkspk/ZiDop/2dsb2JhbAANNoVysBQBAQEEI1YQCw4KAgImAgJXBhyIEKdqkgOBL45YgRgEqSs Received: from 41.58-136-217.adsl-dyn.isp.belgacom.be (HELO [192.168.1.3]) ([217.136.58.41]) by relay.skynet.be with ESMTP; 06 May 2012 09:49:22 +0200 Subject: Re: Memory Dump From: Philippe Waroquiers To: Hei Chan Cc: xgsa , "gdb@sourceware.org" In-Reply-To: <1336265707.19913.YahooMailNeo@web162404.mail.bf1.yahoo.com> References: <1335710405.38804.YahooMailNeo@web162403.mail.bf1.yahoo.com> <4FA22BFD.1060600@yandex.ru> <1336265707.19913.YahooMailNeo@web162404.mail.bf1.yahoo.com> Content-Type: text/plain; charset="UTF-8" Date: Sun, 06 May 2012 07:49:00 -0000 Message-ID: <1336290559.2213.14.camel@soleil> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-05/txt/msg00023.txt.bz2 On Sat, 2012-05-05 at 17:55 -0700, Hei Chan wrote: > Hi Phillippe, > > The feature you mentioned sounds interesting. > > Is it capable of taking heap snapshot per user request/command? Yes. You can request a snapshot on user request, either from the command line, or from a gdb connected to the Valgrind gdbserver. For gdbserver explanations, see http://www.valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.gdbserver For massif snapshot requests, see http://www.valgrind.org/docs/manual/ms-manual.html#ms-manual.monitor-commands So, from a shell command line, to request a massif snapshot, you do e.g.: vgdb snapshot filename_for_your_snapshot >From gdb connected to Valgrind gdbserver, you put breaks where relevant, and then such a break is reached: monitor snapshot filename_for_your_snapshot Note also that memcheck also provides on demand leak search (including for still reachable blocks), showing the delta with the previous leak search. In 3.8.0 SVN (not yet released), Valgrind gdbserver+memcheck also provides functionalities to list the still allocated blocks, and search for "who" still points at these allocated blocks. Philippe