Summary: MSVC has some odd accessibility rules,
so this makes a couple of things public rather than private.
Closes #284
Reviewed By: @yfeldblum
Differential Revision:
D2307578
Pulled By: @sgolemon
// guarantees we won't have inter-L1 contention. We give ourselves
// a factor of 2 on the core count, which should hold us for a couple
// processor generations. deferredReaders[] is 2048 bytes currently.
// guarantees we won't have inter-L1 contention. We give ourselves
// a factor of 2 on the core count, which should hold us for a couple
// processor generations. deferredReaders[] is 2048 bytes currently.
static constexpr uint32_t kMaxDeferredReaders = 64;
static constexpr uint32_t kDeferredSearchDistance = 2;
static constexpr uint32_t kDeferredSeparationFactor = 4;
static constexpr uint32_t kMaxDeferredReaders = 64;
static constexpr uint32_t kDeferredSearchDistance = 2;
static constexpr uint32_t kDeferredSeparationFactor = 4;
static_assert(!(kMaxDeferredReaders & (kMaxDeferredReaders - 1)),
"kMaxDeferredReaders must be a power of 2");
static_assert(!(kDeferredSearchDistance & (kDeferredSearchDistance - 1)),
static_assert(!(kMaxDeferredReaders & (kMaxDeferredReaders - 1)),
"kMaxDeferredReaders must be a power of 2");
static_assert(!(kDeferredSearchDistance & (kDeferredSearchDistance - 1)),
// If any of those elements points to a SharedMutexImpl, then it
// should be considered that there is a shared lock on that instance.
// See kTokenless.
// If any of those elements points to a SharedMutexImpl, then it
// should be considered that there is a shared lock on that instance.
// See kTokenless.
typedef Atom<uintptr_t> DeferredReaderSlot;
typedef Atom<uintptr_t> DeferredReaderSlot;
FOLLY_ALIGN_TO_AVOID_FALSE_SHARING static DeferredReaderSlot deferredReaders
[kMaxDeferredReaders *
kDeferredSeparationFactor];
FOLLY_ALIGN_TO_AVOID_FALSE_SHARING static DeferredReaderSlot deferredReaders
[kMaxDeferredReaders *
kDeferredSeparationFactor];
*/
void toTSV(std::ostream& out, bool skipEmptyBuckets = true) const;
*/
void toTSV(std::ostream& out, bool skipEmptyBuckets = true) const;
struct CountFromBucket {
uint64_t operator()(const Bucket& bucket) const {
return bucket.count;
struct CountFromBucket {
uint64_t operator()(const Bucket& bucket) const {
return bucket.count;
detail::HistogramBuckets<ValueType, Bucket> buckets_;
};
detail::HistogramBuckets<ValueType, Bucket> buckets_;
};