Several changes for timestamp bundle:
Fully defined the structure. Single copy of it + single timer across all modules, managing it is now the responsibility of KernelState. add global_critical_region::PrepareToAcquire, which uses Prefetchw on the global crit. We now know we can use Prefetchw on all cpus that have AVX. add KeQueryInterruptTime, which is used by some dashboards. add threading::NanoSleep
This commit is contained in:
@@ -47,5 +47,10 @@ uint64_t Clock::QueryHostSystemTime() {
|
||||
uint64_t Clock::QueryHostUptimeMillis() {
|
||||
return host_tick_count_platform() * 1000 / host_tick_frequency_platform();
|
||||
}
|
||||
|
||||
// todo: we only take the low part of interrupttime! this is actually a 96-bit
|
||||
// int!
|
||||
uint64_t Clock::QueryHostInterruptTime() {
|
||||
return *reinterpret_cast<uint64_t*>(KUserShared() +
|
||||
KUSER_SHARED_INTERRUPTTIME_OFFSET);
|
||||
}
|
||||
} // namespace xe
|
||||
|
||||
Reference in New Issue
Block a user