Project

General

Profile

Bug #11585

::scalehrtime could be more precise

Added by John Levon about 1 month ago. Updated 22 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

http://smartos.org/bugview/OS-6735

Work by Bryan Cantrill.

Original comment by Bryan says:

For quite some time, we've had the ::scalehrtime dcmd (see OS-770). However, this is imprecise with respect to large values (e.g., TSC reads) because it doesn't follow the same algorithm as the kernel (which only converts values less than the tsc_tick interval). ::scalehrtime should mimic this, using a delta against tsc_last if the value to convert is closer to tsc_last than it is to 0.

History

#1

Updated by John Levon 23 days ago

I did some basic testing of this dcmd without options, and including the new options.

#2

Updated by Electric Monk 22 days ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit adabf61274801f4e57bf88d159c75b1993eeaf3c

commit  adabf61274801f4e57bf88d159c75b1993eeaf3c
Author: Bryan Cantrill <bryan@joyent.com>
Date:   2019-08-30T10:01:09.000Z

    11585 ::scalehrtime could be more precise
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF