From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4F4E630C.8020301@domain.hid> Date: Wed, 29 Feb 2012 18:40:28 +0100 From: Gilles Chanteperdrix MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai-help] Execution time profiling List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Charles Lesire-Cabaniols Cc: xenomai@xenomai.org On 02/29/2012 06:29 PM, Charles Lesire-Cabaniols wrote: > Hi guys, > > I have installed a Debian+Xenomai (2.6.0) OS on my Gumstix Overo. > > I want to evaluate the execution time of a simple program, executed as a > real-time thread. > > I definitely wonder about which functions to use, as I have completely > inconsistent measures. > I have tried using rt_timer_read, rt_timer_tsc, clock_gettime. > I also directly read the CNNT register with ARM instructions (which is the > only one I think correct) in order to have a (good?) reference. > (...) > What am I doing wrong? So, you should printf("%Lu %Lu\n", rt_timer_read(), rt_timer_tsc()); Not printf("%lu", ...) -- Gilles.