rocksdb/port/win
Burton Li 88d85b6820 fix NowNanos overflow (#5062)
Summary:
The original implementation of WinEnvIO::NowNanos() has a constant data overflow by:
li.QuadPart *= std::nano::den;
As a result, the api provides a incorrect result.
e.g.:
li.QuadPart=13477844301545
std::nano::den=1e9

The fix uses pre-computed nano_seconds_per_period_ to present the nano seconds per performance counter period, in the case if nano::den is divisible by perf_counter_frequency_. Otherwise it falls back to use high_resolution_clock.
siying ajkr
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5062

Differential Revision: D14426842

Pulled By: anand1976

fbshipit-source-id: 127f1daf423dd4b30edd0dcf8ea0466f468bec12
2019-03-21 15:18:36 -07:00
..
env_default.cc run make format for PR 3838 (#3954) 2018-06-05 12:58:02 -07:00
env_win.cc fix NowNanos overflow (#5062) 2019-03-21 15:18:36 -07:00
env_win.h fix NowNanos overflow (#5062) 2019-03-21 15:18:36 -07:00
io_win.cc Support pragma once in all header files and cleanup some warnings (#4339) 2018-09-05 18:13:31 -07:00
io_win.h Fix typos in comments (#4456) 2018-10-04 20:46:50 -07:00
port_win.cc Make adaptivity of LRU cache mutexes configurable (#5054) 2019-03-20 12:33:44 -07:00
port_win.h Make adaptivity of LRU cache mutexes configurable (#5054) 2019-03-20 12:33:44 -07:00
win_jemalloc.cc Reformatting some recent changes (#4161) 2018-07-20 14:43:38 -07:00
win_logger.cc Windows cumulative patch 2018-03-06 11:57:43 -08:00
win_logger.h Windows cumulative patch 2018-03-06 11:57:43 -08:00
win_thread.cc Update all unique/shared_ptr instances to be qualified with namespace std (#4638) 2018-11-09 11:19:58 -08:00
win_thread.h Fix a race condition in WindowsThread (port::Thread) 2017-12-07 13:42:53 -08:00
xpress_win.cc Enable cacheline_aligned_alloc() to allocate from jemalloc if enabled. 2017-10-27 13:27:12 -07:00
xpress_win.h Change RocksDB License 2017-07-15 16:11:23 -07:00