From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17979 invoked by alias); 1 Oct 2003 04:44:48 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 17958 invoked from network); 1 Oct 2003 04:44:38 -0000 Received: from unknown (HELO calvin.codito.com) (203.199.140.162) by sources.redhat.com with SMTP; 1 Oct 2003 04:44:38 -0000 Received: from ramana.codito.co.in (numenor.codito.co.in [192.168.100.52]) by calvin.codito.com (8.12.8/8.12.5) with ESMTP id h914gi4O010342; Wed, 1 Oct 2003 10:12:45 +0530 Subject: Re: Tracepoints on gdb/gdbserver From: Ramana Radhakrishnan Reply-To: ramana@codito.com To: Jim Blandy Cc: Daniel Jacobowitz , ramana@codito.com, gdb@sources.redhat.com, ac131313@redhat.com, mark.newman@lmco.com In-Reply-To: References: <1064924214.3808.157.camel@numenor.codito.co.in> <20030930125017.GA23342@nevyn.them.org> Content-Type: text/plain Organization: Codito Technologies Message-Id: <1064983648.3808.286.camel@numenor.codito.co.in> Mime-Version: 1.0 Date: Wed, 01 Oct 2003 04:44:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2003-10/txt/msg00006.txt.bz2 On Wed, 2003-10-01 at 04:12, Jim Blandy wrote: > Daniel Jacobowitz writes: > > That'll work. I got the impression that tracepoints are designed to be > > even lighter-weight than that; you can implement them via an agent > > expression -> native assembly conversion. But this requires runtime > > patching and is quite complicated. Just saving the overhead of the > > remote protocol will be useful. > > Yes. The original implementation used a bytecode interpreter (which > is really pretty fast), but it was an embedded board with no OS, and > the interpreter ran in the same address space as the program being > debugged, so those memory references were just load instructions, and > the trace opcodes were just memcpy calls. > > If you implement tracepoints in gdbserver, then those are going to > become ptrace calls, which are going to be a lot slower. It might > still be fast enough for your purposes --- but I just want to point > out that it's not the same arrangement we used in the original > application. I agree that it would be slow but as Daniel points out, compared the overhead of the remote protocol, it would still be useful. regards Ramana