Home
last modified time | relevance | path

Searched refs:hrt (Results 1 – 25 of 39) 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()
53 hrtime_t hrt; in ddi_get_lbolt64() local
55 hrt = gethrtime(); in ddi_get_lbolt64()
122 hrtime_t hrt; in ts2hrt() local
124 hrt = tsp->tv_sec; in ts2hrt()
125 hrt = (hrt << 7) - hrt - hrt - hrt; in ts2hrt()
126 hrt = (hrt << 7) - hrt - hrt - hrt; in ts2hrt()
127 hrt = (hrt << 7) - hrt - hrt - hrt; in ts2hrt()
128 hrt = (hrt << 9) + tsp->tv_nsec; in ts2hrt()
[all …]
/illumos-gate/usr/src/cmd/fm/fmd/common/
H A Dfmd_time.c121 tmp = (uint32_t)(hrt >> 30); in fmd_time_hrt2ftv()
201 hrt -= (hrt - t0) & mask; in fmd_time_ena2hrt()
207 hrt -= (hrt - t0) & mask; in fmd_time_ena2hrt()
211 return (hrt); in fmd_time_ena2hrt()
257 hrtime_t tod, hrt, sec, rem; in fmd_simulator_tod() local
262 hrt = fts->fts_hrt; in fmd_simulator_tod()
279 hrtime_t hrt; in fmd_simulator_hrt() local
282 hrt = fts->fts_hrt; in fmd_simulator_hrt()
285 return (hrt); in fmd_simulator_hrt()
311 uint64_t hrt; in fmd_simulator_wait() local
[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.c55 hrtime_t hrt; in fmd_timerq_install() local
76 hrt = INT64_MAX; /* if wrap-around, set timer for apocalypse */ in fmd_timerq_install()
78 hrt = base + delta; in fmd_timerq_install()
80 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()
H A Dfmd_eventq.c182 hrtime_t hrt = fmd_event_hrtime(ep); in fmd_eventq_insert_at_time() local
213 if (hrt >= fmd_event_hrtime(oqe->eqe_event)) in fmd_eventq_insert_at_time()
/illumos-gate/usr/src/uts/i86pc/os/
H A Dtimestamp.c180 hrtime_t tsc, hrt; in tsc_gethrtime() local
225 return (hrt); in tsc_gethrtime()
232 hrtime_t tsc, hrt; in tsc_gethrtime_delta() local
267 return (hrt); in tsc_gethrtime_delta()
273 hrtime_t hrt; in tsc_gethrtime_tick_delta() local
280 return (hrt); in tsc_gethrtime_tick_delta()
430 return (hrt); in dtrace_gethrtime()
468 hrtime_t hrt; in tsc_scalehrtime() local
476 *tsc = hrt; in tsc_scalehrtime()
482 hrtime_t hrt; in tsc_gethrtimeunscaled_delta() local
[all …]
H A Dintr.c1206 hrtime_t hrt; in cpu_kstat_intrstat_update() local
1212 hrt = (hrtime_t)cpup->cpu_m.intrstat[i + 1][0]; in cpu_kstat_intrstat_update()
1213 scalehrtimef(&hrt); in cpu_kstat_intrstat_update()
1214 knp[i * 2].value.ui64 = (uint64_t)hrt; in cpu_kstat_intrstat_update()
/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.c1181 tsp->tv_sec = hrt / NANOSEC; in hrt2ts()
1186 tmp = (uint32_t)(hrt >> 30); 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()
1233 hrt = (hrt << 9) + tsp->tv_nsec; in ts2hrt()
1234 return (hrt); in ts2hrt()
1246 hrt2ts(hrt, &ts); in hrt2ts32()
[all …]
/illumos-gate/usr/src/cmd/cpc/common/
H A Dtime.c49 mstimestamp(hrtime_t hrt) in mstimestamp() argument
51 if (hrt == 0) in mstimestamp()
52 hrt = gethrtime(); in mstimestamp()
53 return ((float)(hrt - timebase) / NSECPERSEC); in mstimestamp()
H A Dcputrack.c499 hrtime_t hrt; in pexec() local
512 hrt = cpc_buf_hrtime(cpc, *data1); in pexec()
513 if (hrt == 0) in pexec()
517 if (now < mstimestamp(hrt)) in pexec()
518 now = mstimestamp(hrt); in pexec()
H A Dcpucmds.h47 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/compat/bhyve/sys/
H A Dtime.h128 hrtime_t hrt = gethrtime(); in sbinuptime() local
129 uint64_t sec = hrt / NANOSEC; in sbinuptime()
130 uint64_t nsec = hrt % NANOSEC; in sbinuptime()
/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.c448 hrtime_t hrt; in smb2_dh_import_handle() local
754 if (nvlist_lookup_hrtime(nvl, "atime", &hrt) == 0) { in smb2_dh_import_handle()
755 hrt2ts(hrt, &pa->sa_vattr.va_atime); in smb2_dh_import_handle()
758 if (nvlist_lookup_hrtime(nvl, "mtime", &hrt) == 0) { in smb2_dh_import_handle()
759 hrt2ts(hrt, &pa->sa_vattr.va_mtime); in smb2_dh_import_handle()
762 if (nvlist_lookup_hrtime(nvl, "ctime", &hrt) == 0) { in smb2_dh_import_handle()
763 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