Related articles |
---|
Efficient Execution Time Profiling ? thomasf+@cs.cmu.edu (1992-04-29) |
Re: Efficient Execution Time Profiling ? pardo@cs.washington.edu (1992-04-30) |
Re: Efficient Execution Time Profiling ? grunwald@foobar.cs.colorado.edu (1992-05-08) |
Re: Efficient Execution Time Profiling ? grunwald@foobar.cs.colorado.edu (1992-05-09) |
Re: Efficient Execution Time Profiling ? grunwald@foobar.cs.colorado.edu (1992-05-11) |
Newsgroups: | comp.compilers,comp.arch |
From: | grunwald@foobar.cs.colorado.edu |
Keywords: | sparc, experiment |
Organization: | University of Colorado at Boulder |
References: | 92-04-156 92-05-041 |
Date: | Sat, 9 May 1992 15:06:40 GMT |
This might be of interest to a number of people. Sparcstations have two
hardware timers. One is used for the interrupt clock to keep the
time-of-day counter accurate. The other was/is unused.
Van Jacobson modified SunOS4.0 to use the second clock as microsecond
timer. The gettimeofday call now returns that clock in the microsecond
field. Those changes were incorperated into SunOS4.1.
Thus, according to Van..
> We just modified the gettimeofday system call handler so it
> returned a microsecond-resolution timeval (by adding the
> hardware usec counter to the system's 10ms tick counter). We
> made the mods to Sun OS 4.0 & sent them to Sun who incorporated
> them in Sun OS 4.1. So, as long as you're running Sun OS 4.1 or
> later, just call gettimeofday. (You need to correct for the
> 40usec or so of offset introduced by the syscall but that's
> constant so the correction is trivial.)
We were originally going to try to map that clock into user space via
mmap, but it appears to not be necessary.
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.