lkml.org 
[lkml]   [1998]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: interrupt latency
On Wed, Aug 12, 1998 at 09:30:31AM +1200, Chris Wedgwood wrote:
> Actually... might just go and code something like that now. If
> anybody knows the equivalent of `rdtsc' for the Alpha and Sparc I'd
> really like to know that.

Alpha:

unsigned int x;
asm volatile ("rpcc %0" : "=r"(x));

Yes, the (active) part of the counter is only 32-bit wide. Yes that
does mean overflow in 8.1 seconds on a 500Mhz box. This traded for
the ability to get virtual cycle counts:

unsigned long x;
asm volatile ("rpcc %0" : "=r"(x));
x = (unsigned int)x + (unsigned int)(x >> 32);

I'm not sure it was worth it, personally.

UltraSparc:

unsigned long x;
asm volatile ("rd %tick, %0" : "=r"(x));

Earlier Sparcs do not have this feature.


r~

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

\
 
 \ /
  Last update: 2005-03-22 13:44    [W:0.052 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site