Project

General

Profile

Actions

Bug #11585

closed

::scalehrtime could be more precise

Added by John Levon about 4 years ago. Updated about 4 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

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.

Actions #1

Updated by John Levon about 4 years ago

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

Actions #2

Updated by Electric Monk about 4 years 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>

Actions

Also available in: Atom PDF