Brendan,
Thanks for looking at this problem. I think that your proposals are good ones.
If it does not add to much overhead, then I think that it would also be good
to report the 'total unaccounted time'.
The way I was thinking of finding this is as follows:-
Pass total number of CPUs to the dtrace part as a parameter from the
shell land part (should be easy enough to get this in a shell without much
cost). And then add the following bits to the dtrace part...
inline int OPT_numberofcpus = '$opt_numberofcpus'
BEGIN
{
.... as it is plus ....
uatimestamp = timestamp; /* start of unaccounted time */
uatime = 0;
}
Add a new probe ...
on-cpu
remain-cpu
/seen[cpu]==0/
{
seen_cpus++;
uatime += timestamp - uatimestamp;
seen[cpu]=1;
}
Modify existing probe...
profile:::tick-1sec
/secs==0/
{
... as it is plus ....
uatime += (timestamp - uatimestamp) * ($OPT_numberofcpus - seen_cpus);
uatimestamp = timestamp;
print uatime
uatime = 0;
}
--
This message posted from opensolaris.org
_______________________________________________
dtrace-discuss mailing list
[email protected]