| Title: | DIGITAL UNIX (FORMERLY KNOWN AS DEC OSF/1) |
| Notice: | Welcome to the Digital UNIX Conference |
| Moderator: | SMURF::DENHAM |
| Created: | Thu Mar 16 1995 |
| Last Modified: | Fri Jun 06 1997 |
| Last Successful Update: | Fri Jun 06 1997 |
| Number of topics: | 10068 |
| Total number of notes: | 35879 |
We're working with a customer to move them
from SGI to Digital UNIX systems. He's
attempting to implement a code that requires him
to determine the number of clock cycles during
a particular stage of code execution. Under
IRIX, he would invoke SYSTEM_CLOCK, which
returns an integer value. Under
Digital UNIX he's returned a null value.
Is there such a routine for DU?
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 9513.1 | Run the RPCC instruction | SMURF::JPW | John P Williams, DUDE, USG, 381-2079 | Wed Apr 16 1997 08:02 | 16 |
From a C program:
main()
{
unsigned long cc1, cc2;
cc1 = asm("rpcc");
... /* sequence to be timed */
cc2 = asm("rpcc");
}
Don't try this in a program compiled -pthread.
See the Alpha SRM for info on how to interpret
the two halves of the cycle counter quadword.
| |||||
| 9513.2 | Ain't the process(or) cycle counter wonderful?... | WTFN::SCALES | Despair is appropriate and inevitable. | Wed Apr 16 1997 15:11 | 9 |
.1> Don't try this in a program compiled -pthread. Actually, it depends on what you're timing. If you're doing in-process counting, then yes, don't bother trying this with a threaded program on V4.0x. However, if you're doing system timing, then it should work fine with threads (but not on a multiprocessor... :-). Webb | |||||