From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16952 invoked by alias); 24 Jan 2012 00:33:56 -0000 Received: (qmail 16940 invoked by uid 22791); 24 Jan 2012 00:33:55 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 Jan 2012 00:33:42 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1RpUKT-0002dc-8v from Yao_Qi@mentor.com ; Mon, 23 Jan 2012 16:33:41 -0800 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 23 Jan 2012 16:33:41 -0800 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.1.289.1; Mon, 23 Jan 2012 16:33:40 -0800 Message-ID: <4F1DFC61.2080802@codesourcery.com> Date: Tue, 24 Jan 2012 00:51:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:9.0) Gecko/20111220 Thunderbird/9.0 MIME-Version: 1.0 To: Eli Zaretskii CC: Subject: Re: [patch 5/8] Doc for agent References: <4F1D55D7.7030506@codesourcery.com> <4F1D678B.2040705@codesourcery.com> <837h0i2uf9.fsf@gnu.org> In-Reply-To: <837h0i2uf9.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes 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 X-SW-Source: 2012-01/txt/msg00802.txt.bz2 On 01/24/2012 01:35 AM, Eli Zaretskii wrote: Eli, Thanks for the review. > >> +multi-threaded program becomes more and more popular, there should be more > ^^^^^^^^^^^^^^^ > "programs become" > >> +and more bugs that only manifest themselves at full speed, for example, thread >> +races. > > I don't really agree that the issue here is "low speed" vs "full > speed". Rather, the issue is that the timeline of the running program > is modified by the debugger, when it stops some or all of the threads, > single-steps some of them, etc. Disrupting the original timeline can > completely modify the behavior and conceal bugs that depend on timing. > Agreed. >> +the bug. In order to overcome the interference, we should reduce the number of >> +operations debugger performed. > ^^^^^^^^^^^^^^^^^^ > "preformed by the debugger". > > Again, I think the issue is not the number of operations, but > interference with the program's timing. > Yes, the issue is the interference with the program's timing. We want to fix this issue, to some extent, by reducing the number of operations here. Of course, there are other approaches to reduce interference. How about change this sentence like this, "In order to reduce the interference with the program, we can reduce the number of operations performed by the debugger." >> @dfn{Agent}, a shared library, is running within >> +the same process with inferior, and is able to perform some debugging operations >> +itself. As a result, debugger is only involved when necessary, and performance >> +of debugging can be improved accordingly. > > But this is a half-measure, isn't it? The agent will still stop or > slow down the program's threads, and so still influences its timeline, > right? > Right. Interference can be reduced, but can't be removed completely. >> -In some applications, it is not feasible for the debugger to interrupt >> -the program's execution long enough for the developer to learn anything >> -helpful about its behavior. If the program's correctness depends on its >> -real-time behavior, delays introduced by a debugger might cause the >> -program to fail, even when the code itself is correct. It is useful to >> -be able to observe the program's behavior without interrupting it. > > See, this text describes the issue more correctly, IMO, but it looks > like you deleted it and not moved it to the new chapter. I remove this paragraph because it fits to the concept of tracepoint ("observer the program's behavior without interrupting it"), and the agent work can do more than that. I don't mind putting it back at the the beginning of chapter "Debugging Agent" as another problem statement. -- Yao (齐尧)