1. 10 Dec, 2019 2 commits
  2. 09 Dec, 2019 5 commits
    • Dan Melnic's avatar
      Add support for io_uring based EventBase backend · 59c0f069
      Dan Melnic authored
      Summary: Add support for io_uring based EventBase backend
      
      Reviewed By: kevin-vigor
      
      Differential Revision: D18682173
      
      fbshipit-source-id: d6e02879e2b493680caaa3097d75970d0b5d7d07
      59c0f069
    • Anirudh Ramachandran's avatar
      Track resumption status in HandshakeCallback · cfa22893
      Anirudh Ramachandran authored
      Summary: Helps test resumption failure/success in other tests that use AsyncSSLSocketTest classes.
      
      Reviewed By: mingtaoy
      
      Differential Revision: D18561383
      
      fbshipit-source-id: 29852ede80ecd59f662f536368ce2efe7d26745d
      cfa22893
    • Keith Birney's avatar
      Use consistent time_point in cascadeTimers · b5759618
      Keith Birney authored
      Summary: This fixes a timing issue that has been observed in rare cases under very heavy load.
      
      Differential Revision: D18875069
      
      fbshipit-source-id: cd47abfbd01c10e2568693f876dd3e6c2cb3bb24
      b5759618
    • Dan Melnic's avatar
      Add support for setting a zerocopy enable function · 564a32e6
      Dan Melnic authored
      Summary: Add support for setting a zerocopy enable function
      
      Reviewed By: kevin-vigor
      
      Differential Revision: D18579527
      
      fbshipit-source-id: dc3ab7bb13b26528bc964c7eb616517e444487a4
      564a32e6
    • Zoltán Gilián's avatar
      Always define FOLLY_HAS_COROUTINES · c7dd6097
      Zoltán Gilián authored
      Summary: To enable building with -Werror,-Wundef.
      
      Reviewed By: guangyfb
      
      Differential Revision: D18850905
      
      fbshipit-source-id: 95555781fec991eac119c95a6a6cd7751b5ba742
      c7dd6097
  3. 07 Dec, 2019 1 commit
  4. 06 Dec, 2019 5 commits
    • Pavlo Kushnir's avatar
      Make sure to not inline in runInMainContext · 435d9292
      Pavlo Kushnir authored
      Summary: Currently if compiler decides to inline fiber function, we'll end up allocating variables on fiber stack even though we use `runInMainContext`.
      
      Reviewed By: andriigrynenko
      
      Differential Revision: D18842065
      
      fbshipit-source-id: 847c4f95c44ef49f5c7537af878ca8340f2b7b16
      435d9292
    • Adam Simpkins's avatar
      write build output to a log file · c8fbe636
      Adam Simpkins authored
      Summary:
      Update the getdeps builders to save all command output to a log file in the
      build directory.  This makes it easier to go back after the fact and look at
      the config options selected by the build run.
      
      Reviewed By: wez
      
      Differential Revision: D18777059
      
      fbshipit-source-id: 86d3ffa48ec992fe90c59a3835e18f08310ed88c
      c8fbe636
    • Maged Michael's avatar
      SingleWriterFixedHashMap: Check for __cpp_lib_atomic_is_always_lock_free · 6aa52bcf
      Maged Michael authored
      Summary: Add check for `__cpp_lib_atomic_is_always_lock_free` for using `is_always_lock_free`.
      
      Reviewed By: davidtgoldblatt
      
      Differential Revision: D18827013
      
      fbshipit-source-id: 796d1ce3c279a807198897c092464dc3aff734e3
      6aa52bcf
    • Michael Lee (Engineering)'s avatar
      Remove direct include of `folly/folly-config.h` · 1cab1488
      Michael Lee (Engineering) authored
      Summary: `folly/portability/Config.h` serves this purpose now. Clean up references
      
      Reviewed By: Orvid
      
      Differential Revision: D18800127
      
      fbshipit-source-id: 8e1300af74d63f028b83f5e2d8963a674e77e573
      1cab1488
    • Lukas Piatkowski's avatar
      rust toolchain: use RUSTC_BOOTSTRAP when building · 0ca48e95
      Lukas Piatkowski authored
      Reviewed By: mitrandir77
      
      Differential Revision: D18850917
      
      fbshipit-source-id: f211dfbfadf4b5b0cb372cf8aeb9a232c4b3a739
      0ca48e95
  5. 05 Dec, 2019 6 commits
  6. 04 Dec, 2019 12 commits
    • Yedidya Feldblum's avatar
      Let ElfFile open functions take Options · 4462a7f0
      Yedidya Feldblum authored
      Summary:
      [Folly] Let `ElfFile` open functions take a single builder-style composite `Options` argument v.s. taking a sequence of individual arguments one for each option.
      
      Right now there is only one option but it is possible to add more in the future.
      
      While here, rename and invert `readOnly` to `writable`.
      
      Reviewed By: vitaut
      
      Differential Revision: D18740699
      
      fbshipit-source-id: 6fb016f731bf46a1b4ac6b2efcea739f6261818a
      4462a7f0
    • Andrii Grynenko's avatar
      MasterPtr · 8871fd42
      Andrii Grynenko authored
      Summary: Shared-ptr, which should be explicitly joined and waits for all other instances to be destroyed.
      
      Reviewed By: spalamarchuk
      
      Differential Revision: D18696536
      
      fbshipit-source-id: 9d7b0b960a00095be7df033680c7a116c358637c
      8871fd42
    • Yedidya Feldblum's avatar
      Let co_invoke be a CPO · fac0cb2b
      Yedidya Feldblum authored
      Summary: [Folly] Implement `co_invoke` as a generic CPO with customizations found via ADL.
      
      Reviewed By: lewissbaker
      
      Differential Revision: D18753006
      
      fbshipit-source-id: 16239f0bd6140f56bd23effbf092f2b8279c1350
      fac0cb2b
    • Subodh Iyengar's avatar
      use recvmsg on client · d4446668
      Subodh Iyengar authored
      Summary:
      Use the new recvmsg api on the client to receive a packet
      from AsyncUDPSocket
      
      Reviewed By: mjoras
      
      Differential Revision: D18797963
      
      fbshipit-source-id: 319d5c41f3a868e7b78947fdbcf2c411b6d7fbf0
      d4446668
    • Subodh Iyengar's avatar
      Add notification read callbacks to AsyncUDPSocket · a3af6255
      Subodh Iyengar authored
      Summary:
      Add a mode to read callback which only notifies but does not call getReadBuffer.
      
      This also adds a readmsg api for notification callbacks to invoke
      
      This is useful for callbacks that want to perform their own logic of reading from the socket, for example
      a callback might want to perform multiple read calls per callback to save on CPU of epoll
      
      Differential Revision: D18797964
      
      fbshipit-source-id: 86bf1553078a20ea16f56f0c404887fca5050065
      a3af6255
    • Dan Melnic's avatar
      Add support for multiple EventBase backends · e0a9c732
      Dan Melnic authored
      Summary: Add support for multiple EventBase backends
      
      Reviewed By: simpkins, mjoras
      
      Differential Revision: D16157574
      
      fbshipit-source-id: 915c3f08cac5673b5c4ca52a661b41b8a228df75
      e0a9c732
    • Michael Lee (Engineering)'s avatar
      Add @manual annotation to bsd header · c0e397b2
      Michael Lee (Engineering) authored
      Summary: Mark the header as it is not a header provided by folly
      
      Reviewed By: yfeldblum
      
      Differential Revision: D18800770
      
      fbshipit-source-id: 95c9dcdeb6f4b745f0bce859e4d9669c009c353a
      c0e397b2
    • Swaroop Manjunath's avatar
      Populate skip pointers up to universe upper bound instead of last value. · 02784cf2
      Swaroop Manjunath authored
      Summary:
      This diff introduces the following changes:
      
      - EliasFano encoding populates all skip pointers between last value and the universeUpperBound.
      
      Reviewed By: ot, philippv
      
      Differential Revision: D18734361
      
      fbshipit-source-id: 2451614ff99dca22f0247cb572542f8cadc97b6f
      02784cf2
    • Lukas Piatkowski's avatar
      rust-shed: change the workspace member definition to point to the newly moved project directories · 2b647dff
      Lukas Piatkowski authored
      Summary: The projects have been moved to a "shed/" subdirectory, so the root Cargo.toml with workspace has to be adjusted to that move.
      
      Reviewed By: farnz
      
      Differential Revision: D18807189
      
      fbshipit-source-id: 0fd66fa7edd38ab4fdf905872f38fac57ae0230e
      2b647dff
    • Adam Simpkins's avatar
      getdeps: add an install_fb_python_executable() function to the CMake utilities · 7d9a4c55
      Adam Simpkins authored
      Summary:
      Add a `install_fb_python_executable()` function to `FBPythonBinary.cmake` for
      helping to install python executables generated with
      `add_fb_python_executable()`.  This primarily helps by automatically looking
      up the correct output file to install from the generated targets.
      
      Reviewed By: wez
      
      Differential Revision: D18774539
      
      fbshipit-source-id: 4b397580d72ac448f21d1db6d2cdd653cf3635df
      7d9a4c55
    • Orvid King's avatar
      Remove dead includes in folly/gen · f47108d3
      Orvid King authored
      Reviewed By: yfeldblum
      
      Differential Revision: D18780743
      
      fbshipit-source-id: 5b26163f5dabcb14fd9ad7b4d9489d3ca1f6df0d
      f47108d3
    • Maged Michael's avatar
      Request context: Add hazard pointer-based implementation · 6472b9cb
      Maged Michael authored
      Summary:
      Add hazard-pointer-based implementation to allow concurrent reading during updates. This is done by using lightweight concurrent structures protected by hazard pointers instead of sequential structures protected by read locks.
      
      The implementation is gated by a gflag that is off by default.
      
      Reviewed By: davidtgoldblatt
      
      Differential Revision: D18622072
      
      fbshipit-source-id: 120ba14a7a559883e64a3fdf81b35a26315312c1
      6472b9cb
  7. 03 Dec, 2019 9 commits
    • Wez Furlong's avatar
      getdeps: rocksdb: don't enable -Werror · 1cb1d800
      Wez Furlong authored
      Summary:
      It's impossible for a consumer of a released version of
      rocksdb to do anything about this except not use it, and this particular
      version of rocksdb ships with a number of shadow warnings.
      
      Disable warning to error promotion.
      
      See also: https://twitter.com/pcwalton/status/1201679307552083968
      
      Reviewed By: chadaustin
      
      Differential Revision: D18785637
      
      fbshipit-source-id: 1db2b00b3c397d6c0b8f05b9d1c658877685c961
      1cb1d800
    • Julien Verlaguet's avatar
      Update README.md (#1268) · 10191f96
      Julien Verlaguet authored
      Summary:
      I tried building on a fresh docker image ubuntu:16.04, the current setup doesn't work because libunwind-dev is missing. Adding this fixed the problem for me.
      Pull Request resolved: https://github.com/facebook/folly/pull/1268
      
      Reviewed By: Orvid
      
      Differential Revision: D18759832
      
      Pulled By: yfeldblum
      
      fbshipit-source-id: 8a861844e0b4687bf0107553274322954fdc1c00
      10191f96
    • Igor Sugak's avatar
      add FOLLY_SANITIZE_MEMORY macro · e8887cf1
      Igor Sugak authored
      Summary: Similar to other sanitizer macros add one for memory sanitizer.
      
      Reviewed By: pixelb
      
      Differential Revision: D18662903
      
      fbshipit-source-id: aa62dfedbfd1b174403af451e14ace9896b26466
      e8887cf1
    • Ahmed Soliman's avatar
      Add building bdist_wheel as part of the python build for folly · 2501b652
      Ahmed Soliman authored
      Summary: As per title
      
      Reviewed By: MohamedBassem
      
      Differential Revision: D18781525
      
      fbshipit-source-id: a23d8207bd3776b55ba42ec87598a0a9375848aa
      2501b652
    • Eric Niebler's avatar
      Don't cast function call result to void as it can hide nodiscard warnings · bdc1476f
      Eric Niebler authored
      Summary:
      When assigning a function whose return type is marked `nodiscard` to a `Function<void(Args...)>`, the fact that we are internally explicitly casting the result of the function call to `void` hides the `nodiscard` warning.
      
      For instance:
      
      ```
      struct [[nodiscard]] DoNotIgnore {};
      Function<void()> fn = [] { return DoNotIgnore{}; };
      ```
      
      emits no warnings, and when `fn()` is invoked, the `DoNotIgnore` struct gets silently ignored.
      
      This diff causes the warning to be emitted.
      
      It is only enabled on compilers that support `if constexpr`. It could be supported on more compilers at the cost of one or more of the following:
      
      * extra template instantiations
      * an additional function dispatch
      * SFINAE
      * Spamming out 4 more specializations of the `FunctionTraits` template.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D18668177
      
      fbshipit-source-id: 0a2cd1366855a0582ab27bb157998d3a4bf4e5a0
      bdc1476f
    • Alex Chow's avatar
      Add SSLContext constructor to directly wrap an SSL_CTX* · eaeaa1fa
      Alex Chow authored
      Summary: Provides a way to transition to folly::AsyncSSLSocket for applications that manage their own SSL_CTX
      
      Reviewed By: yfeldblum
      
      Differential Revision: D18625198
      
      fbshipit-source-id: cae8c531203134bbb27b648f3f92a6794b14ea3c
      eaeaa1fa
    • Shrikrishna Khare's avatar
      fbcode_builder: getdeps: fboss: OpenBCM depends on git-lfs · b0ec3021
      Shrikrishna Khare authored
      Summary:
      OpenBCM libraries are stored with git LFS. As a result, fetcher fetches LFS pointers and not the contents. Use git-lfs to pull the real contents before copying to install dir using NoopBuilder.
      In future, if more builders require git-lfs, we would consider installing
      git-lfs as part of the sandcastle infra as against repeating similar
       logic for each builder that requires git-lfs.
      
      Reviewed By: wez
      
      Differential Revision: D18759806
      
      fbshipit-source-id: f988a0460107bc0685e7aba107daba9ed88f71e7
      b0ec3021
    • Shrikrishna Khare's avatar
      fbcode_builder: getdeps: fboss: add git-lfs fetcher · bbe672fe
      Shrikrishna Khare authored
      Summary:
      As titled. This is needed by OpenBCM, and in future, possibly by other
      manifests as well.
      
      Reviewed By: wez
      
      Differential Revision: D18759807
      
      fbshipit-source-id: d445dfa382cea4bf96443ab9889926a4abbf0757
      bbe672fe
    • Matt Ma's avatar
      folly/experimental/symbolizer: symbolize inlined functions · 380c720b
      Matt Ma authored
      Summary:
      The previous approach (D16760775) reserved space for inlined function info in each `SymbolizedFrame`.
      
      ```
      struct SymbolizedFrame {
        Dwarf::LocationInfo location;
        Dwarf::LocationInfo inlineLocations[Dwarf::kMaxLocationInfoPerFrame];
        ...
      ```
      
      That increased the size of `SymbolizedFrame` and `FrameArray` and lead to stack overflow in some already deep stacks.
      ```
      template <size_t N>
      struct FrameArray {
        FrameArray() {}
      
        size_t frameCount = 0;
        uintptr_t addresses[N];
        SymbolizedFrame frames[N];
      };
      ```
      
      To avoid allocate more space on stack, changed to use extra frames to store inline calls:
      - Usually the callers allocate `FrameArray<100>` frames, but the stack trace is usually smaller than 100
      - Use the unused slots to fill in inlined function info:
       -- each function gets at most `kMaxLocationInfoPerFrame` (currently 3) inlined entries
       -- when the available buffer fills up no more inlined functions are filled in.
      
      To find the inline calling stack, we need first need to find the subprogram Debug Info Entry (with tag DW_TAG_subprogram) with the given address, then recursively find all the inline subroutines (with tag DW_TAG_inlined_subroutine) in the call stack. Sadly debug info has no index we can use for jump, and a linear search over debug info entries (and their attributes) is needed during the process, which would cause performance regression.
      
      ```
      buck run mode/opt folly/experimental/symbolizer/test:dwarf_benchmark -- --benchmark
      
      ============================================================================
      folly/experimental/symbolizer/test/DwarfBenchmark.cpprelative  time/iter  iters/s
      ============================================================================
      DwarfFindAddressFast                                         4.03us  248.36K
      DwarfFindAddressFull                                         4.03us  248.18K
      DwarfFindAddressFullWithInline                             293.23us    3.41K
      ============================================================================
      ```
      
      Reviewed By: luciang
      
      Differential Revision: D17586385
      
      fbshipit-source-id: 1b84b3f3a576573ce24092b433a501a3bdf76be0
      380c720b