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:
@@ -50,8 +50,7 @@ uint64_t last_guest_tick_count_ = 0;
|
||||
// Last sampled host tick count.
|
||||
uint64_t last_host_tick_count_ = Clock::QueryHostTickCount();
|
||||
|
||||
|
||||
using tick_mutex_type = std::mutex;
|
||||
using tick_mutex_type = std::mutex;
|
||||
|
||||
// Mutex to ensure last_host_tick_count_ and last_guest_tick_count_ are in sync
|
||||
// std::mutex tick_mutex_;
|
||||
@@ -180,6 +179,10 @@ uint64_t Clock::QueryGuestSystemTime() {
|
||||
return guest_system_time_base_ + guest_system_time_offset;
|
||||
}
|
||||
|
||||
uint64_t Clock::QueryGuestInterruptTime() {
|
||||
return Clock::QueryHostInterruptTime();
|
||||
}
|
||||
|
||||
uint32_t Clock::QueryGuestUptimeMillis() {
|
||||
return static_cast<uint32_t>(
|
||||
std::min<uint64_t>(QueryGuestSystemTimeOffset() / 10000,
|
||||
|
||||
Reference in New Issue
Block a user