From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Hajnoczi Subject: Re: How to diagnose memory leak in kvm-qemu-0.14.0? Date: Thu, 19 May 2011 09:50:51 +0100 Message-ID: References: <20110518164429.GA20927@bytemark.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org To: Steve Kemp Return-path: Received: from mail-gx0-f174.google.com ([209.85.161.174]:61586 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753944Ab1ESIuw convert rfc822-to-8bit (ORCPT ); Thu, 19 May 2011 04:50:52 -0400 Received: by gxk21 with SMTP id 21so827900gxk.19 for ; Thu, 19 May 2011 01:50:51 -0700 (PDT) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Thu, May 19, 2011 at 9:40 AM, Stefan Hajnoczi w= rote: > On Wed, May 18, 2011 at 5:44 PM, Steve Kemp wr= ote: > If you have SystemTap installed you may wish to use the "dtrace" > backend instead of "simple". =A0You can then use SystemTap scripts on > the probes. =A0SystemTap is more powerful, it should allow you to > extract call stacks when probes are fired but I'm not experienced wit= h > it. =46orgot to add that the __builtin_return_address() gcc extension can b= e used to collect return addresses even with the simple trace backend: http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Return-Address.html#index-g= _t_005f_005fbuiltin_005freturn_005faddress-2431 I've used it in the past as a poor man's stack trace when tracking down memory leaks. Stefan