|Efficient Execution Time Profiling ? firstname.lastname@example.org (1992-04-29)|
|Re: Efficient Execution Time Profiling ? email@example.com (1992-04-30)|
|Re: Efficient Execution Time Profiling ? firstname.lastname@example.org (1992-05-08)|
|Re: Efficient Execution Time Profiling ? email@example.com (1992-05-09)|
|Re: Efficient Execution Time Profiling ? firstname.lastname@example.org (1992-05-11)|
|Organization:||University of Colorado at Boulder|
|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
Search the comp.compilers archives again.