From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17195 invoked by alias); 16 May 2005 04:20:34 -0000 Mailing-List: contact rda-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: rda-owner@sources.redhat.com Received: (qmail 16691 invoked from network); 16 May 2005 04:19:28 -0000 Received: from unknown (HELO wproxy.gmail.com) (64.233.184.194) by sourceware.org with SMTP; 16 May 2005 04:19:28 -0000 Received: by wproxy.gmail.com with SMTP id 69so1473189wra for ; Sun, 15 May 2005 21:19:28 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=IjHqlB+esrqbcRmMEeQp0pSpZ7Kr1w3AFTe41nA6WMqkUJx/4+wvD1blZblTBdZmbz0ZahpfQXGLvYkLCv3JUTFiFIpOMBFZljGKZ5nRVxLFbsNk3S23pbh8PTwt6CqN76NxD5+/34LkWVk7V2KevKmwSjNNr3XpQdVTA62ZEk4= Received: by 10.54.23.10 with SMTP id 10mr3416128wrw; Sun, 15 May 2005 21:19:28 -0700 (PDT) Received: by 10.54.69.8 with HTTP; Sun, 15 May 2005 21:19:27 -0700 (PDT) Message-ID: <18aafe4c050515211977e492a@mail.gmail.com> Date: Mon, 16 May 2005 04:20:00 -0000 From: Vinu Dev Reply-To: Vinu Dev To: rda@sources.redhat.com, jimb@redhat.com Subject: Re: Help required on rda [FRV] In-Reply-To: <18aafe4c05042803374d2b517b@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <18aafe4c05040603574ebfbd61@mail.gmail.com> <18aafe4c05040622017bc4ed22@mail.gmail.com> <18aafe4c05042803374d2b517b@mail.gmail.com> X-SW-Source: 2005-q2/txt/msg00004.txt.bz2 Dear Jimb, Sorry for my late reply,as per ur advice i checked for ptrace traffic during those 4-5 seconds,It looks like large quantity of PTRACE_PEEKTEXT-1 is issued to target program from rda,i tried recording those ptrace traffic,here is the sample of it=20 ************************************************************************ < -- failed, thread_agent =3D 0x00000000> < -- failed, thread_agent =3D 0x00000000> < -- failed, thread_agent =3D 0x00000000> < -- failed, thread_agent =3D 0x00000000> < -- failed, thread_agent =3D 0x00000000> < -- failed, thread_agent =3D 0x00000000> < -- failed, thread_agent =3D 0x00000000> PTRACE_PEEKTEXT-1 0x02200690 in 266, 0x2a881000 PTRACE_POKETEXT 0x02200690 in 266, 0xffffffffc0700001 wait returned 'T' (5) for 266. PTRACE_GETFDPIC pid=3D266 offset=3D0 val=3D21ffcb0 PTRACE_GETFDPIC pid=3D266 offset=3D1 val=3D21ffca0 PTRACE_POKETEXT 0x02200690 in 266, 0x2a881000 PTRACE_PEEKTEXT-1 0x02204fe8 in 266, 0x00025068 PTRACE_PEEKTEXT-1 0x00025068 in 266, 0x021ffcb0 PTRACE_PEEKTEXT-1 0x0002506c in 266, 0x02204fe0 PTRACE_PEEKTEXT-1 0x00025070 in 266, 0x0001ee24 PTRACE_PEEKTEXT-1 0x00025074 in 266, 0x02204ebc PTRACE_PEEKTEXT-1 0x00025078 in 266, 0x00025548 PTRACE_PEEKTEXT-1 0x0002507c in 266, 0x00000000 PTRACE_PEEKTEXT-1 0x00025548 in 266, 0x000257a0 PTRACE_PEEKTEXT-1 0x0002554c in 266, 0x0003cb60 PTRACE_PEEKTEXT-1 0x00025550 in 266, 0x00025530 PTRACE_PEEKTEXT-1 0x00025554 in 266, 0x0003c478 PTRACE_PEEKTEXT-1 0x00025558 in 266, 0x000257c0 PTRACE_PEEKTEXT-1 0x0002555c in 266, 0x00025068 PTRACE_PEEKTEXT-1 0x000257a0 in 266, 0x00000001 PTRACE_PEEKTEXT-1 0x000257a4 in 266, 0x00028000 PTRACE_PEEKTEXT-1 0x000257a8 in 266, 0x00000000 PTRACE_PEEKTEXT-1 0x000257ac in 266, 0x00056d20 PTRACE_PEEKTEXT-1 0x00025530 in 266, 0x2f6c6962 =2E =2E =2E =2E PTRACE_PEEKTEXT-1 0x000148dc in 266, 0xffffffff80880000 < -- failed, thread_agent =3D 0x00000000> < -- failed, thread_agent =3D 0x00000000> PTRACE_PEEKTEXT-1 0x0003783c in 266, 0x322e332e PTRACE_PEEKTEXT-1 0x00037840 in 266, 0x332d6672 PTRACE_PEEKTEXT-1 0x00037844 in 266, 0x762d3034 PTRACE_PEEKTEXT-1 0x00037848 in 266, 0x30383230 PTRACE_PEEKTEXT-1 0x0003784c in 266, 0x2d330000 < -- failed, thread_agent =3D 0x0221e3f8> PTRACE_PEEKTEXT-1 0x0003783c in 266, 0x322e332e PTRACE_PEEKTEXT-1 0x00037840 in 266, 0x332d6672 PTRACE_PEEKTEXT-1 0x00037844 in 266, 0x762d3034 PTRACE_PEEKTEXT-1 0x00037848 in 266, 0x30383230 PTRACE_PEEKTEXT-1 0x0003784c in 266, 0x2d330000 < -- failed, thread_agent =3D 0x0221e3f8> PTRACE_PEEKTEXT-1 0x0003783c in 266, 0x322e332e ***************************************************************************= ********************* PTRACE_PEEKTEXT-1 is used by rda to get information from target program. It read 4byte(unsigned long) data in each time.Now i suspect this is reason why we are having the delay in debugging thread. Can u pls help me as=20 1) Who issues these PTRACE_PEEKTEXT-1. 2) What cause this (why a large quantity of PTRACE_PEEKTEXT-1 issued to target program from rda) Regards Vinu On 4/28/05, Vinu Dev wrote: > ---------- Forwarded message ---------- > From: Jim Blandy > Date: 27 Apr 2005 03:45:03 -0500 > Subject: Re: Help required on rda [FRV] > To: Vinu Dev > Cc: rda@sources.redhat.com >=20 > Vinu Dev writes: > > Dear JimB, > > Thanks for your reply,iam using LinuxThreads,its my requirement to > > use linuxthreads. > > Even i was surprised by the delay factor,is there any other way to > > measure the thread creation time more precise than using > > gettimeofday() system call,if u could advice me on this,i would be > > very much thankfull to you. > > The delay is around 4-5 secs for each thread creation via rda. > > Is there any article or technical documents or could u guide me to > > know the cause for this delay? >=20 > 4-5 seconds sounds about right. If I remember correctly, it's due to > libthread_db's need to read huge amounts of memory from the program > being debugged each time it stops. >=20 > Take a look at rda/unix/linux-target.c:linux_process_rcmd. That's the > function that gets called when you give GDB the "monitor" command. So >=20 > (gdb) monitor 1 >=20 > (I think) should turn on debugging output in RDA, and >=20 > (gdb) monitor 0 >=20 > should turn it off. If you'd like to be able to do other things to > RDA, you can add more stuff to linux_process_rcmd. >=20 > In any case, after 'monitor 1', RDA will print messages describing > all the ptrace calls it makes. If I'm right, you'll see a *lot* of > ptrace traffic during those 4-5 seconds. >=20 > You might also try changing the initialization of thread_db_noisy to > 1, to see more of what thread_db.c is doing. >=20 > Good luck! >=20 > -- > Regards, > Vinay >=20 --=20 Regards, Vinay