fix SIOF in CacheLocality.h's AccessSpreader
authorNathan Bronson <ngbronson@fb.com>
Mon, 22 Feb 2016 21:08:30 +0000 (13:08 -0800)
committerfacebook-github-bot-4 <folly-bot@fb.com>
Mon, 22 Feb 2016 21:20:26 +0000 (13:20 -0800)
commitbf385e23f37014ae94ed151097876b8c03338479
treed6b29c2680bf6283184fa4a50011329712cbc20d
parentd31eb712ebe828e742d79245586651d142db848d
fix SIOF in CacheLocality.h's AccessSpreader

Summary:This diff moves all data accessed during
AccessSpreader<>::current(x) into the .data segment, avoiding SIOF
without adding indirection or dynamic gating as would be the case for
normal singleton-like constructs.  The diff also trims the AccessSpreader
API to include only those methods that people actually seem to use.

Reviewed By: djwatson

Differential Revision: D2945205

fb-gh-sync-id: 847e31adc4450217f4ed0575686be261fb504d7c
shipit-source-id: 847e31adc4450217f4ed0575686be261fb504d7c
folly/detail/CacheLocality.cpp
folly/detail/CacheLocality.h
folly/test/CacheLocalityTest.cpp
folly/test/DeterministicSchedule.cpp
folly/test/DeterministicSchedule.h