diff options
author | jhb <jhb@FreeBSD.org> | 2006-03-07 22:12:09 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-03-07 22:12:09 +0000 |
commit | 13d9bffa825005efe48317fcc02c663f2bbd263c (patch) | |
tree | b21aa5fb171ca86832d883d893bcfd9f58587633 /sys/alpha/include | |
parent | 59bd3cfe60b44d5bde9042b768e1642116a4946e (diff) | |
download | FreeBSD-src-13d9bffa825005efe48317fcc02c663f2bbd263c.zip FreeBSD-src-13d9bffa825005efe48317fcc02c663f2bbd263c.tar.gz |
Use the Alpha PCC as a cpu ticker for process runtime accounting. This is
slightly more tricky than on x86 as although the PCC is 64-bits, it is not
a simple 64-bit counter like the TSC. Instead, the upper 32-bits have
PAL-defined behavior and the lower 32-bits run as a free-running 32-bit
counter. To handle this, we detect overflows by maintaining a small amount
of per-cpu state and use this to simulate the upper 32-bits of the counter
providing a full 64-bit counter to the consumers of cpu_ticks().
Diffstat (limited to 'sys/alpha/include')
-rw-r--r-- | sys/alpha/include/pcpu.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/alpha/include/pcpu.h b/sys/alpha/include/pcpu.h index 660839a..eb04362 100644 --- a/sys/alpha/include/pcpu.h +++ b/sys/alpha/include/pcpu.h @@ -38,7 +38,9 @@ u_int64_t pc_idlepcbphys; /* pa of pc_idlepcb */ \ u_int64_t pc_pending_ipis; /* pending IPI's */ \ u_int32_t pc_next_asn; /* next ASN to alloc */ \ - u_int32_t pc_current_asngen /* ASN rollover check */ + u_int32_t pc_current_asngen; /* ASN rollover check */ \ + u_int32_t pc_last_pcc_cnt; /* Previous PCC_CNT value */ \ + u_int32_t pc_pcc_base /* Hi word of cycle count. */ struct pcpu; |