Home
last modified time | relevance | path

Searched refs:hrt (Results 1 – 25 of 42) sorted by relevance

12

/illumos-gate/usr/src/lib/libfakekernel/common/
H A Dclock.c44 hrtime_t hrt; in ddi_get_lbolt() local
46 hrt = gethrtime(); in ddi_get_lbolt()
47 return (hrt / nsec_per_tick); in ddi_get_lbolt()
53 hrtime_t hrt; in ddi_get_lbolt64() local
55 hrt = gethrtime(); in ddi_get_lbolt64()
56 return (hrt / nsec_per_tick); in ddi_get_lbolt64()
94 hrt2ts(hrtime_t hrt, timespec_t *tsp) in hrt2ts() argument
98 tmp = (uint32_t)(hrt >> 30); in hrt2ts()
110 nsec = (uint32_t)hrt - (tmp << 9); in hrt2ts()
122 hrtime_t hrt; in ts2hrt() local
[all …]
/illumos-gate/usr/src/cmd/fm/fmd/common/
H A Dfmd_time.c117 fmd_time_hrt2ftv(hrtime_t hrt, fmd_timeval_t *ftv) in fmd_time_hrt2ftv() argument
121 tmp = (uint32_t)(hrt >> 30); in fmd_time_hrt2ftv()
133 nsec = (uint32_t)hrt - (tmp << 9); in fmd_time_hrt2ftv()
152 hrtime_t hrt, fmd_timeval_t *ftv) in fmd_time_hrt2tod()
155 tod_base->ftv_nsec + (hrt - hrt_base), ftv); in fmd_time_hrt2tod()
192 fmd_time_ena2hrt(hrtime_t hrt, uint64_t ena) in fmd_time_ena2hrt() argument
200 if (((hrt - t0) & ((mask + 1) >> 1)) == 0) in fmd_time_ena2hrt()
201 hrt -= (hrt - t0) & mask; in fmd_time_ena2hrt()
206 if (((hrt - t0) & ((mask + 1) >> 1)) == 0) in fmd_time_ena2hrt()
207 hrt -= (hrt - t0) & mask; in fmd_time_ena2hrt()
[all …]
H A Dfmd_sysevent.c105 hrtime_t hrt; in sysev_legacy() local
136 sysevent_get_time(sep, &hrt); in sysev_legacy()
137 fmd_xprt_post(sysev_hdl, sysev_xprt, nvl, hrt); in sysev_legacy()
154 hrtime_t hrt; in sysev_recv() local
185 sysevent_get_time(sep, &hrt); in sysev_recv()
186 fmd_xprt_post(sysev_hdl, xp, nvl, hrt); in sysev_recv()
285 hrtime_t hrt; in sysev_replay() local
359 hrt = ed.ed_hrt_nsec; in sysev_replay()
361 hrt = ed.ed_hrt_base; in sysev_replay()
368 hrt = fmd_time_ena2hrt(hrt, ena); in sysev_replay()
[all …]
H A Dfmd_event.c125 fmd_event_create(uint_t type, hrtime_t hrt, nvlist_t *nvl, void *data) in fmd_event_create() argument
154 if (hrt == FMD_HRT_NOW) in fmd_event_create()
155 hrt = hr0; /* use hrtime sampled by fmd_time_sync() */ in fmd_event_create()
165 hrt = fmd_time_ena2hrt(hrt, ena); in fmd_event_create()
167 fmd_time_hrt2tod(hr0, &tod, hrt, &ep->ev_time); in fmd_event_create()
168 ep->ev_hrt = hrt; in fmd_event_create()
H A Dfmd_timerq.c53 hrtime_t hrt; in fmd_timerq_install() local
74 hrt = INT64_MAX; /* if wrap-around, set timer for apocalypse */ in fmd_timerq_install()
76 hrt = base + delta; in fmd_timerq_install()
78 tp->tmr_hrt = hrt; in fmd_timerq_install()
H A Dfmd_serd.c258 hrtime_t hrt; in fmd_serd_eng_gc() local
264 hrt = fmd_event_hrtime(sep->se_event) - sgp->sg_t; in fmd_serd_eng_gc()
267 if (fmd_event_hrtime(sep->se_event) >= hrt) in fmd_serd_eng_gc()
H A Dfmd_asru.c721 hrtime_t hrt; in fmd_asru_repair_if_aged() local
748 hrt = (hrtime_t)(tv.tv_sec - lp->log_stat.st_mtime); in fmd_asru_repair_if_aged()
750 if (hrt * NANOSEC >= fmd.d_asrus->ah_lifetime) { in fmd_asru_repair_if_aged()
765 hrtime_t hrt; in fmd_asru_check_if_aged() local
776 hrt = (hrtime_t)(tv.tv_sec - lp->log_stat.st_mtime); in fmd_asru_check_if_aged()
778 if (hrt * NANOSEC < fmd.d_asrus->ah_lifetime) in fmd_asru_check_if_aged()
787 uint64_t hrt; in fmd_asru_most_recent() local
795 hrt = lp->log_stat.st_mtime; in fmd_asru_most_recent()
797 if (*(uint64_t *)arg < hrt) in fmd_asru_most_recent()
798 *(uint64_t *)arg = hrt; in fmd_asru_most_recent()
H A Dfmd_subr.c311 hrtime_t hrt = fmd_time_gethrtime(); in fmd_ena() local
315 ((hrt << ENA_FMT1_TIME_SHFT) & ENA_FMT1_TIME_MASK))); in fmd_ena()
/illumos-gate/usr/src/uts/i86pc/os/
H A Dtimestamp.c136 #define TSC_CONVERT_AND_ADD(tsc, hrt, scale) { \ argument
138 (hrt) += mul32(_l[1], scale) << NSEC_SHIFT; \
139 (hrt) += mul32(_l[0], scale) >> (32 - NSEC_SHIFT); \
142 #define TSC_CONVERT(tsc, hrt, scale) { \ argument
144 (hrt) = mul32(_l[1], scale) << NSEC_SHIFT; \
145 (hrt) += mul32(_l[0], scale) >> (32 - NSEC_SHIFT); \
202 hrtime_t tsc, hrt; in tsc_gethrtime() local
242 hrt = tsc_hrtime_base; in tsc_gethrtime()
244 TSC_CONVERT_AND_ADD(tsc, hrt, nsec_scale); in tsc_gethrtime()
247 return (hrt); in tsc_gethrtime()
[all …]
/illumos-gate/usr/src/lib/commpage/common/
H A Dcp_main.c60 #define TSC_CONVERT_AND_ADD(tsc, hrt, scale) do { \ argument
63 (hrt) += (uint64_t)(_l[1] * sc) << NSEC_SHIFT; \
64 (hrt) += (uint64_t)(_l[0] * sc) >> (32 - NSEC_SHIFT); \
75 hrtime_t tsc, hrt, tsc_last; in __cp_gethrtime() local
96 hrt = cp->cp_tsc_hrtime_base; in __cp_gethrtime()
115 TSC_CONVERT_AND_ADD(tsc, hrt, cp->cp_nsec_scale); in __cp_gethrtime()
117 return (hrt); in __cp_gethrtime()
185 hrtime_t hrt; in __cp_clock_gettime_monotonic() local
187 hrt = __cp_gethrtime(cp); in __cp_clock_gettime_monotonic()
188 hrt2ts(hrt, tsp); in __cp_clock_gettime_monotonic()
/illumos-gate/usr/src/uts/common/os/
H A Dtimers.c1174 hrt2ts(hrtime_t hrt, timestruc_t *tsp) in hrt2ts() argument
1181 tsp->tv_sec = hrt / NANOSEC; in hrt2ts()
1182 tsp->tv_nsec = hrt % NANOSEC; in hrt2ts()
1186 tmp = (uint32_t)(hrt >> 30); in hrt2ts()
1198 nsec = (uint32_t)hrt - (tmp << 9); in hrt2ts()
1227 hrtime_t hrt; in ts2hrt()
1229 hrt = tsp->tv_sec; in ts2hrt()
1230 hrt = (hrt << 7) - hrt - hrt - hrt; in ts2hrt()
1231 hrt = (hrt << 7) - hrt - hrt - hrt; in ts2hrt()
1232 hrt = (hrt << 7) - hrt - hrt - hrt; in ts2hrt()
[all …]
H A Dclock_thread.c63 hrtime_t hrt; in clock_thread_usr_gettime() local
67 hrt = lwp->lwp_mstate.ms_acct[LMS_USER]; in clock_thread_usr_gettime()
68 scalehrtime(&hrt); in clock_thread_usr_gettime()
69 hrt2ts(hrt, ts); in clock_thread_usr_gettime()
77 hrtime_t hrt; in clock_thread_usrsys_gettime() local
91 hrt = mstate_thread_onproc_time(t); in clock_thread_usrsys_gettime()
94 hrt2ts(hrt, ts); in clock_thread_usrsys_gettime()
H A Dclock_process.c50 hrtime_t hrt; in clock_process_gettime() local
58 hrt = mstate_aggr_state(p, LMS_USER); in clock_process_gettime()
59 hrt += mstate_aggr_state(p, LMS_SYSTEM); in clock_process_gettime()
62 hrt2ts(hrt, ts); in clock_process_gettime()
/illumos-gate/usr/src/cmd/cpc/common/
H A Dtime.c47 mstimestamp(hrtime_t hrt) in mstimestamp() argument
49 if (hrt == 0) in mstimestamp()
50 hrt = gethrtime(); in mstimestamp()
51 return ((float)(hrt - timebase) / NSECPERSEC); in mstimestamp()
H A Dcputrack.c491 hrtime_t hrt; in pexec() local
504 hrt = cpc_buf_hrtime(cpc, *data1); in pexec()
505 if (hrt == 0) in pexec()
509 if (now < mstimestamp(hrt)) in pexec()
510 now = mstimestamp(hrt); in pexec()
H A Dcpucmds.h45 extern float mstimestamp(hrtime_t hrt);
/illumos-gate/usr/src/lib/libc/port/sys/
H A Dtime_util.c39 hrt2ts(hrtime_t hrt, timespec_t *tsp) in hrt2ts() argument
42 tsp->tv_sec = hrt / NANOSEC; in hrt2ts()
43 tsp->tv_nsec = hrt % NANOSEC; in hrt2ts()
47 tmp = (uint32_t)(hrt >> 30); in hrt2ts()
59 nsec = (uint32_t)hrt - (tmp << 9); in hrt2ts()
/illumos-gate/usr/src/test/os-tests/tests/
H A Dclock_gettime.c197 hrtime_t hrt; in clock_test_thread_clock() local
216 hrt = clock_ts2hrt(&ts); in clock_test_thread_clock()
217 if (arg.cgta_usr > hrt) { in clock_test_thread_clock()
220 thr, hrt, arg.cgta_usr); in clock_test_thread_clock()
229 hrt = clock_ts2hrt(&ts); in clock_test_thread_clock()
230 if (arg.cgta_usr > hrt) { in clock_test_thread_clock()
233 "thread: %lld, main thread: %lld", thr, hrt, arg.cgta_usr); in clock_test_thread_clock()
/illumos-gate/usr/src/cmd/ptools/ptime/
H A Dptime.c52 static void hrt2ts(hrtime_t hrt, timestruc_t *tsp);
306 hrt2ts(hrtime_t hrt, timestruc_t *tsp) in hrt2ts() argument
308 tsp->tv_sec = hrt / NANOSEC; in hrt2ts()
309 tsp->tv_nsec = hrt % NANOSEC; in hrt2ts()
/illumos-gate/usr/src/lib/libumem/common/
H A Dmisc.c164 hrt2ts(hrtime_t hrt, timestruc_t *tsp) in hrt2ts() argument
166 tsp->tv_sec = hrt / NANOSEC; in hrt2ts()
167 tsp->tv_nsec = hrt % NANOSEC; in hrt2ts()
H A Dmisc.h66 void hrt2ts(hrtime_t hrt, timestruc_t *tsp);
/illumos-gate/usr/src/cmd/rcap/common/
H A Dutils.c239 hrt2ts(hrtime_t hrt, timestruc_t *tsp) in hrt2ts() argument
241 tsp->tv_sec = hrt / NANOSEC; in hrt2ts()
242 tsp->tv_nsec = hrt % NANOSEC; in hrt2ts()
/illumos-gate/usr/src/uts/i86pc/io/fipe/
H A Dfipe_pm.c1136 hrtime_t hrt; in fipe_kstat_update() local
1146 hrt = fipe_gbl_ctrl.time_in_pm; in fipe_kstat_update()
1147 scalehrtime(&hrt); in fipe_kstat_update()
1148 sp->fipe_pm_time.value.ui64 = (uint64_t)hrt; in fipe_kstat_update()
1167 hrtime_t hrt; in fipe_init() local
1188 hrt = 1ULL << 36; in fipe_init()
1189 scalehrtime(&hrt); in fipe_init()
1190 fipe_idle_ctrl.tick_interval = FIPE_STAT_INTERVAL * (1ULL << 36) / hrt; in fipe_init()
/illumos-gate/usr/src/uts/common/fs/smbsrv/
H A Dsmb2_durable.c508 hrtime_t hrt; in smb2_dh_import_handle() local
814 if (nvlist_lookup_hrtime(nvl, "atime", &hrt) == 0) { in smb2_dh_import_handle()
815 hrt2ts(hrt, &pa->sa_vattr.va_atime); in smb2_dh_import_handle()
818 if (nvlist_lookup_hrtime(nvl, "mtime", &hrt) == 0) { in smb2_dh_import_handle()
819 hrt2ts(hrt, &pa->sa_vattr.va_mtime); in smb2_dh_import_handle()
822 if (nvlist_lookup_hrtime(nvl, "ctime", &hrt) == 0) { in smb2_dh_import_handle()
823 hrt2ts(hrt, &pa->sa_vattr.va_ctime); in smb2_dh_import_handle()
/illumos-gate/usr/src/cmd/mdb/i86pc/modules/unix/
H A Dunix.c810 hrtime_t tsc = addr, hrt, tsc_last, base, mult = 1; in scalehrtime_dcmd() local
893 hrt = ((uint64_t)tscp[1] * scale) << NSEC_SHIFT; in scalehrtime_dcmd()
894 hrt += ((uint64_t)tscp[0] * scale) >> (32 - NSEC_SHIFT); in scalehrtime_dcmd()
896 mdb_printf("0x%llx\n", base + (hrt * mult)); in scalehrtime_dcmd()

12