logo       

Re: How to measure the time ticks taken to execute a system call on IXP425: msg#00071

Subject: Re: How to measure the time ticks taken to execute a system call on IXP425
On Dec 17 2003, at 15:24, Vanitha Ramaswami was caught saying:
> Hi,
> 
> Thanks for your mail.
> I could read the OSTS register from a kernel module
> directly i am reading from the value from the register
> using *(volatile unsigned long) IXP425_OSTS
> 
> But i am not able read the from a user space application
> I am not able to include asm/hardware.h from my user space
> application..
> Is there any way to read from userspace aswell.

Read my original email:

 Just mmap() the register into your process.

Do a man mmap if you've never used mmap before. The file you want
to use is /dev/mem

~Deepak


> 
> Thanks,
> Vanitha
> -----Original Message-----
> From: Deepak Saxena [SMTP:dsaxena@xxxxxxxxxxx]
> Sent: Tuesday, December 16, 2003 9:00 AM
> To:   Vanitha Ramaswami
> Cc:   'linux-arm@xxxxxxxxxxxxxxxxxxxxxx'
> Subject:      Re: How to measure the time ticks taken to execute a system 
> call on IXP425
> 
> On Dec 16 2003, at 08:49, Vanitha Ramaswami was caught saying:
> > Hi All,
> > 
> > I am running embedded linux on IXP425 Coyote Board.
> > I want to measure the time ticks taken to execute a system call.
> > I couldnt find timestamp counter processor register for IXP425.
> > 
> > Is there any call equivalent to rdtsc assembly instruction on IXP425 ?
> 
> You can use the XScale core's Performance Monitoring Unit (PMU)
> to read the number of clock cycles it takes to perform the call.
> It's only accessible in svc mode I believe, so you'd have to
> place the code in the kernel and log the data in a buffer.  
> 
> Another option is to read the OSTS register before and after the
> system call as this counts timer ticks. DO NOT write to this 
> register as the kernel uses it. Just mmap() the register into
> your process.
> 
> Or alternativly, use Linux Trace Toolkit.
> 
> ~Deepak
> 
> -- 
> Deepak Saxena - dsaxena@xxxxxxxxxxx
> 
> 

-- 
Deepak Saxena - dsaxena@xxxxxxxxxxx


-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ/Etiquette:       http://www.arm.linux.org.uk/armlinux/mailinglists.php



<Prev in Thread] Current Thread [Next in Thread>