diff options
author | Robert Mustacchi <rm@joyent.com> | 2014-03-07 18:50:37 +0000 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2014-04-16 14:45:58 -0700 |
commit | 9278ddffeeeafc4766f74c6e2327b83ada62329a (patch) | |
tree | 271aaac6448a977456d877c634e334ec668a5f43 /usr/src | |
parent | 1b497ab83e8f1c58bba5da59c649207a442a4720 (diff) | |
download | illumos-joyent-9278ddffeeeafc4766f74c6e2327b83ada62329a.tar.gz |
4764 Need a way to get tsc deltas
Reviewed by: Keith M Wesolowski <wesolows@foobazco.org>
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/i86pc/os/timestamp.c | 13 | ||||
-rw-r--r-- | usr/src/uts/i86pc/sys/machsystm.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/usr/src/uts/i86pc/os/timestamp.c b/usr/src/uts/i86pc/os/timestamp.c index afd64e9620..5b97d20e52 100644 --- a/usr/src/uts/i86pc/os/timestamp.c +++ b/usr/src/uts/i86pc/os/timestamp.c @@ -236,6 +236,19 @@ tsc_gethrtime_delta(void) return (hrt); } +hrtime_t +tsc_gethrtime_tick_delta(void) +{ + hrtime_t hrt; + ulong_t flags; + + flags = clear_int_flag(); + hrt = tsc_sync_tick_delta[CPU->cpu_id]; + restore_int_flag(flags); + + return (hrt); +} + /* * This is similar to the above, but it cannot actually spin on hres_lock. * As a result, it caches all of the variables it needs; if the variables diff --git a/usr/src/uts/i86pc/sys/machsystm.h b/usr/src/uts/i86pc/sys/machsystm.h index e61f1baa84..10553f9eda 100644 --- a/usr/src/uts/i86pc/sys/machsystm.h +++ b/usr/src/uts/i86pc/sys/machsystm.h @@ -230,6 +230,7 @@ extern uint64_t plat_dr_physmax; extern page_t *page_get_high_mfn(mfn_t); #endif +extern hrtime_t tsc_gethrtime_tick_delta(void); #endif /* _KERNEL */ |