From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21841 invoked by alias); 27 Apr 2005 08:47:19 -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 21746 invoked from network); 27 Apr 2005 08:47:06 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 27 Apr 2005 08:47:06 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j3R8l64t006241 for ; Wed, 27 Apr 2005 04:47:06 -0400 Received: from zenia.home.redhat.com (sebastian-int.corp.redhat.com [172.16.52.221]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j3R8l0O15980; Wed, 27 Apr 2005 04:47:00 -0400 To: Vinu Dev Cc: rda@sources.redhat.com Subject: Re: Help required on rda [FRV] References: <18aafe4c05040603574ebfbd61@mail.gmail.com> <18aafe4c05040622017bc4ed22@mail.gmail.com> From: Jim Blandy Date: Wed, 27 Apr 2005 08:47:00 -0000 In-Reply-To: <18aafe4c05040622017bc4ed22@mail.gmail.com> Message-ID: User-Agent: Gnus/5.090 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-q2/txt/msg00003.txt.bz2 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? 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. 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 (gdb) monitor 1 (I think) should turn on debugging output in RDA, and (gdb) monitor 0 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. 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. You might also try changing the initialization of thread_db_noisy to 1, to see more of what thread_db.c is doing. Good luck!