shri
2008-Apr-18 23:50 UTC
[zfs-discuss] how to measure in kernel how much time one operation takes
what call to be used in kernel to measure time taken for a operation if time quantum i s smaller than tick(frequency). i tried using ddi_get_lbolt at time t1 and t2.(at time t1 operation started and t2 it finished) but it always gives me zero(t2-t1). This message posted from opensolaris.org
Richard Elling
2008-Apr-19 17:23 UTC
[zfs-discuss] how to measure in kernel how much time one operation takes
shri wrote:> what call to be used in kernel to measure time taken for a operation if time quantum i s smaller than tick(frequency). > i tried using ddi_get_lbolt at time t1 and t2.(at time t1 operation started and t2 it finished) but it always gives me zero(t2-t1). > >Try get hi-res time, gethrtime() http://docs.sun.com/app/docs/doc/816-5180/gethrtime-9f?a=view -- richard
Henry Pepper
2008-Apr-22 07:43 UTC
[zfs-discuss] how to measure in kernel how much time one operation takes
could you perhaps use dtrace? I think it is a nanoseconds time you have there. Henry On Sat, Apr 19, 2008 at 1:50 AM, shri <agshriram at yahoo.com> wrote:> what call to be used in kernel to measure time taken for a operation if > time quantum i s smaller than tick(frequency). > i tried using ddi_get_lbolt at time t1 and t2.(at time t1 operation > started and t2 it finished) but it always gives me zero(t2-t1). > > > This message posted from opensolaris.org > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20080422/12bfecb1/attachment.html>