- 21 May, 2020 6 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Use `RequestToken` in `RequestEventBase` to speed up lookup. Reviewed By: zhxchen17 Differential Revision: D21529465 fbshipit-source-id: eaaef7b48be2c5a8d76fb5f4a5293f7db7e68bed
-
Yedidya Feldblum authored
Summary: [Folly] Fix technical typo in checking hw checksum support, but which makes no practical difference. Differential Revision: D21689112 fbshipit-source-id: 8ad71d20a561f4bbf5c413ce94e7bec227d9d940
-
Amir Livneh authored
Reviewed By: yfeldblum Differential Revision: D21666740 fbshipit-source-id: 96975e777df0745f343c5b722f1d8c05bb8ac32e
-
Yedidya Feldblum authored
Summary: [Folly] Tweak `BlockingContext` in various ways. Differential Revision: D21657789 fbshipit-source-id: 4b03b3b43dddc0e9011a7594001994f2594a1a5b
-
Yedidya Feldblum authored
Summary: [Folly] Lock utilities: `upgrade_lock`, `transition_to_shared_lock`, `transition_to_upgrade_lock`, `transition_to_unique_lock`, `try_transition_to_unique_lock`. Note: `std::shared_mutex` does not have an upgrade state or any atomic transitions; there is no `std::upgrade_lock`; and `std::shared_lock` does not have a constructor from `std::unique_lock`. Reviewed By: simpkins, nbronson Differential Revision: D15532568 fbshipit-source-id: d32f387b26b57539857922c3090dc75ffcaaa538
-
Lee Howes authored
Summary: Migration from Future-returning executor-erasing collectX forms to SemiFuture-returning forms, that are less risky in particular with coroutines. Earlier changes added collectXSemiFuture and collectXUnsafe as a migration path. We then migrated collectX callsites to collectXSemiFuture or collectXUnsafe and switched the implementation of collectX to the SemiFuture form. This diff removes collectXSemiFuture completely. Reviewed By: yfeldblum, mpark Differential Revision: D21631886 fbshipit-source-id: c7b296d51f30c8b51ab0c7d06b1ce62c8cdd28d5
-
- 20 May, 2020 9 commits
-
-
Ian Petersen authored
Summary: `folly::detail::OptionalPromise<Value>` won't build with exceptions turned off (e.g. by passing `-fno-exceptions` on Clang's command line) because its `unhandled_exception()` says `throw;`. This diff replaces the `throw;` with a call to `folly::rethrow_current_exception();`. Reviewed By: yfeldblum Differential Revision: D21655976 fbshipit-source-id: 5f431372f2494a09f98e3b8c36a94e8475efff29
-
Bryan Alger authored
Summary: This fails to build on win32 platform with: ``` xplat\folly\portability\pthread.cpp(142): error C2664: 'HANDLE CreateThread(LPSECURITY_ATTRIBUTES,SIZE_T,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD)': cannot convert argument 3 from 'DWORD (__cdecl *)(void *)' to 'LPTHREAD_START_ROUTINE' ``` This seems to fix it. Reviewed By: Orvid Differential Revision: D21623386 fbshipit-source-id: 1b18a74bd71ffc75f34a92074e07f3d69742c07d
-
Yedidya Feldblum authored
Summary: [Folly] Small simplification of `AsyncSocket` read loop. Differential Revision: D21514325 fbshipit-source-id: 0af27205b4aa2807a800430e8a2b3dea36356970
-
Dan Melnic authored
Summary: Add io_uring_submit_and_wait call Reviewed By: yfeldblum Differential Revision: D21653382 fbshipit-source-id: 945aa877a30b3c6431089a113ece5999d1217eb4
-
Matt Ma authored
Reviewed By: yfeldblum, luciang Differential Revision: D21656746 fbshipit-source-id: 5e19d72ccd524926c698b8814cc6c8f2c6133565
-
Dan Melnic authored
Summary: fsync the temp file Reviewed By: yfeldblum, kevin-vigor Differential Revision: D21668049 fbshipit-source-id: 85825f81dfbe10a452f7f946133bb3d8993850f8
-
Yedidya Feldblum authored
Summary: [Folly] `rethrow_current_exception`, a `-fno-exceptions` compatibility wrapper for `throw;`. Reviewed By: ispeters Differential Revision: D21656269 fbshipit-source-id: 8f37fe71c6255162b8f05268cae04ac5927013d7
-
Nick Terrell authored
Summary: gcc-6.5 on OS X <= 10.6 complains about the `\r` when this code path is enabled. I don't think we officially support `__i386__`, but I want to backport the patch from zstd. https://github.com/facebook/zstd/pull/1418 (Note: this ignores all push blocking failures!) Reviewed By: yfeldblum, Orvid Differential Revision: D13104652 fbshipit-source-id: 737a68253c7d90c3a1cc026069b048551cb5ced9
-
Adam Simpkins authored
Summary: If an error is thrown when formating arguments for a log message, use `folly::exceptionStr()` to format the exception instead of just `ex.what()`. I changed all of the tests that verify the results of these strings to use a regular expression, as `folly::exceptionStr()` produces different results in different platforms, and does not always demangle type names. I also included a minor change to increase a timeout in AsyncFileWriterTest.cpp, as I saw this timeout fail spuriously once in my testing. Reviewed By: yfeldblum Differential Revision: D21635680 fbshipit-source-id: 749ef48deb59af1f2faef0158e0291838e09fc38
-
- 19 May, 2020 7 commits
-
-
Matt Ma authored
Summary: Fix the issue that there may be other tags like DW_TAG_lexical_block between DW_TAG_subprogram and DW_TAG_inlined_subroutine. Also increase the maximum inline location info per frame since previous value 3 is too small. Refactors the code to set file and line for inline functions. Reviewed By: luciang Differential Revision: D21250080 fbshipit-source-id: f52dc74ee5c144aa26723546b48486f8a5250f19
-
Dan Melnic authored
Summary: Fix uninitialized maxSubmit_, maxGet_ member variables Reviewed By: danobi Differential Revision: D21645171 fbshipit-source-id: 094ba7b045010954fdebc249318191f956f5b7b2
-
Adam Simpkins authored
Summary: This updates the logging code so that it is possible to include `folly/xlog.h` and write log statements in code that is compiled with `-fno-exceptions` The code for parsing log configuration strings does still use exceptions in some of its config parsing logic. It shouldn't be too difficult to disable that in a subsequent diff, but for now this change at least makes it possible for calling code to write log messages. Reviewed By: yfeldblum Differential Revision: D21630914 fbshipit-source-id: ce9ed422f40066e57433a85182e1a8fc6d8628db
-
Robin Cheng authored
Summary: This fixes a race condition detected by ThreadSanitizer. The thread list is protected by a mutex, but individual structs in the list are not protected, leading to racy access to two of their fields. This diff makes the fields atomic. Reviewed By: yfeldblum Differential Revision: D21484748 fbshipit-source-id: a981419f47a2aebaf1d40b23e9c4967cf2104aaa
-
Dan Melnic authored
Summary: Remove PollIoBackend inline submit Reviewed By: danobi Differential Revision: D21625033 fbshipit-source-id: 02ee55e64a2538c6a2392ea70912f4ae9b642963
-
Lee Howes authored
Summary: The current stack trace formatting is based on repeated string appends with newlines. This change adds more control so that we can produce file and line information only, without unnecessary newlines. New format: ./folly/experimental/symbolizer/Symbolizer.h:77 ./folly/experimental/symbolizer/test/StackTraceTest.cpp:209 ./folly/experimental/symbolizer/test/StackTraceTest.cpp:213 ./folly/experimental/symbolizer/test/StackTraceTest.cpp:258 Reviewed By: yfeldblum Differential Revision: D21562670 fbshipit-source-id: 7d05605cbda686e2f1c87577647c7ab7581f8580
-
Kirk Shoop authored
Summary: adds ensureCleanupAfterTask() takes a SemiFuture<T> task and a SemiFuture<Unit> cleanup. returns a SemiFuture<T> always starts cleanup after task completes. stores the result of the task and replays it after the cleanup completes. cleanup is not allowed to fail. Reviewed By: yfeldblum, andriigrynenko Differential Revision: D21481825 fbshipit-source-id: 901a91c25f7b2b4fa794a590a5433e0fad27d168
-
- 18 May, 2020 1 commit
-
-
Luqun Lou authored
Summary: CpuLocalBuffer need extend alignment, which isn't honored by std::vector's default allocator due to compiler bug http://open-std.org/JTC1/SC22/WG21/docs/papers/2012/n3396.htm https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65122 https://bugs.llvm.org/show_bug.cgi?id=22634 the fix is to use custom allocator to honor extend alignment requirement. Reviewed By: yfeldblum Differential Revision: D21405041 fbshipit-source-id: 53cfe1bfd66580990c8a1a0c5f0c09f6651bda24
-
- 17 May, 2020 1 commit
-
-
Yedidya Feldblum authored
Summary: [Folly] Fill `reentrant_allocator` member types and functions for situations which fail to indirect via `std::allocator_traits`, such as the former implementation of libstdc++ `std::basic_string`. May help to address https://github.com/facebook/fboss/issues/86. Differential Revision: D21608091 fbshipit-source-id: 020ac3bd37b27a08dd7c8113a77979d0ba21a8fc
-
- 15 May, 2020 4 commits
-
-
Misha Shneerson authored
Summary: Allows attaching a BPF script to observe tasks behavior Sample script, attaching those probes to a test binary (./buck-out/gen/common/services/cpp/test/thrift_2_async_server) is provided. Reviewed By: yfeldblum Differential Revision: D21526163 fbshipit-source-id: e976ddada1921c8c904d65aa9a558bbb45bf158f
-
Lewis Baker authored
Summary: Adds a new CoInvoke() helper function that should be used instead of ::testing::Invoke() when defining mock methods using coroutine lambdas. Use of Invoke() in a GMock definition that calls a coroutine-lambda that contains captures will result in the returned Task holding a dangling reference to a copy of the lambda. The CoInvoke() helper instead, ensures that the coroutine created by the lambda holds on to a reference to a copy of the lambda that is kept alive until the coroutine completes by invoking the lambda using the folly::coro::co_invoke() utility function instead of directly calling operator(). Reviewed By: andriigrynenko Differential Revision: D21578404 fbshipit-source-id: 3322740efd00596c2311530a166ef2d5301c6b89
-
Wez Furlong authored
Summary: I'm doing this mostly so that we can avoid using git to fetch the sources. Reviewed By: chadaustin Differential Revision: D21508201 fbshipit-source-id: 54d4635d8938659bea962e90bd829d237f1ed221
-
Wez Furlong authored
Summary: We use drive letter substitutions to workaround Windows filename length limitations. On my personal Windows system running python 3.8.2 realpath inside an ssh session manages to resolve to the full filename which causes the boost build to fail. Avoid that! Reviewed By: chadaustin Differential Revision: D21507851 fbshipit-source-id: 1220c1c85d2124ddc51f42cefff2ce00e10c55c9
-
- 14 May, 2020 3 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Avoid inlining `Cursor` slow paths. These are already extracted to separate functions, but the compiler will still aggressively inline them. Differential Revision: D21392842 fbshipit-source-id: 2b045ae9c5188315b938de984730ad2051237cf5
-
Andrew Huang authored
Summary: Giving SSLContext ownership over the new session callback attached to SSL_CTX, so that it may do additional work with the new session (i.e. forward the session to its corresponding abstracted SSLSession). Reviewed By: mingtaoy Differential Revision: D21478165 fbshipit-source-id: 459e4b3f9af2fedee4c02df6c9f689db15c1852f
-
Dan Melnic authored
Summary: Avoid calling scheduleTimeout for a thread that is mostly busy Reviewed By: yfeldblum Differential Revision: D21531280 fbshipit-source-id: b89254ebc3662c951b3b181b3a2777afb9e3f4fe
-
- 13 May, 2020 2 commits
-
-
Matt Joras authored
Summary: As it turns out, to use this reliably on Android we need to define a weak symbol. The headers are only exported after API level 21, so apps that compile with 16 cannot use it with a compile time flag. Instead we can utilize a weak symbol to link with it, and check if it's there at runtime. Reviewed By: yfeldblum Differential Revision: D21535034 fbshipit-source-id: 8b68a803d1e9f2f293e9f3efa16fb2a18abee53d
-
Yedidya Feldblum authored
Summary: [Folly] Explicitly enforce that `RequestToken` is trivially-destructible to permit its use as a Meyers Singleton without requiring the use of Leaky Meyers Singleton to avoid destruction-order problems. (Note: this ignores all push blocking failures!) Differential Revision: D21533605 fbshipit-source-id: fe334fd5257b1d0a07efd849c4532b28801e54c4
-
- 12 May, 2020 3 commits
-
-
Christopher Wei authored
Summary: Adds a version of getFiberManager that takes a VirtualEventBase + FrozenOptions Reviewed By: yfeldblum Differential Revision: D21507009 fbshipit-source-id: 2bffd1704650b25e78fc388b3e033da4f2c16b9a
-
Matt Joras authored
Summary: It needs to set the msg_len, otherwise the caller doesn't know how long the datagram is. Reviewed By: yangchi Differential Revision: D21512788 fbshipit-source-id: f24c2bd9e86acf93ebf12c48afcf7658c8e8d54e
-
Dan Melnic authored
Summary: Fix sendmmsg wrapper Reviewed By: yfeldblum Differential Revision: D21513176 fbshipit-source-id: ddc1bdd93801136994ef62fd5793da7371e9e22a
-
- 11 May, 2020 4 commits
-
-
Spencer Baumgardner authored
Summary: This diff adds support for reference types to the Async abstraction. One example use-case is memoization where you generate the value asynchronously on cache-miss. You want may want to return a reference to avoid the expense of copying. Some additional context is in D21438851. Reviewed By: yfeldblum Differential Revision: D21478238 fbshipit-source-id: 53e1b997abed2d40f0a2f9ab935925ad9bbc91ab
-
JiaJie Ye authored
Summary: VirtualEventBase is backed by a EventBase and byitself is also sequenced, thus shoudl be an SequencedExecutor (Note: this ignores all push blocking failures!) Reviewed By: yfeldblum Differential Revision: D21493098 fbshipit-source-id: 97fd09161117e77422a5786584db89af98dfe314
-
Xavier Deguillard authored
Summary: For large projects, with lots of tests, running all the tests can take a lot of time, but for quick development iteration, only a subset of the tests may be needed to run. On non-Windows platforms, this can be easily achieved by manually executing the individual tests binaries and use the builtin filtering mechanism of that test binary to achieve the goal. On Windows, this can quickly become impossible as DLLs might not be available, and the right PATH would need to be manually specified by hand to execute the tests binaries[0]. To solve this, let's simply provide a unified way of running specific tests by passing in a regexp. Both testpilot and CTest do support regex to execute specific tests. My understanding is that cargo doesn't yet allows regex, but will in the future. [0]: And a missing DLLs would produce no output when executed from PowerShell, which makes this very confusing. Reviewed By: wez Differential Revision: D21484774 fbshipit-source-id: ee32e950e25bb2a498a2b364a447955a917b0590
-
Ian Petersen authored
Summary: Sized deallocation (introduced in C++14) is only available on iOS after 10.0. This diff changes `folly_coro_async_free` to use `operator delete(void*)` when `operator delete(void*, size_t)` is unavailable. Reviewed By: yfeldblum Differential Revision: D21492467 fbshipit-source-id: 2afef1d3d2aa6c70fec5f49e5d62a4a594e6da83
-