- 20 Mar, 2018 1 commit
-
-
Yedidya Feldblum authored
Summary: [Folly] Cut `SingletonThreadLocal::getWrapperInline`. It would not be useful in any scenario, given that the generated code is very large. Reviewed By: djwatson Differential Revision: D7315501 fbshipit-source-id: 1ebc15ca0eaf13adaf52fae3971e7f9914bfe10e
-
- 19 Mar, 2018 9 commits
-
-
Steve O'Brien authored
Reviewed By: yfeldblum Differential Revision: D7272553 fbshipit-source-id: f0aaa278e6a81a53f78ae29b68f1bf9f1ba02899
-
Dan Melnic authored
Use unbounded queue in NotificationQueue (same as in D7164130 but with the hazptr fix from D7256905 and the singleton one from D7283390) Summary: Use unbounded queue in NotificationQueue (same as in D7164130 but with the hazptr fix from D7256905 and the singleton one from D7283390) Reviewed By: yfeldblum Differential Revision: D7278275 fbshipit-source-id: 78ea94e1c9d492febd33106b06ce275d4a90a56a
-
Nathan Bronson authored
Summary: F14VectorMap and F14VectorSet use ItemIter to interact with F14Table, but they don't actually need to be able to identify the begin ItemIter. This diff removes both the storage for packedBegin_ and the code to update it (present in all insert and erase functions) for that policy. This is a small CPU optimization, and reduces sizeof(F14Vector{Map,Set}) from 32 bytes to 24. Reviewed By: shixiao Differential Revision: D7181769 fbshipit-source-id: 318c63584543fca339a002d8bcb5872a7bd0bdd3
-
Erik Hortsch authored
Summary: Fiber suspends are incompatible with C++ exception handling. We should enforce that callers are not suspending fibers while handling exceptions. See https://fb.facebook.com/groups/560979627394613/permalink/1119586164867287/ NOTE: This check currently fires not just for baton.wait() (and all things based on baton), but also for calling runInMainContext. I'm unsure of the safety of this. Reviewed By: yfeldblum Differential Revision: D6695110 fbshipit-source-id: cf36edbab9f0573cbf639bf79d0c267681ac5914
-
Neel Goyal authored
Summary: Rename set/getServiceIdentity to set/getSessionKey. This is a more representative description since verified information is in the cert. Reviewed By: yfeldblum Differential Revision: D7184169 fbshipit-source-id: c9404419cb37d2b5ab2fcd8299975e514e3f495a
-
Yedidya Feldblum authored
Summary: [Folly] Move `folly/UncaughtExceptions.h` to `folly/lang/`. (Note: this ignores all push blocking failures!) Reviewed By: andrewjcg Differential Revision: D7319259 fbshipit-source-id: 38d47503e150e01b5e4bcded6c8207484048bf84
-
Asier Gutierrez authored
Summary: Makefile does not install detail/Singleton.h, which is needed by proxygen Closes https://github.com/facebook/folly/pull/804 Reviewed By: andrewjcg Differential Revision: D7320496 Pulled By: yfeldblum fbshipit-source-id: 8c576fe53be8292fa51a3db50dcfaa1d1cb13b6a
-
Yedidya Feldblum authored
Summary: [Folly] Tweaks to `folly/TokenBucket.h`. * No custom clock wrapper - just use the clock interface directly. * Rename from `Parameterized` to `Basic`. Reviewed By: andrewjcg Differential Revision: D7319361 fbshipit-source-id: 1a7d8761e58f5f9b06dd8fdf5f7916913354c3b9
-
Yedidya Feldblum authored
Summary: [Folly] Tests for `throw_exception`. Currently, only for platforms with exceptions. Reviewed By: andrewjcg Differential Revision: D7319127 fbshipit-source-id: 689cf68d45619eddbbda6a4c36226fc7695c1243
-
- 18 Mar, 2018 1 commit
-
-
Yedidya Feldblum authored
Summary: [Folly] Let `SingletonThreadLocal` no longer depend on `Singleton`. After recent changes, the dependency was only for `DefaultTag` and `DefaultMake`, not for `Singleton` or `LeakySingleton` itself. So extract the two small types to a small detail header, and split. Reviewed By: ot Differential Revision: D7300727 fbshipit-source-id: 5ccfc0abff7dbb8c2c9ea83fb9bb3a085904ce58
-
- 17 Mar, 2018 3 commits
-
-
Qinfan Wu authored
Summary: [Folly][coro] Include `Portability.h` before using `FOLLY_HAS_COROUTINES`. Reviewed By: Orvid Differential Revision: D7315956 fbshipit-source-id: 65490ced2573652e346c54aca4e67350fe3579fe
-
Orvid King authored
Summary: Boost handles ensuring destruction order is correct far better than the implementation previously being used. This gets the Windows build working again, as it's currently hitting a thread-local static destruction order issue. Specifically, the thread_local containing the backing map for the portability implementation was being destroyed before a thread_local in rcu, which caused attempts to access thread local values that had already been freed. Reviewed By: yfeldblum Differential Revision: D7312978 fbshipit-source-id: 4d7f1f4d8bb0b92e0c52366078ee7ee34c4248f2
-
Qinfan Wu authored
Summary: [Folly][coro] Disable CoroTest for gcc builds. Reviewed By: yfeldblum Differential Revision: D7314274 fbshipit-source-id: 06747135350001b55d6ce95e1ce4bf738fca0227
-
- 16 Mar, 2018 8 commits
-
-
Neel Goyal authored
Summary: Add a generic Identity class to AsyncTransport that applications are free to implement to convey identity information for both self and peer. Reviewed By: yfeldblum Differential Revision: D7177085 fbshipit-source-id: f1dcd9bb2dbf57751fe7ef0608663ddc1d527b92
-
Qinfan Wu authored
Summary: [Folly][coro] Enable tests and fix build. Reviewed By: yfeldblum, modocache Differential Revision: D7304801 fbshipit-source-id: 0975201a0521cf8275d82ee6aaebfa02986c5b79
-
Xiao Shi authored
Summary: This check is useful for other platforms and in other context where F14 is included. For the sake of fast compilation, separate this macro out so that one doesn't have to pull in the entire F14Map/Set headers to use this macro. Reviewed By: yfeldblum Differential Revision: D7300144 fbshipit-source-id: d1aeb7e3c5d2f15703dd356fc54622751e3fa71a
-
Steve O'Brien authored
Summary: Unneeded header in frequently-used file; drop it Reviewed By: yfeldblum Differential Revision: D7165040 fbshipit-source-id: b60a3cdf924ab93961a7ead3ac0653a2339a4faf
-
Steve O'Brien authored
Summary: Removing expensive, unneeded includes (esp. Boost includes) gradually. Reviewed By: yfeldblum Differential Revision: D7144471 fbshipit-source-id: b568ec75251d360a72e7fa2d656ab9463b5a4728
-
Yanan Xin authored
Summary: Add getTaskQueueSize() method in CPUThreadPoolExecutor Reviewed By: yfeldblum Differential Revision: D7294802 fbshipit-source-id: 1f37558a1f14fcc2888c654248d649365c323432
-
Orvid King authored
Summary: Windows defines `IP_MTU_DISCOVER`, but does it differently from everywhere else, so disable it unless everything required is defined. Reviewed By: yfeldblum Differential Revision: D7298640 fbshipit-source-id: 8ecc2dfd9ba83f31e9d72e0f42fb4fbf8f3e50b5
-
Nathan Bronson authored
Summary: assert(x) doesn't mark x as used in prod builds, causing problems for builds that warn on unused variables and promote warnings to errors. This diff changes assert calls to FOLLY_SAFE_DCHECK, which is better in this regard. Reviewed By: phoad, shixiao Differential Revision: D7291084 fbshipit-source-id: 1ae48a271f30182ac8a1c2cf126af0e6b4fd0a25
-
- 15 Mar, 2018 6 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Alias `std::launder` on `MSVC` to avoid ambiguity. Fixes #802. Reviewed By: Orvid Differential Revision: D7286052 fbshipit-source-id: 7cd89c9ad236a433f53fbdb9e2e024b85105827e
-
Yedidya Feldblum authored
Summary: [Folly] Fix `SingletonThreadLocal` use from headers included by separate dynamically-loaded modules. There is no need in `SingletonThreadLocal` specifically to check for double-registration and `SingletonThreadLocal` does not support mocks, so `LeakySingleton` may be bypassed entirely. Reviewed By: djwatson Differential Revision: D7283390 fbshipit-source-id: 45295c4dab233b9373ed32a47d4c80832b0f9eff
-
Dave Watson authored
Summary: MEMBARRIER_CMD_SHARED is too slow, use EXPEDITED (or the mprotect hack if kernel is too old). hazptr has been using EXPEDITED for a while, the only other users are RCU and read_mostly_shared_ptr Reviewed By: yfeldblum, osandov Differential Revision: D7280190 fbshipit-source-id: 2a9aeab035f8996566b557d7f406686c361a37d7
-
Yang Zhang authored
Summary: Provide UBSAN-clean add/sub function on integral types. Helps to avoid overflow. Reviewed By: yfeldblum Differential Revision: D7230723 fbshipit-source-id: 10fa54b405f9643dfbbb1940cf100516fd1341e1
-
Alexander Blom authored
Summary: This makes it easier to use EventBase in cases where classes require ScheduledExecutor instead of Executor. Previously the client would have to implement a wrapper around EventBase. Reviewed By: yfeldblum Differential Revision: D7179869 fbshipit-source-id: 21730a56ed5b71fd731ffd272f9f3752b70d63ce
-
Xiao Shi authored
Summary: Expose Default{Hasher, KeyEqual, Alloc} to platforms without intrinsics available Reviewed By: yfeldblum Differential Revision: D7277896 fbshipit-source-id: 92f46aef9ab0926c32c85e29e368f7c0b58c2b3e
-
- 14 Mar, 2018 8 commits
-
-
Nathan Bronson authored
Summary: Add missing WIN32 compat builtins Reviewed By: Orvid Differential Revision: D7276240 fbshipit-source-id: 094c0861126b3477e9112987f033edacbde4aca4
-
Tom Jackson authored
Reviewed By: yfeldblum Differential Revision: D7257019 fbshipit-source-id: 2fe54fe1d42bfe81b2f6f8e43ae0f7e738e93edd
-
Dave Watson authored
Summary: hazptr_priv_list needs to be reinitialized on fork, as well as ODR violations. This broke stuff when trying to land D7164130 TL;DR the thread_locals need to be in a .cpp file, the templates don't always get merged correctly, especially in the face of dlopen. You can, however, use a thread_local * pointer cache to the object. This is basically what folly::SingletonThreadLocal does. Folly's ThreadLocal runs destructors when forking even too, so nothing special is required. Reviewed By: yfeldblum Differential Revision: D7256905 fbshipit-source-id: c817167b5c3db27fa929feaa39295fd939c1cb4c
-
Xiao Shi authored
Summary: Expose the default structs in `folly::f14` namespace so that users _could_ potentially refer to them. Reviewed By: nbronson Differential Revision: D7271846 fbshipit-source-id: 81a193209e59ed80260098ed97c99a7b6f2ad151
-
Yedidya Feldblum authored
Summary: [Folly] Parameterize `AlignedSysAllocator` by a policy. Reviewed By: ot Differential Revision: D7246946 fbshipit-source-id: 5b6a89707c242e49bdbafba9dec6df4c65ef385c
-
Bennett Magy authored
Summary: For some reason, compilation of certain Observable code fails in opt mode with the error that Observer::core_ is private. It seems that ObserverCreator is not recognized as a friend of Observer. This forward declaration of ObserverCreator seems to fix this issue. Reviewed By: yfeldblum Differential Revision: D7268318 fbshipit-source-id: 1ea76efb0f50cb8a6b28147305ec7547f55338b8
-
Yedidya Feldblum authored
Summary: [Folly] Enable `-Wunused-value`. Reviewed By: Orvid Differential Revision: D7266246 fbshipit-source-id: dc9b85a5f8ce67802cc2fa94746a26529012ec22
-
Nathan Bronson authored
Summary: F14 was missing the MSVC portability shims, and also needs to use an MSVC-specific intrinsic to get the high word of a 64-bit multiply. Reviewed By: yfeldblum Differential Revision: D7263349 fbshipit-source-id: f47ceb2b2370d9bef1409e4790b236752c9f6ac4
-
- 13 Mar, 2018 4 commits
-
-
Paul Jewell authored
Summary: Currently, an error is thrown if a user tries to hash an instance of `folly::dynamic` which is of type `object` or `array`. Primitive underlying types are fine. There doesn't seem to be a strict reason for this, as objects and arrays are just as hashable as primitive types. Additionally, the inability to hash here causes some unnecessary drawbacks (e.g. interacting with `unordered_map`s). This diff uses the existing dependency on `folly/hash/Hash.h` to start allowing `folly::dynamic` objects/arrays to be hashed as well. Reviewed By: ot Differential Revision: D7219760 fbshipit-source-id: 1dff3f99bdacb66f719c614040cbd668ce51a33e
-
Fengyang Wang authored
Summary: EventBase meets the definition of IOExecutor (it is an executor that "manages" at least one EventBase) and is already claimed to be one in the docstring. Reviewed By: yfeldblum Differential Revision: D7064481 fbshipit-source-id: 026e0e4c24d6fb15a32bc4772b35689f830ed944
-
Lee Howes authored
Summary: deferError adds an error handling callback to SemiFuture, enqueued on the internal deferred executor, and thus will run on the chained executor or inline with .get() as for defer. Reviewed By: yfeldblum Differential Revision: D7243193 fbshipit-source-id: 9fe7dab9fbc8b236d717b058c81a303d87fa9253
-
Nathan Bronson authored
Summary: F14 is a 14-way probing hash table that resolves collisions by double hashing. Up to 14 keys are stored in a chunk at a single hash table position. SSE2 vector instructions are used to filter within a chunk; intra-chunk search takes only a handful of instructions. "F14" refers to the fact that the algorithm "F"ilters up to "14" keys at a time. This strategy allows the hash table to be operated at a high maximum load factor (12/14) while still keeping probe chains very short. F14 provides compelling replacements for most of the hash tables we use in production at Facebook. Switching to it can improve memory efficiency and performance at the same time. The hash table implementations widely deployed in C++ at Facebook exist along a spectrum of space/time tradeoffs. The fastest is the least memory efficient, and the most memory efficient is much slower than the rest. F14 moves the curve, simultaneously improving memory efficiency and performance when compared to the existing algorithms, especially for complex keys and large maps. Reviewed By: yfeldblum Differential Revision: D7154343 fbshipit-source-id: 42ebd11b353285855c0fed5dd4b3af4620d39e98
-