j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: wmb Date: 2007-07-23 21:32:55 +0200 (Mon, 23 Jul 2007) New Revision: 486
Modified: cpu/x86/tsc.fth Log: x86 timing-measurement: Made t( and )t store the starting timestamp in a variable instead of on the stack, so you can now measure code sequences that change the stack depth.
Modified: cpu/x86/tsc.fth =================================================================== --- cpu/x86/tsc.fth 2007-07-23 19:30:35 UTC (rev 485) +++ cpu/x86/tsc.fth 2007-07-23 19:32:55 UTC (rev 486) @@ -39,11 +39,12 @@ ' (ms) to ms
\ Timing tools -: t( ( -- d.timestamp ) tsc@ ; -: )t ( d.timestamp -- ) - tsc@ 2swap d- d# 367 um/mod nip ( microseconds ) +2variable timestamp +: t( ( -- ) tsc@ timestamp 2! ; +: )t ( -- ) + tsc@ timestamp 2@ d- d# 367 um/mod nip ( microseconds ) push-decimal - <# u# u# u# [char] , hold u# u#s u#> type ." usec" + <# u# u# u# [char] , hold u# u#s u#> type ." uS " pop-base ;