Re: dtrace walltimestamp
Fabian Keil freebsd-lis...@fabiankeil.de wrote: At least on my system, timestamp offsets can only can be relied on with either kern.timecounter.hardware=TSC or with C3 states disabled, though. Measuring the elapsed time (in ms) between events that happen in roughly 1 second intervals with kern.timecounter.hardware=HPET and dev.cpu.0.cx_lowest=C2: elapsed value - Distribution - count 990 | 0 1000 |@@@ 57 1010 | 0 1020 | 0 1030 |@1 1040 | 0 elapsed avg1007 And doing the same with dev.cpu.0.cx_lowest=C3: elapsed value - Distribution - count 40 | 0 50 |@@@ 28 60 |@@@ 10 70 |@@@ 5 80 |@1 90 | 0 100 |@2 110 |@2 120 |@2 130 | 0 140 |@1 150 |@1 160 |@1 170 |@1 180 | 0 190 | 0 200 | 0 210 | 0 220 |@1 230 |@1 240 | 0 250 | 0 260 | 0 270 | 0 280 | 0 290 |@1 300 |@1 310 | 0 320 |@1 330 | 0 elapsed avg 90 Copying over some code from mips seems to fix this: http://www.freebsd.org/cgi/query-pr.cgi?pr=amd64/169379 Fabian signature.asc Description: PGP signature
Re: dtrace walltimestamp
On Sun, Aug 21, 2011 at 7:05 AM, Fabian Keil freebsd-lis...@fabiankeil.de wrote: Ashley Williams ashley@gmail.com wrote: walltimestamp and timestamp don't appear to be right in BETA-1: # dtrace -qn 'syscall::exec*:return { printf(%Y %s\n,walltimestamp,curpsinfo-pr_psargs); }' 1970 Jan 1 10:00:00 date 1970 Jan 1 10:00:00 ping 1970 Jan 1 10:00:00 ls I can reproduce this on amd64 with a recent HEAD, walltimestamp is always 0, which together with the dmesg warnings seems to indicate that it's not supported (yet). Bug report has been filed - thanks for testing. PR - 159612 for those interested. # dtrace -qn 'syscall::exec*:return { printf(%Y %s\n,timestamp,curpsinfo-pr_psargs); }' 1970 Jan 6 12:02:27 ping 1970 Jan 6 12:02:29 ls 1970 Jan 6 12:02:31 dtrace Note that the timestamp value is relative to the time the system is booted (I think), and not to midnight, January 1, 1970. Assuming your system has been running for a few days and the offsets are right as well, the output seems fine. Thanks for that - I did some testing on Solaris 11 and it's evident I have misunderstood the usage of the timestamp function. The output above, as you said, is definitely correct. ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: dtrace walltimestamp
Ashley Williams ashley@gmail.com wrote: walltimestamp and timestamp don't appear to be right in BETA-1: # dtrace -qn 'syscall::exec*:return { printf(%Y %s\n,walltimestamp,curpsinfo-pr_psargs); }' 1970 Jan 1 10:00:00 date 1970 Jan 1 10:00:00 ping 1970 Jan 1 10:00:00 ls I can reproduce this on amd64 with a recent HEAD, walltimestamp is always 0, which together with the dmesg warnings seems to indicate that it's not supported (yet). # dtrace -qn 'syscall::exec*:return { printf(%Y %s\n,timestamp,curpsinfo-pr_psargs); }' 1970 Jan 6 12:02:27 ping 1970 Jan 6 12:02:29 ls 1970 Jan 6 12:02:31 dtrace Note that the timestamp value is relative to the time the system is booted (I think), and not to midnight, January 1, 1970. Assuming your system has been running for a few days and the offsets are right as well, the output seems fine. At least on my system, timestamp offsets can only can be relied on with either kern.timecounter.hardware=TSC or with C3 states disabled, though. Measuring the elapsed time (in ms) between events that happen in roughly 1 second intervals with kern.timecounter.hardware=HPET and dev.cpu.0.cx_lowest=C2: elapsed value - Distribution - count 990 | 0 1000 |@@@ 57 1010 | 0 1020 | 0 1030 |@1 1040 | 0 elapsed avg1007 And doing the same with dev.cpu.0.cx_lowest=C3: elapsed value - Distribution - count 40 | 0 50 |@@@ 28 60 |@@@ 10 70 |@@@ 5 80 |@1 90 | 0 100 |@2 110 |@2 120 |@2 130 | 0 140 |@1 150 |@1 160 |@1 170 |@1 180 | 0 190 | 0 200 | 0 210 | 0 220 |@1 230 |@1 240 | 0 250 | 0 260 | 0 270 | 0 280 | 0 290 |@1 300 |@1 310 | 0 320 |@1 330 | 0 elapsed avg 90 Fabian signature.asc Description: PGP signature
dtrace walltimestamp
walltimestamp and timestamp don't appear to be right in BETA-1: # dtrace -qn 'syscall::exec*:return { printf(%Y %s\n,walltimestamp,curpsinfo-pr_psargs); }' 1970 Jan 1 10:00:00 date 1970 Jan 1 10:00:00 ping 1970 Jan 1 10:00:00 ls # dtrace -qn 'syscall::exec*:return { printf(%Y %s\n,timestamp,curpsinfo-pr_psargs); }' 1970 Jan 6 12:02:27 ping 1970 Jan 6 12:02:29 ls 1970 Jan 6 12:02:31 dtrace dmesg: dtrace_gethrestime(459): XXX dtrace_gethrestime(459): XXX dtrace_gethrestime(459): XXX dtrace_gethrestime(459): XXX dtrace_gethrestime(459): XXX dtrace_gethrestime(459): XXX dtrace_gethrestime(459): XXX # date Sun Aug 7 19:47:02 EST 2011 # uname -a FreeBSD shikai 9.0-BETA1 FreeBSD 9.0-BETA1 #0: Tue Aug 2 09:35:34 EST 2011 ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org