1. 16 Dec, 2019 1 commit
    • Lee Howes's avatar
      Add tracing to global executors · 791f7028
      Lee Howes authored
      Summary: Integrate calls into logging framework to allow tracking of source and use of the global executor.
      
      Reviewed By: andriigrynenko
      
      Differential Revision: D18232728
      
      fbshipit-source-id: e714b870cc041af9c99a95baf8f32c3819852b37
      791f7028
  2. 14 Dec, 2019 3 commits
    • Lee Howes's avatar
      Add logging for calls to Future::via · 1bea6f2f
      Lee Howes authored
      Summary: Adds sampled logging to track executors passed to Future::via.
      
      Reviewed By: andriigrynenko
      
      Differential Revision: D18233242
      
      fbshipit-source-id: b5c004f643261a36fd0b63fb6e033263ece1662f
      1bea6f2f
    • Igor Sugak's avatar
      use portability/GFlags.h · f6ac9ac1
      Igor Sugak authored
      Reviewed By: Orvid
      
      Differential Revision: D19053964
      
      fbshipit-source-id: dd31937cbeb3c7ef202e4b91c1b153f849376bdf
      f6ac9ac1
    • Yedidya Feldblum's avatar
      Prefer TEST_F in folly/experimental/coro/ · c9228053
      Yedidya Feldblum authored
      Summary: [Folly] Prefer `TEST_F` and tests named `...Test` in `folly/experimental/coro/`.
      
      Reviewed By: lewissbaker
      
      Differential Revision: D18746584
      
      fbshipit-source-id: 49156a1dca5ef115bf12add5ceb38cb7905fac3d
      c9228053
  3. 13 Dec, 2019 7 commits
    • Igor Sugak's avatar
      add missing gflags/gflags.h · f044ae2a
      Igor Sugak authored
      Summary: These files fail to build when a different version of glog is used. Notice that both cpp files use gflags but don't include its header.
      
      Reviewed By: pixelb
      
      Differential Revision: D18974446
      
      fbshipit-source-id: 4cfaa6dc62c795f4fe7f6624f078cffe550ecfec
      f044ae2a
    • Felix Handte's avatar
      Fix Zstd-less Build with Macro Guards · 3673c2eb
      Felix Handte authored
      Summary:
      D18890515 broke folly builds when zstd isn't present. (My bad!!)
      
      This should fix it.
      
      Reviewed By: lukaspiatkowski
      
      Differential Revision: D19029293
      
      fbshipit-source-id: 2ede5a8402e60af61a294c9db35ca15dffdf4c49
      3673c2eb
    • Sushil Patil's avatar
      Replacing `folly::AtomicBitset<N>` with `folly::ConcurrentBitSet<N>` · f296a1d0
      Sushil Patil authored
      Summary:
      `folly::AtomicBitSet<N>` used `N` to denote the number of blocks
      (32-bit or 64-bit each) instead of number of bits as used by
      `std::bitset`. This confusion of unit led to unintentional allocation
      of extra storage in many cases.
      
      A simple fix would be to make `N` denote number of bits. However,
      changing meaning of `N`could lead to silent breakage of code during
      run time for some users who used `N` to denote number of blocks.
      
      Therefore, to make the new meaning of `N` more explicit,
      `AtomicBitSet` is renamed to `ConcurrentBitSet` & `N` now denotes the
      number of bits.
      
      Reviewed By: al13n321
      
      Differential Revision: D18866751
      
      fbshipit-source-id: 17741646862776e1a080eaac7877f495bb56b656
      f296a1d0
    • Andrii Grynenko's avatar
      Remove unused fields from ThreadEntry · 73ccc053
      Andrii Grynenko authored
      Differential Revision: D19001755
      
      fbshipit-source-id: bda1a278017059e83c9a529aac7b429f074e42c1
      73ccc053
    • Misha Shneerson's avatar
      Store tid in ThreadEntry · cf08fcf6
      Misha Shneerson authored
      Summary: We should be able to associate rootId with the TID the request is running on.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D18918492
      
      fbshipit-source-id: 539cd78729b438928a9a4b0c93e8e17295b642d5
      cf08fcf6
    • Misha Shneerson's avatar
      access pointers folly::RequestContext currently running on all threads in the process · 6340be13
      Misha Shneerson authored
      Summary:
      What:
      exposed an API `folly::RequestContext::getRootsFromAllThreads` that reports all "root" RequestContexts for all threads in the process.
      (where "root" is defined as the original RequestContext created for the request but which might have been overridden with `ShallowCopyRequestContextScopeGuard)`
      
      Reviewed By: andriigrynenko
      
      Differential Revision: D18849187
      
      fbshipit-source-id: f3c67becf1e38fb8d2198c81ed0ce77bac860d63
      6340be13
    • Andrii Vasylevskyi's avatar
      More folly wasm32 #if's · ee040cb8
      Andrii Vasylevskyi authored
      Summary:
      Fixing couple more failures in folly when compiling wasm:
      1) making posix_memalign used instead of memalign (wasi-libc has memlaign as legacy P123789170)
      2) disabling clearenv() that is using environ, which wasi-libc has off by ```#ifdef _GNU_SOURCE```, not sure why, but it's already off for linux and we won't use it our wasm code either.
      
      Reviewed By: shodoco
      
      Differential Revision: D18944271
      
      fbshipit-source-id: ffa838591ada1248fdb8ae24f7eac45896a311e2
      ee040cb8
  4. 12 Dec, 2019 3 commits
    • Felix Handte's avatar
      Introduce Singleton Context Pools for Zstd Contexts · 11c10340
      Felix Handte authored
      Summary:
      This is intentionally not hidden in `folly/compression/Zstd.cpp`, so that it
      can be used by other Zstd users as well.
      
      Reviewed By: bimbashrestha
      
      Differential Revision: D18890515
      
      fbshipit-source-id: e87eb6acd03f4b4d5f68201ef924984047d0160e
      11c10340
    • Felix Handte's avatar
      Move the CompressionCoreLocalContextPool to Folly · 7897d0e4
      Felix Handte authored
      Summary:
      This reduces contention on the synchronized stack in the
      `CompressionContextPool`, as well as potentially helping cache locality under
      heavy compression workloads.
      
      I have plans to make a singleton of this, and to use it in `folly::io::Codec`
      and some other places, so they all use the same contexts.
      
      Reviewed By: bimbashrestha
      
      Differential Revision: D18863824
      
      fbshipit-source-id: 63c2f3dd0abe0aa4c88350767e9e77acb763c9a5
      7897d0e4
    • Giuseppe Ottaviano's avatar
      Round-trip iteration order for F14Vector{Map,Set} · 594f4d72
      Giuseppe Ottaviano authored
      Summary: `F14Vector{Map,Set}` have specified iteration order: inverse insertion order. When serialized, however, the order does not round-trip (in fact, it flips). This diff introduces an extension point to specify the iteration order for serialization, and it specializes it for F14 to make the iteration order round-trip.
      
      Reviewed By: vitaut
      
      Differential Revision: D17108774
      
      fbshipit-source-id: 466b746baacff861242729bfa62447c138094cee
      594f4d72
  5. 11 Dec, 2019 2 commits
  6. 10 Dec, 2019 3 commits
    • Lee Howes's avatar
      Add weak symbol-based async logging calls · 4427c1a8
      Lee Howes authored
      Summary: Stub interface for logging functions to integrate with the GlobalExecutor and Futures.
      
      Reviewed By: andriigrynenko
      
      Differential Revision: D18229089
      
      fbshipit-source-id: ad57de08a8bd6a80e2d0af9a9792de86a8267176
      4427c1a8
    • Lukasz Piatkowski's avatar
      Fixes for travic CI build (#3) · 1e3cb828
      Lukasz Piatkowski authored
      Summary:
      This should fix the Travis CI builds. It adds rust toolchain support inside docker and sets the required THRIFT env variable.
      Pull Request resolved: https://github.com/facebookexperimental/rust-shed/pull/3
      
      Reviewed By: krallin
      
      Differential Revision: D18905608
      
      Pulled By: lukaspiatkowski
      
      fbshipit-source-id: 5db1eff6f215a6617d8acaa0c99a62d45225956b
      1e3cb828
    • Yedidya Feldblum's avatar
      Helper variable templates for tuple applicability traits · b221a6b5
      Yedidya Feldblum authored
      Summary: [Folly] Helper variable templates for tuple applicability traits: `is_applicable_v`, `is_applicable_r_v`, `is_nothrow_applicable_v`, `is_nothrow_applicable_r_v`.
      
      Reviewed By: lewissbaker
      
      Differential Revision: D18746853
      
      fbshipit-source-id: 9d01b24030f95ab5b4963660dc4ef471b5e0ad02
      b221a6b5
  7. 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
  8. 07 Dec, 2019 1 commit
  9. 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
  10. 05 Dec, 2019 6 commits
  11. 04 Dec, 2019 4 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