Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Re: Using the Process Cycle Counter (PCC)
  1997-11-08  5:00 Using the Process Cycle Counter (PCC) David Coote
@ 1997-11-08  5:00 ` James Van Buskirk
  0 siblings, 0 replies; 2+ messages in thread
From: James Van Buskirk @ 1997-11-08  5:00 UTC (permalink / raw)



In article <640hjc$or8$2@eplet.mira.net.au>, dccoote@werple.mira.net.au says...

>I was wondering if anyone has used this facility much and, if so, if they have 
>found any traps for young players. One problem is the relatively rapid 
>wrap-around of the lower 32 bits on, say, a 4100 with 466MHz chips. I'd be 
>interested in any other quirks anyone has found.

Aside from the usual admonitions (like time the same sequence a few times,
keep the results in an array, and then do something with the array of times)
it seems to me that rpcc delays completion (not issue) for two cycles after
a st class instruction.  Other than that, it seems to yield cycle-accurate
data.  If you have problems with wrap-around, other timing methods will
give you accepable results because you are timing such long (>8 sec)
intervals.




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Using the Process Cycle Counter (PCC)
@ 1997-11-08  5:00 David Coote
  1997-11-08  5:00 ` James Van Buskirk
  0 siblings, 1 reply; 2+ messages in thread
From: David Coote @ 1997-11-08  5:00 UTC (permalink / raw)



A helpful chap at one of DEC's research labs told me about the PCC on the 
Alpha and how to access it using the rpcc assembler instruction. After 
battling through the references in the Architecture manual etc it appears 
that you can use the PCC to get a latency in cycles between rpcc calls and 
also the number of cycles the calling process/thread has used between calls.

The rpcc call is also much less intrusive than using UNIX system calls such as 
clock(). We've found overheads measured in cycles.

I was wondering if anyone has used this facility much and, if so, if they have 
found any traps for young players. One problem is the relatively rapid 
wrap-around of the lower 32 bits on, say, a 4100 with 466MHz chips. I'd be 
interested in any other quirks anyone has found.

David




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-11-08  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-11-08  5:00 Using the Process Cycle Counter (PCC) David Coote
1997-11-08  5:00 ` James Van Buskirk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox