MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lockstat_nsecs

Function lockstat_nsecs

freebsd/kern/kern_lockstat.c:77–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75volatile bool __read_frequently lockstat_enabled;
76
77uint64_t
78lockstat_nsecs(struct lock_object *lo)
79{
80 struct bintime bt;
81 uint64_t ns;
82
83 if (!lockstat_enabled)
84 return (0);
85 if ((lo->lo_flags & LO_NOPROFILE) != 0)
86 return (0);
87
88 binuptime(&bt);
89 ns = bt.sec * (uint64_t)1000000000;
90 ns += ((uint64_t)1000000000 * (uint32_t)(bt.frac >> 32)) >> 32;
91 return (ns);
92}

Callers 9

__rw_rlock_hardFunction · 0.85
kern_rwlock.cFile · 0.85
kern_sx.cFile · 0.85
_sx_slock_hardFunction · 0.85
lockmgr_slock_hardFunction · 0.85
lockmgr_xlock_hardFunction · 0.85
__mtx_lock_sleepFunction · 0.85
_mtx_lock_spin_cookieFunction · 0.85
thread_lock_flags_Function · 0.85

Calls 1

binuptimeFunction · 0.85

Tested by

no test coverage detected