From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23991 invoked by alias); 19 Apr 2011 11:07:46 -0000 Received: (qmail 23974 invoked by uid 22791); 19 Apr 2011 11:07:45 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from hermes.mlbassoc.com (HELO mail.chez-thomas.org) (64.234.241.98) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 19 Apr 2011 11:07:31 +0000 Received: by mail.chez-thomas.org (Postfix, from userid 999) id 3A9EF16602F4; Tue, 19 Apr 2011 05:07:29 -0600 (MDT) Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by mail.chez-thomas.org (Postfix) with ESMTP id 8F9E0166026E; Tue, 19 Apr 2011 05:07:29 -0600 (MDT) Message-ID: <4DAD6CF1.4040403@mlbassoc.com> Date: Tue, 19 Apr 2011 11:07:00 -0000 From: Gary Thomas User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc13 Thunderbird/3.1.7 MIME-Version: 1.0 To: moktar_bouain CC: ecos-discuss@ecos.sourceware.org References: <31407684.post@talk.nabble.com> <31428080.post@talk.nabble.com> <4DACC019.50209@mlbassoc.com> <31428511.post@talk.nabble.com> In-Reply-To: <31428511.post@talk.nabble.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] measure the execution time of each thread X-SW-Source: 2011-04/txt/msg00077.txt.bz2 On 04/18/2011 05:32 PM, moktar_bouain wrote: > > >> Note that this technique is only accurate to the system tick time >> which is normally 10ms. If your thread runs for less time than this, >> you won't know. > >> Look at the test program tm_basic.cxx for details on how to measure >> at a finer grain (without the overhead of decreasing the tick time). > > I use eCos for Sparc (Leon3 processor) with a 66 MHz. > Means that the clock tick corresponds to 1.5×10-5ms(15ns). > is it possible to measure the execution time of a thread?? That's not the "clock tick" that those functions are using, but the hardware instruction clock. The system clock is a periodic timer, used to measure time, that normally runs at 100Hz -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss