From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19189 invoked by alias); 21 Dec 2012 08:55:34 -0000 Received: (qmail 19181 invoked by uid 22791); 21 Dec 2012 08:55:33 -0000 X-SWARE-Spam-Status: No, hits=-4.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-ob0-f172.google.com (HELO mail-ob0-f172.google.com) (209.85.214.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 21 Dec 2012 08:55:28 +0000 Received: by mail-ob0-f172.google.com with SMTP id za17so4320566obc.31 for ; Fri, 21 Dec 2012 00:55:27 -0800 (PST) Received: by 10.60.169.171 with SMTP id af11mr10312688oec.92.1356080127679; Fri, 21 Dec 2012 00:55:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.60.84.5 with HTTP; Fri, 21 Dec 2012 00:54:47 -0800 (PST) In-Reply-To: <87k3scn69b.fsf@fleche.redhat.com> References: <464A745A-AA80-4485-820E-64C4D01A270C@nus.edu.sg> <87k3scn69b.fsf@fleche.redhat.com> From: Hui Zhu Date: Fri, 21 Dec 2012 08:55:00 -0000 Message-ID: Subject: Re: Tracepoints (and python) To: =?ISO-8859-1?Q?Marc_Br=FCnink?= Cc: Tom Tromey , gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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-12/txt/msg00069.txt.bz2 On Thu, Dec 20, 2012 at 10:32 PM, Tom Tromey wrote: >>>>>> "Marc" =3D=3D Marc Br=FCnink writes: > > Marc> 1. Is there any technical reason why tracing is only possible on > Marc> remote targets? Or is is "just" not implemented for anything else. > > I think the only reason is that nobody has done it. > > Marc> 2. Anyone working on making tracepoints available to the python > Marc> interface? Any pitfalls to expect? > > Nobody has worked on this. > I wouldn't predict any particularly tricky problems, at least not for > representing the tracepoints themselves. I'm less sure about > representing the trace state. > I wrote some python code with tracepoint to parse the traceframe from target (my target is KGTP). You can get a example in http://code.google.com/p/kgtp/wiki/hotcode I have 3 issues with it: 1. Not sure about upstream, but when I use it, it is hard to setup tracepoint action with python. How I handle it is write tracepoint and action to a GDB source file and call soure command in python script. 2. Another is the performance issue. If you have a lot of traceframe need to be analysed by python, you will get it. And actually, the url that I posted is about a python+gdb performance issue and a solution of it. 3. The last one is if you can handle traceframe with python, maybe you think you can keep analyse the traceframe from target. But current tracepoint doesn't it. You must "tstart", "tstop", parse. What I handle it is let KGTP supply a special interface in tfile format. Then GDB can keep get traceframe from it without stop tracepoint. > Tom Thanks, Hui