From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28234 invoked by alias); 26 Jan 2015 08:00:25 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 28203 invoked by uid 89); 26 Jan 2015 08:00:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mga02.intel.com Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 26 Jan 2015 08:00:20 +0000 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 26 Jan 2015 00:00:01 -0800 X-ExtLoop1: 1 Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by orsmga001.jf.intel.com with ESMTP; 26 Jan 2015 00:00:01 -0800 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.229]) by IRSMSX106.ger.corp.intel.com ([169.254.8.94]) with mapi id 14.03.0195.001; Mon, 26 Jan 2015 07:59:59 +0000 From: "Metzger, Markus T" To: Jan Kratochvil CC: "gdb-patches@sourceware.org" Subject: RE: record btrace experience [Re: x86_64-m32 internal error for multi-thread-step.exp [Re: [PATCH v10 06/28] btrace: change branch trace data structure]] Date: Mon, 26 Jan 2015 12:41:00 -0000 Message-ID: References: <1389686678-9039-1-git-send-email-markus.t.metzger@intel.com> <1389686678-9039-7-git-send-email-markus.t.metzger@intel.com> <20150108204943.GA4851@host2.jankratochvil.net> <20150122163740.GA11113@host2.jankratochvil.net> <20150125191240.GA2646@host1.jankratochvil.net> In-Reply-To: <20150125191240.GA2646@host1.jankratochvil.net> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00699.txt.bz2 > -----Original Message----- > From: Jan Kratochvil [mailto:jan.kratochvil@redhat.com] > Sent: Sunday, January 25, 2015 8:13 PM Thanks a lot for the feedback. > BTW these defaults sometimes did limit my use of btrace but right now I do > not > have a reproducer where it works with setting them unlimited while it does > not > while leaving them as they are: > (gdb) show record instruction-history-size > Number of instructions to print in "record instruction-history" is 10. > (gdb) show record function-call-history-size > Number of functions to print in "record function-call-history" is 10. Regarding instruction-history-size and function-call-history-size, they only affect the number of lines displayed in the "record instruction-history" and "record function-call-history" commands. They should have no impact on recording or on the backtrace command. I think what you are looking for is a command to set the buffer size. See https://sourceware.org/ml/gdb-patches/2014-11/msg00462.html. > The problem I see is how to transparently enable btrace on some host. >=20 > Instead of > -ex r > one has to type > -ex start -ex 'set record instruction-history-size unlimited' -ex 'set > record function-call-history-size unlimited' -ex 'record btrace' -ex c > which is really not convenient.=20=20 [...] > Obviously it would be nice to be able to do just: > echo 'record btrace' >>~/.gdbinit Agreed. I guess you know the record architecture better than I do. The record command pushes a new record target onto the target stack. This requires a running inferior. We could try to instead install a hook to delay pushing the record target until we have an inferior. The hook will remain installed when the inferior terminates or is rerun; "record stop" will remove the hook. Regards, Markus. Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/Muenchen, Deutschland Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk Registergericht: Muenchen HRB 47456 Ust.-IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052