From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,e2622979312942be X-Google-Attributes: gid1164f8,public X-Google-Thread: f678f,e2622979312942be X-Google-Attributes: gidf678f,public From: rf@cl.cam.ac.uk (Robin Fairbairns) Subject: Re: ALPHA Chipset Register Date: 1995/07/17 Message-ID: <3udd4u$2qh@lyra.csx.cam.ac.uk>#1/1 X-Deja-AN: 106331339 distribution: usa references: organization: University of Cambridge Computer Laboratory newsgroups: comp.unix.osf.misc,comp.sys.dec In article , Alan Curtis x4749 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 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 Private page