Displaying 3 results from an estimated 3 matches for "hrtime_t".
Did you mean:
__time_t
2007 Feb 21
6
CPU stats problem
...oblem. I?m trying to poll the cpu_t.cpu_acct[] array to pull idle, system and user values.
So, I made this little script:
------------------------------------------------------------------------------------------------------
#!/usr/sbin/dtrace -s
#pragma D option quiet
this uint64_t start;
this hrtime_t timeidle;
this hrtime_t timeuser;
this hrtime_t timesystem;
this hrtime_t timewait;
this int in;
dtrace:::BEGIN
{
this -> start = timestamp;
this -> timeidle = 0;
this -> timeuser = 0;
this -> timesystem = 0;
this -> timewait = 0;
this -> in = 0;
}
sched:::on-cpu
{
this -...
2010 May 04
2
sched provider
Hi All,
I used the following script from the dtrace manual to measure how long a particular process runs on the cpu. Modified it to look at the exact timestamps:
[i]
sched:::on-cpu
{
self->ts = timestamp;
printf("on=%d\n", self->ts)
}
sched:::off-cpu
/self->ts/
{
printf("off=%d\n", timestamp)
self->ts = 0;
}
[/i]
The output looks like this:
[i]on=24591
off=24603
2008 Jun 18
1
snv_81 domU: long delay during boot when dom0 has been up for a long time
...laris-domu rootnex: [ID 349649 kern.notice] xpvd0 at root
Jun 18 19:56:46 solaris-domu xpvd: [ID 395608 kern.notice] xdf@0, xdf0
Problem appears to be in cyclic_timer:
571 void
572 cyclic_timer(void)
573 {
574 tm_req_t *req;
575 timer_tw_t *tw;
576 hrtime_t curr_tick, curr;
577
578 /* If the system is suspended, just return */
579 if (timer_suspended)
580 return;
581
582 /* Get the current time */
583 timer_hrtime = ddi_timer->tick_time = curr = gethrtime();
gethrtime return...