From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18312 invoked by alias); 5 May 2010 04:17:52 -0000 Received: (qmail 18303 invoked by uid 22791); 5 May 2010 04:17:50 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SARE_MSGID_LONG45 X-Spam-Check-By: sourceware.org Received: from mail-pz0-f198.google.com (HELO mail-pz0-f198.google.com) (209.85.222.198) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 05 May 2010 04:17:44 +0000 Received: by pzk36 with SMTP id 36so3037188pzk.24 for ; Tue, 04 May 2010 21:17:42 -0700 (PDT) Received: by 10.142.67.30 with SMTP id p30mr3531262wfa.154.1273033062208; Tue, 04 May 2010 21:17:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.143.4.9 with HTTP; Tue, 4 May 2010 21:17:22 -0700 (PDT) In-Reply-To: <557165.23885.qm@web112507.mail.gq1.yahoo.com> References: <557165.23885.qm@web112507.mail.gq1.yahoo.com> From: Hui Zhu Date: Wed, 05 May 2010 04:17:00 -0000 Message-ID: Subject: Re: [Discussion/Prec] The record speed up plan (Make speed like without prec) To: paawan oza Cc: gdb@sourceware.org, Michael Snyder Content-Type: text/plain; charset=UTF-8 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: 2010-05/txt/msg00027.txt.bz2 On Wed, May 5, 2010 at 12:04, paawan oza wrote: > Hi, > > I have some understanding about followingwhat you wrote in previous mail. > > "But this way have a 2 question. > 1. =C2=A0How to record all the status of a inferior=EF=BC=9F For the linu= x, > checkpoint already use fork to record the > inferior. =C2=A0So prec will use > it too. > And when we want get the old > status of inferior step by step, we can > let the forked process step > by step. =C2=A0That will easy by parse the insn > and know what will happen." > > I have some queries. > > 1) when the process is attached to gdb, and user starts debugging, at wha= t moment we do fork? After "record". > > 2) so you mean to say, forked process will freely run, and still we conti= nue to record parent step by step ? > in above case if we want to play reverse, we still need to depend on the = speed of recording/steeping of parent. > > > > 1. How to record all the status of a inferior=EF=BC=9F For the linux, > > checkpoint already use fork to record the inferior. So prec will use > > it too. > > And when we want get the old status of inferior step by step, we can > > let the forked process step by step. > > If you need single-step the forked inferior, you will still need to > wait for the slow single-step execution, and the advantage of letting > the inferior run freely is lost, right? Yes, the first time reverse will be slow(Maybe sim exec will be more fast). But I think it will be better than forward exec slow. And for the reverse we can do more work to increase the speed. Thanks, Hui > > > > > ----- Original Message ---- > From: Hui Zhu > To: gdb@sourceware.org > Cc: Michael Snyder > Sent: Fri, April 30, 2010 6:53:20 PM > Subject: [Discussion/Prec] The record speed up plan (Make speed like with= out =C2=A0prec) > > Hello, > > I think the record speed is the biggest trouble of prec. > After I did a long think and a lot of test around with it. =C2=A0I got a > idea. =C2=A0Actually, I have began the code work. > > I found that the big trouble is prec let the inferior just step. =C2=A0It > make inferior speed very low. =C2=A0Because the setp need a lot of context > works. > So I think let inferior continue can make it speed up. =C2=A0But How to > record the change of each step? > > Some physicists said all the things in the world have execution rules. > So use the current stat of this thing, we will get what will happen > in the future. =C2=A0Looks most of rules are still not found. =C2=A0:) > > But lucky for us that insns exec rules we know. =C2=A0So most of insns > (There a some special, I will talk it later), if we have the a > inferior value(memory and reg), we can get the each value of next > insn. > So if we can record the all the value of a inferior A(or all the value > that will be change, but to get it will need parse the insns that will > be exec, this is not easy.) , we can let the inferior exec without > step. =C2=A0If the user want reverse exec, get the each step value from A. > Then the record speed will very faster than before. > > But this way have a 2 question. > 1. =C2=A0How to record all the status of a inferior=EF=BC=9F For the linu= x, > checkpoint already use fork to record the inferior. =C2=A0So prec will use > it too. > And when we want get the old status of inferior step by step, we can > let the forked process step by step. =C2=A0That will easy by parse the in= sn > and know what will happen. > > 2. =C2=A0How to handle special insns that we will not know what will happ= en > after it exec? > The first type of this insns is system call. =C2=A0Linux have catchpoint > that make inferior stop before and after syscall. =C2=A0Then we can record > the change after the system call. > The other insn is like rdtsc, I don't know howto get the feature value > of this type. =C2=A0My current idea with them is give up all the record > after this insn. > If user need, insert special breakpoint for it. =C2=A0Next time, inferior > will stop on this insn, then prec can record the value after it exec. > > BTW, I call this new function pre_record, I agree with you if you said > this name is ugly. :) > > Please tell me your opinions about my idea. =C2=A0That will help me a lot= . =C2=A0Thanks. > > Thanks, > Hui > > > > > >