Tags: qRoC/folly
Tags
Add stress test for atomic_shared_ptr Summary: None of the existing unit tests exercises the local -> global refcount transfer, which is the most critical part in `atomic_shared_ptr` in terms of correctness, so add a stress test that `load()`s the pointer enough times to trigger a transfer. Reviewed By: dmm-fb Differential Revision: D39927439 fbshipit-source-id: a8a50e33dd4afd1bd7bf0a2c309d92503bfb949c
In SingletonVault shutdown log, keep timestamps for post-mortem debug… …ging Summary: It is difficult to understand which of the destructors take unreasonable time, e.g. P527005137. Adding timestamps to shutdown log to enable that retroactively on a shutdown crash. (Note: this ignores all push blocking failures!) Reviewed By: Orvid Differential Revision: D39331011 fbshipit-source-id: d0c464fcac89e9aa6b13d006f0a8701baa8324d9
Fixes necessary to build benchmark tests on OSX Monterey (facebook#1847) Summary: ToT (Top of Tree) will fail to build if benchmarks are enabled (i.e. cmake ../ -DBUILD_BENCHMARKS=ON) on Monterey with clang++ 13.1.6. This patchset will fix the build. Pull Request resolved: facebook#1847 Reviewed By: Gownta Differential Revision: D39107587 Pulled By: Orvid fbshipit-source-id: 0bec33e64ee4d869fd00f8c77ae3aa8a0b0be9a7
folly::coro::timeoutNoDiscard Summary: Add `timeoutNoDiscard`. It differs from `timeout` in that it doesn't rewrite the result in the case of timeout. This prevents "lost" operations. Reviewed By: iahs Differential Revision: D39370243 fbshipit-source-id: 154a26ecebb39ab1a3ef69b7e943d18536c82438
Inline a method to save two hot load instructions. (facebook#1855) Summary: Pull Request resolved: facebook#1855 Inline coalesceWithHeadroomTailroom into coalesce to save two loads. The profile information shows that we usually don't enter the if inside the 'tailroom' function, and the compiler can't sink the two method calls, so the two loads are wasted. Sinking the two loads/method-calls into the the body of the IF should allow us to avoid the cost of the hot loads. Reviewed By: ot, philippv Differential Revision: D39221756 fbshipit-source-id: 98e4f222c04f3fbf98c1de32bb7cdb0f2d9719f1
cut exception_wrapper in-situ storage variant Summary: Cut `exception_wrapper` in-situ storage variant as a step in revising `exception_wrapper`. This changes the semantics such that now all stored objects are stored with reference semantics and not value semantics, as opposed to the prior situation which tolerated both semantics in the same type. This removes the optimization of using in-situ storage for certain small exception types, and this is noticeable in the benchmarks. For example, construction regresses since there is an extra allocation/deallocation pair and an extra refcount increment/decrement pair. However, exceptions should be sufficiently rare that this regression not be a problem in practice. There single variant remaining, the thrown variant, has creation accelerated with `std::make_exception_ptr` and access accelerated with `folly::exception_ptr_get_object`. Moreover, move-construction may improve since moving `exception_wrapper` instances containing such small exception types no longer requires an extra refcount increment/decrement pair. The prior situation was reportedly confusing, where some instances would have their own private copy of the stored exceptions and access would follow value semantics, but where other instances would have a copy shared with further instances and access would follow reference semantics. For example, one case moved-out the stored exception of a private instance of an `exception_wrapper` under the mistaken assumption that the instance had value semantics, where actually the stored exception was shared across multiple instances of `exception_wrapper` related to each other by copy, and the next access to the stored exception via another instance of `exception_wrapper` failed. Reviewed By: Gownta Differential Revision: D26377018 fbshipit-source-id: 81c392a6326e0a7eb5a54927db5f166867e431e1
Update SSLContext API to have loadTrustedCertificates support lists o… …f strings Summary: Adding ability to load a whole vector of certs at once. Reviewed By: xybu Differential Revision: D38057061 fbshipit-source-id: a8415176522595cb2db9c935cf5fda40cf33c459
Fix lastWakeup_ accounting in ThrottledLifoSem Summary: `lastWakeup_` should be updated with the timestamp *after* the sleep, otherwise the next sleep will be 0. This means that currently only every other thread in a chain of wake-ups waits for the wakeup interval. Reviewed By: philippv Differential Revision: D38684505 fbshipit-source-id: 02f6e033083b58a8d878c73b087395938bd78327
Link to github in dynamic header Summary: Clickable links are best Reviewed By: praihan Differential Revision: D38466482 fbshipit-source-id: 789216005e02c4cd07b48eef2231778058baffd5
consolidate tool exclusion in cmake build Reviewed By: Gownta Differential Revision: D38265963 fbshipit-source-id: 1d0cda00ddb7036bc83d241dd1747806e743fda1
PreviousNext