- 16 Oct, 2019 4 commits
-
-
Wei Liu authored
Differential Revision: D17908896 Original commit changeset: 85847fc17f4a fbshipit-source-id: 9b2bd8c11881cad18cffea0e14349e25d743b150
-
Rodolfo Granata authored
Summary: Calling `folly::ThreadPoolExecutor::withAll` is powerfull when combined with `folly::ThreadPoolExecutor::getPoolStats`. However getPendingTaskCountImpl being pure virtual can trigger `__cxa_pure_virtual ... std::terminate()` while object is partially destructed. This change signals implementors of derived clases to write a body for getPendingTaskCountImpl while allowing calling getPoolStats -> getPendingTaskCountImpl within a try/catch block. Reviewed By: yfeldblum Differential Revision: D17915523 fbshipit-source-id: 2ffad7076313407969d88c75c7e457fa4e7e2d6d
-
Joe Loser authored
Summary: - There is not an easy way to check if a given type is an instantiation of a class template. - The common solution is to write a custom trait each time and specialize it for the given instantiation so that the trait returns `std:true_type`. - Add `is_instantiation_of` to help with DRY in custom traits for checking if a type is an instance of a given class template. Note that this does not work when the class template has a mix of type and non-type template parameters. It only works with types. Pull Request resolved: https://github.com/facebook/folly/pull/1184 Reviewed By: vitaut Differential Revision: D16161679 Pulled By: yfeldblum fbshipit-source-id: c933fd3db7c56f61b6784fdcd199ff7963d61d8f
-
Liu Cao authored
Summary: The deadlock repro is described https://github.com/facebook/folly/issues/1211. Fix is to check the working epoch before retire() starts the sync work. Reviewed By: yfeldblum Differential Revision: D17908896 fbshipit-source-id: 85847fc17f4a75058d4a72c43dba0c570a2593d6
-
- 15 Oct, 2019 7 commits
-
-
Felix Handte authored
Summary: As title. Reviewed By: yfeldblum Differential Revision: D17937014 fbshipit-source-id: a0ff5f5f9cbbb182794dc564610d7adb9c7c8d08
-
Yedidya Feldblum authored
Summary: [Folly] Fix `Json.SortKeys` test when `F14NodeMap` may randomize table iteration order. Reviewed By: shixiao Differential Revision: D17903465 fbshipit-source-id: 00f1a8c441af3e11815a4312f6dc810ec9455a5e
-
Chad Austin authored
Summary: Unconditionally sleeping for 100ms in the wait polling loop has high average latency. If a process exits just after the initial wait() call, it's better to poll again sooner. Start with a 2ms sleep and double it every sleep, capping out at 100ms. Reviewed By: yfeldblum, mzhaom Differential Revision: D17769851 fbshipit-source-id: efec8fdb8c2199b8db29b46b8c43fdaac56f69a8
-
Chad Austin authored
Summary: `waitOrTerminateOrKill` fills the gap between `wait()` and `terminateOrKill`. It allows giving the subprocess a chance to shut down cleanly (after closing its stdin pipe, for example), but avoids waiting forever or leaking a child process. Reviewed By: yfeldblum, mzhaom Differential Revision: D17769090 fbshipit-source-id: 8940fd63f7eb9c09ef293c89a5e97f69805735ff
-
Matt Ma authored
Summary: QuotientMultiSet is a space-efficient static data structure to store a non-decreasing sequence of b-bit integers. If the integers are uniformly distributed lookup is O(1)-time and performs a single random memory lookup with high probability. Reviewed By: ot Differential Revision: D17506766 fbshipit-source-id: b3e7a22dd193672fadb07d4cccb8b01bedae7cf9
-
Joe Loser authored
Summary: - Document in the `README.md` how to build tests as part of the CMake build. Closes https://github.com/facebook/folly/issues/1240 Pull Request resolved: https://github.com/facebook/folly/pull/1244 Differential Revision: D17927395 Pulled By: yfeldblum fbshipit-source-id: 6b638ac807886b505b69063f2a47162f3f3fc8de
-
Giuseppe Ottaviano authored
Summary: The standard only requires `To` to be trivially copyable, not trivial. Reviewed By: yfeldblum Differential Revision: D17916612 fbshipit-source-id: 80ae35672ea4664fe4204c8181ac6402065c4e03
-
- 14 Oct, 2019 5 commits
-
-
Lewis Baker authored
Summary: Made a slight tweak to the collectAll benchmark for the coroutine implementation to avoid allocating additional coroutine frames. Reviewed By: andriigrynenko Differential Revision: D17917156 fbshipit-source-id: 890a2ab33eb53050930d4547119d30a9c161887e
-
Chad Austin authored
Summary: std::chrono is less prone to error than specifying timeouts in `int` seconds. Reviewed By: yfeldblum, mzhaom Differential Revision: D17767787 fbshipit-source-id: 5bb23d3a78e6e798e7b10331dc416e24d5a8746d
-
Chad Austin authored
Summary: Synchronized::operator-> is dangerous because it's very easy to implicitly acquire locks in ways that don't form a coherent locking model. Replace uses of it in folly in preparation for removing or marking the function deprecated later on. Reviewed By: yfeldblum Differential Revision: D17862465 fbshipit-source-id: 45d3b0d738941c3faa6d73418e79dcb8a1259e98
-
Andrii Grynenko authored
Reviewed By: yfeldblum Differential Revision: D17892633 fbshipit-source-id: 1b4b2cffb040b1abf709ea2ccd4015426398dda0
-
Andres Suarez authored
Reviewed By: yfeldblum Differential Revision: D17889050 fbshipit-source-id: 323a2a5796b4f06c2fe4c84a714a763aa3da4866
-
- 13 Oct, 2019 3 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Apply extra formatting rules beyond black. Reviewed By: zertosh Differential Revision: D17898403 fbshipit-source-id: 6d73c75a35513f138bcc0d734aada0c99cff54c7
-
Yedidya Feldblum authored
Summary: [Folly] Apply `black` formatter to `.py` files. Reviewed By: zertosh Differential Revision: D17898404 fbshipit-source-id: b597b55b646e539a288d175e0b2db8111b5b103b
-
Andres Suarez authored
Reviewed By: yfeldblum Differential Revision: D17889052 fbshipit-source-id: e9733e6ab31d01064660043b0f4edc31b0f5377e
-
- 11 Oct, 2019 4 commits
-
-
Shai Szulanski authored
Reviewed By: andriigrynenko Differential Revision: D17749079 fbshipit-source-id: 44c2c6dd55fe5be033bc4a5139941b5e3a004a67
-
Shai Szulanski authored
Summary: Like subscribeInline but does work on an executor and returns a subscription that can be waited on as a SemiFuture or cancelled Reviewed By: andriigrynenko Differential Revision: D17700281 fbshipit-source-id: 52b2c63af53e8f87d921cb0a0ab28da0a800a9fc
-
Micky Kelager authored
Summary: This will add support to set and get thread name for Android. `pthread_setname_np` was introduced back in NDK API level 9: https://stackoverflow.com/questions/15241869/pthread-error-in-ndk-build?fbclid=IwAR0yvyaC4KNA6D1GlgIofQSFIuZAgL7qDR5L6m5tkY6lv-R6uTvzreAiFp4 Backwards support added for setting current thread name using `prctl(PR_SET_NAME)`, when `pthread_setname_np` is not available (for `__ANDROID_API__ < 9`). Currently, Android NDK does not support `pthread_getname_np` so `prctl(PR_GET_NAME)` is used for this. Reviewed By: yfeldblum Differential Revision: D17815151 fbshipit-source-id: 474caee070fad26f3e6b118307058d5506f0467b
-
Yedidya Feldblum authored
Summary: [Folly] Move `ThreadName.cpp` macro defs outside C++ section, including outside `namespace ...` blocks. Reviewed By: vitaut Differential Revision: D17868541 fbshipit-source-id: a0964ce1f1c6322185f94b8162df4c0e6eaa84bf
-
- 10 Oct, 2019 5 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Simplify ASAN support in `folly/MicroLock.h`. Reviewed By: mzlee Differential Revision: D17842549 fbshipit-source-id: c9e89d8c69f8a291427a73fee12651353a5da4e4
-
Andrii Grynenko authored
Summary: It's possible for user code to be run in the ObserverManager thread outside of the refresh call (e.g. from Core destructor), so we can't rely on inManagerThread check to guarantee that Dependency recorder is active. Reviewed By: yfeldblum Differential Revision: D17805252 fbshipit-source-id: 5a858be0cf204da1342dc182e25797fd130c0458
-
Andres Suarez authored
Summary: See https://fb.workplace.com/groups/osssupport/permalink/2846876118694318/ Reviewed By: wez Differential Revision: D17750243 fbshipit-source-id: 9e149df1f8e09203820f50d0fcac4a5cecf52e33
-
Wez Furlong authored
Summary: This is the first step towards removing `watchman/thirdparty/tap.{cpp,h}` Reviewed By: chadaustin Differential Revision: D17775680 fbshipit-source-id: d6ac32c3b2489e1713fb132b0bb46d848c56811f
-
Wez Furlong authored
Summary: This helps to squash out some flakiness Reviewed By: pkaush Differential Revision: D17804696 fbshipit-source-id: decd8e5dd37d802c62cae1168c4f4d72c0fc5c83
-
- 09 Oct, 2019 4 commits
-
-
Max Katsev authored
Summary: Same as regular groupBy Reviewed By: ot Differential Revision: D17843280 fbshipit-source-id: 33d74d7ed84b8c46509bf186bfa52e31d6284015
-
Alexey Spiridonov authored
Summary: As it turns out, several of the `fizz` dependencies require it to have been built with tests enabled, so it's just easier to build them always, IIRC they only waste 1-2 minutes of time. Reviewed By: lnicco Differential Revision: D17837758 fbshipit-source-id: dd0c73b3aaf72831ce702dbcecd4e3ff627a4901
-
Zeyi (Rice) Fan authored
Reviewed By: wez Differential Revision: D17494253 fbshipit-source-id: 45bab057e5cefd8f2808be96ba31814c5196051b
-
Alexey Spiridonov authored
Summary: Proxygen no longer uses `fbcode_builder` to run its tests, so whatever the purpose of D17158685, these `fbcode_builder` configs no longer affect Proxygen, and can be reverted to their original state. Since the general design pattern for `fbcode_builder` has been to link everything as `.so`s, let's return to this (which helps fix Bistro's build). Also, let's not waste time building & linking tests for libraries that are not the library under test. That is: - Before: The Bistro build also builds tests for wangle, proxygen, etc. This is a result of some accidental changes in D17158685. - After: We explicitly don't build test for any of the 4 dependencies here. This is OK because each project also has its own `fbcode_builder_config.py`, which **does** build tests. This latter part should result in a build-time reduction. Reviewed By: lnicco Differential Revision: D17819858 fbshipit-source-id: 7cad1bed86b2f0c3934b0fc5d6fb33e6a2ee2695
-
- 08 Oct, 2019 1 commit
-
-
Felix Handte authored
Summary: This diff introduces a data structure that keeps a set of, well any object, but it's intended to cache compression contexts, e.g., `ZSTD_CCtx`es. These objects can be expensive to allocate but cheap to reuse. E.g., HHVM was spending 70% of its Zstd CPU allocating, memsetting, and freeing contexts before it started using a structure like this. Reviewed By: terrelln Differential Revision: D15787721 fbshipit-source-id: bda33e9028c73c14435e18ce07cfbc8989263d98
-
- 07 Oct, 2019 2 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Namespace preprocessor names in `folly/CpuId.h`. Reviewed By: LeeHowes Differential Revision: D17780995 fbshipit-source-id: 29580e780a4f8639c4247b9af38f47182fc000bb
-
Yedidya Feldblum authored
Summary: [Folly] Fix `GroupVarint.h` includes and preprocessor namespacing. * Always include everything rather than conditionally including things. * Namespace as `FOLLY_HAVE_GROUP_VARINT`. Reviewed By: LeeHowes Differential Revision: D17780999 fbshipit-source-id: 109fa38794e312e0c5eba0f5bfab56853df59c92
-
- 05 Oct, 2019 1 commit
-
-
Nikita Shulga authored
Summary: s/#if _WIN32/#ifdef _WIN32/ Reviewed By: Orvid Differential Revision: D17738798 fbshipit-source-id: cbfcf67c55b56a5e5453430d127acc3a7116814c
-
- 04 Oct, 2019 4 commits
-
-
Greg McGary authored
Summary: [ Extend D17527441 changes from F15MapTest into F14SetTest ] The current version of libc++ deallocates the existing capacity when calling operator=(initializer_list), even if the map is empty. This diff relaxes the expectations of F14's allocated memory tests (which fall back to the underlying STL std::unordered_map on some platforms) to accept this implementation. Reviewed By: yfeldblum Differential Revision: D17726849 fbshipit-source-id: 4757792a5aefe6d085b5d164ffe7b663f6078d9a
-
Zeyi (Rice) Fan authored
Summary: We are seeing random segment fault originating from OpenSSL on macOS when Mononoke fetching is enabled. The cause is that on macOS we are actually linking against libcurl shipped with the system instead of ours. That copy of libcurl is linked with macOS's libcrypto instead of the one we compiles during Eden's build, and it seems that version of libcrypto does not provide concurrency safety. The solution is to build curl on macOS and make sure it is linked to our OpenSSL that has the concurrency callbacks registered. Reviewed By: wez Differential Revision: D17657822 fbshipit-source-id: 85abdf3be10b3903a5efc6b3a91624c7258de790
-
Wez Furlong authored
Summary: This diff teaches the generated Github Actions configuration to copy the executable outputs from the leaf project into an artifacts dir, and then capture the artifacts in the build. This page has details on the artifacts mechanism used by Github Actions: https://github.com/actions/upload-artifact This page has the "Artifacts" link on the RHS where an example of the artifacts can be downloaded: https://github.com/facebook/watchman/pull/750/checks?check_run_id=244088199 Here's the actual download: https://github.com/facebook/watchman/suites/247296465/artifacts/74686 And here's what the inside of that zip file contains for the watchman build: ``` $ find . -ls 49685444 0 drwxr-xr-x 6 wez mygroup 192 Oct 1 18:50 . 49685487 16 -rw-r--r-- 1 wez mygroup 6148 Oct 1 18:51 ./.DS_Store 49685446 0 drwxr-xr-x 5 wez mygroup 160 Oct 1 18:51 ./mac 49685501 16 -rw-r--r-- 1 wez mygroup 6148 Oct 1 18:51 ./mac/.DS_Store 49685453 0 drwxr-xr-x 3 wez mygroup 96 Oct 1 18:50 ./mac/bin 49685455 5432 -rwxr-xr-x 1 wez mygroup 2778500 Oct 2 01:02 ./mac/bin/watchman 49685454 0 drwxr-xr-x 7 wez mygroup 224 Oct 1 18:50 ./mac/lib 49685457 296 -rwxr-xr-x 1 wez mygroup 149096 Oct 2 01:02 ./mac/lib/libgflags.2.2.dylib 49685460 1072 -rwxr-xr-x 1 wez mygroup 546348 Oct 2 01:02 ./mac/lib/libssl.1.1.dylib 49685459 272 -rwxr-xr-x 1 wez mygroup 135524 Oct 2 01:02 ./mac/lib/liblz4.1.dylib 49685458 352 -rwxr-xr-x 1 wez mygroup 176900 Oct 2 01:02 ./mac/lib/libglog.0.dylib 49685456 4888 -rwxr-xr-x 1 wez mygroup 2501012 Oct 2 01:02 ./mac/lib/libcrypto.1.1.dylib 49685445 0 drwxr-xr-x 5 wez mygroup 160 Oct 1 18:50 ./linux 49685486 16 -rw-r--r-- 1 wez mygroup 6148 Oct 1 18:50 ./linux/.DS_Store 49685448 0 drwxr-xr-x 3 wez mygroup 96 Oct 1 18:50 ./linux/bin 49685450 196264 -rwxr-xr-x 1 wez mygroup 100486648 Oct 2 01:16 ./linux/bin/watchman 49685449 0 drwxr-xr-x 4 wez mygroup 128 Oct 1 18:50 ./linux/lib 49685451 3864 -rwxr-xr-x 1 wez mygroup 1976888 Oct 2 01:16 ./linux/lib/libgflags.so.2.2 49685452 2208 -rwxr-xr-x 1 wez mygroup 1127336 Oct 2 01:16 ./linux/lib/libglog.so.0 49685447 0 drwxr-xr-x 4 wez mygroup 128 Oct 1 18:51 ./windows 49685513 16 -rw-r--r-- 1 wez mygroup 6148 Oct 1 18:51 ./windows/.DS_Store 49685461 0 drwxr-xr-x 5 wez mygroup 160 Oct 2 01:44 ./windows/bin 49685464 7880 -rwxr-xr-x 1 wez mygroup 4030976 Oct 2 01:44 ./windows/bin/watchman.exe 49685463 488 -rwxr-xr-x 1 wez mygroup 249856 Oct 2 01:44 ./windows/bin/glog.dll 49685462 544 -rwxr-xr-x 1 wez mygroup 278016 Oct 2 01:44 ./windows/bin/gflags.dll ``` The `main.yml` file was updated by running: ``` $ opensource/fbcode_builder/getdeps.py generate-github-actions --output-file watchman/.github/workflows/main.yml watchman ``` Pull Request resolved: https://github.com/facebook/watchman/pull/750 Test Plan: See description above Reviewed By: pkaush Differential Revision: D17705148 Pulled By: wez fbshipit-source-id: 4f3c466180f5a1cb9fa31a9b3b3f117876f8b89d
-
Nathan Bronson authored
Summary: Production-enabled assertions have shown value in detecting a variety of issues that should be impossible but are observed to occur. This diff adds some checks to F14 that may fail under some types of memory corruption, tag missearch, or hash miscomputation. Reviewed By: yfeldblum Differential Revision: D17739592 fbshipit-source-id: 92c9839ed5dab030350408d704a01c97573e3123
-