From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1353 invoked by alias); 16 Nov 2007 19:55:36 -0000 Received: (qmail 1345 invoked by uid 22791); 16 Nov 2007 19:55:35 -0000 X-Spam-Check-By: sourceware.org Received: from wa-out-1112.google.com (HELO wa-out-1112.google.com) (209.85.146.176) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 16 Nov 2007 19:55:30 +0000 Received: by wa-out-1112.google.com with SMTP id l24so1241478waf for ; Fri, 16 Nov 2007 11:55:29 -0800 (PST) Received: by 10.115.55.1 with SMTP id h1mr301803wak.1195242928602; Fri, 16 Nov 2007 11:55:28 -0800 (PST) Received: by 10.115.88.19 with HTTP; Fri, 16 Nov 2007 11:55:28 -0800 (PST) Message-ID: <2a3305fe0711161155o72cbb9dfj4a26175dcedf8287@mail.gmail.com> Date: Sat, 17 Nov 2007 07:07:00 -0000 From: "Mike Arthur" To: "C B" Cc: "Gary Thomas" , ecos-discuss@ecos.sourceware.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <472B7580.4080409@mlbassoc.com> <20071114133044.GX4401@lunn.ch> <473B12DF.3020408@mlbassoc.com> <473DDE1B.8000703@mlbassoc.com> X-IsSubscribed: yes 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] Performance timing X-SW-Source: 2007-11/txt/msg00134.txt.bz2 On Nov 16, 2007 1:47 PM, C B wrote: > > System profiling is probably what I need. > > Unfortunately there isn't an implementation of the profiling timer for my target. Any information or guidance available that you're aware of for implementing this? The eCos Reference Manual has this functionality documented: http://ecos.sourceware.org/docs-latest/ref/gprof.html It's pretty straight forward to implement with in your HAL. You'll need a spare hardware timer to use for your instrumentation. Try looking in other HALs that use the profile timer as an example. You need to setup two functions to implement the profile instrumentation: 1.) int hal_enable_profile_timer(int resolution) * Initializes hardware timer and ISR. 2.) unsigned int profile_isr(CYG_ADDRWORD vector, CYG_ADDRWORD data, HAL_SavedRegisters *regs) * Saves current program counter * Handles timer hardware Good luck! Mike -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss