From: rf@cl.cam.ac.uk (Robin Fairbairns)
Subject: Re: ALPHA Chipset Register
Date: 1995/07/17 [thread overview]
Message-ID: <3udd4u$2qh@lyra.csx.cam.ac.uk> (raw)
In-Reply-To: DBD3I8.8s3@nntpa.cb.att.com
In article <DBD3I8.8s3@nntpa.cb.att.com>,
Alan Curtis x4749 <alan@cbncp5.cb.att.com> wrote:
>I've come accross the "rpcc" instruction which claims
>to read the "Process Cycle Counter". Does anyone know
>if this is just counting the XXX Mhz clock, or machine cycles,
>or instructions, or ????
It counts processor cycles.
>I've read it many times and am not convinced I can make heads
>or tails of it on any consistent basis. Yes, one of my big
>problems is that I am on a multi-CPU system, but I think I'm
>working my way out of that hole...
The PALcode (or all PALcode I've looked at) sets the counter offset
when going into a process's context so that the instructions quoted in
Sites' architecture manual give you something that's pretty much
monotonic increasing and related to the number of cycles your process
has executed. There are going to be problems when the processor speed
increases to the extent that a typical timeslice occupies >2**32
cycles <g>
This PALcode will obviate the effects arising from multiple processors
in the same system; I can imagine much excitement if there were
processors with different speeds on the same bus, though.
>alan "I just gotta get the manual soon" curtis
Do. It's a laugh a minute.
The code in Sites' manual is
rpcc r0
sll r0, #32, r1
addq r0, r1, r0
srl r0, #32, r0
which leaves you with a 32-bit unsigned number in r0
--
Robin (Campaign for Real Radio 3) Fairbairns rf@cl.cam.ac.uk
U of Cambridge Computer Lab, Pembroke St, Cambridge CB2 3QG, UK
<a href="http://www.cl.cam.ac.uk/users/rf/robin.html">Private page</a>
prev parent reply other threads:[~1995-07-17 4:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-07-07 4:00 ALPHA Chipset Register Alan Curtis x4749
1995-07-08 4:00 ` John L. Henning
1995-07-17 4:00 ` Robin Fairbairns [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox