1. 24 Jan, 2021 2 commits
  2. 22 Jan, 2021 4 commits
  3. 21 Jan, 2021 7 commits
    • Niles Rogoff's avatar
      Retry bistro tests up to 5 times · e3400d87
      Niles Rogoff authored
      Differential Revision: D25985696
      
      fbshipit-source-id: 52ede8dc494f8bf1991dbfed455fbc6bbba83d87
      e3400d87
    • Orvid King's avatar
      Guard call to weak __asan_region_is_poisoned properly · 5b44809e
      Orvid King authored
      Summary:
      It wasn't guarded at all, which is causing issues for non-sanitizer builds on platforms without shared library support.
      
      Ref: https://github.com/facebook/folly/issues/1507
      
      Reviewed By: meyering
      
      Differential Revision: D25970872
      
      fbshipit-source-id: f710e752fdf8ebc5529314d335f4559e690b787a
      5b44809e
    • Victor Zverovich's avatar
      Reduce binary size via format string compilation · 66f614d7
      Victor Zverovich authored
      Summary: Switch to format string compilation to prevent pulling in too many symbols from the {fmt} library into `folly/detail:ip_address`. This change saves ~64k (fixed cost) in opt mode compared to the current master or ~36k compared to the old code using Folly Format. This doesn't matter for server projects especially since {fmt} will likely be linked anyway but matters for some mobile ones.
      
      Reviewed By: Orvid
      
      Differential Revision: D25904078
      
      fbshipit-source-id: 56473cf9bf4456a3cb3c5aa375c16393e144b6e1
      66f614d7
    • Udip Pant's avatar
      update to libbpf-0.3 in getdeps · 7ba43ce3
      Udip Pant authored
      Summary: Allows us to use new APIs in libbpf
      
      Reviewed By: anakryiko
      
      Differential Revision: D25933787
      
      fbshipit-source-id: f0988caae351760b814eba74f6f716db51f728bd
      7ba43ce3
    • Adam Simpkins's avatar
      update EXPECT_THROW_RE() to accept the pattern as a string_view · 9c9f1d2d
      Adam Simpkins authored
      Summary:
      Previously the `EXPECT_THROW_RE()` macro required the regular expression be
      passed in as a `const char*`.  This updates the code to accept a
      `std::string_view` instead.
      
      This allows the API to accept either `const char*` arguments, `std::string`,
      or `std::string_view` objects.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D25837542
      
      fbshipit-source-id: e6fb00034046ad7f2810367f946f0135858ed065
      9c9f1d2d
    • Dan Melnic's avatar
      Handle values different from pending_ · 59b47473
      Dan Melnic authored
      Summary: Handle values different from pending_
      
      Reviewed By: kevin-vigor
      
      Differential Revision: D25968014
      
      fbshipit-source-id: fd70dd6339d02a6325b237e6c9401d8962b17b51
      59b47473
    • Xiao Shi's avatar
      fix inline asm syntax on MSVC · 3fa09cb1
      Xiao Shi authored
      Summary:
      This diff moves the gdb related test into `folly/support/test` (as opposed to
      `tests`) so that CMake rules
      [here](https://github.com/facebook/folly/blob/194b7732bd65d56b4afb58b6d9e411c1b014b3e3/CMakeLists.txt#L155)
      will exclude these files from OSS library builds--also to maintain consistency
      with other test folder names under folly.
      
      I still separated out the auto gdb breakpoint functionality into GdbUtil.h so
      that if MSVC users want to manually compile and use the gdb script tests, they
      have the option to do so.
      
      Re: asm syntax on MSVC:
      https://gcc.godbolt.org/z/1rMh4v
      
      Fixes #1515.
      
      Reviewed By: Orvid
      
      Differential Revision: D25947735
      
      fbshipit-source-id: 97e75e972fcf8eea280df804c98c400f03c37496
      3fa09cb1
  4. 20 Jan, 2021 2 commits
    • Pedro Eugenio Rocha Pedreira's avatar
      Add protobuf manifest · f184a28f
      Pedro Eugenio Rocha Pedreira authored
      Summary: Adding protobuf manifest, which will be used to compile f4d/velox.
      
      Reviewed By: spershin
      
      Differential Revision: D25926384
      
      fbshipit-source-id: 08a2dffc9e9baa0d393e5f648ce99ca032a9df5f
      f184a28f
    • Pedro Eugenio Rocha Pedreira's avatar
      Add lzo manifest · 266ecae7
      Pedro Eugenio Rocha Pedreira authored
      Summary: Adding lzo manifest, which will be used by f4d/velox
      
      Reviewed By: amitkdutta
      
      Differential Revision: D25926434
      
      fbshipit-source-id: 4d7efe5eba7cdca1f682fbd4cfd6ff0337ce7c19
      266ecae7
  5. 19 Jan, 2021 1 commit
    • Stepan Palamarchuk's avatar
      Fix bug with calling addTaskEager from another FiberManager · bc4e31a8
      Stepan Palamarchuk authored
      Summary:
      The current code is calling `runInMainContext` on the FiberManager that we're scheduling to, which will do nothing if we're calling it from another fiber manager. This will assume fiber stack as a main stack which is incorrect.
      
      This diff fixes it to call `folly::fibers::runInMainContext` that would properly call `runInMainContext` on the active FiberManager.
      
      Reviewed By: andriigrynenko
      
      Differential Revision: D25116215
      
      fbshipit-source-id: 1d13f436a0599c077e7531dc1fe75f3a143e3478
      bc4e31a8
  6. 16 Jan, 2021 1 commit
    • Giuseppe Ottaviano's avatar
      Simplify ThreadedExecutor · 194b7732
      Giuseppe Ottaviano authored
      Summary: The implementation doesn't need explicit locking or condition variables, everything can be done with a single concurrent queue.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D25919429
      
      fbshipit-source-id: a2b1e6332305174ba41d02fd79d9525a12b82218
      194b7732
  7. 15 Jan, 2021 3 commits
    • Giuseppe Ottaviano's avatar
      Handle task exceptions in ThreadedExecutor · 6a6ea7ca
      Giuseppe Ottaviano authored
      Summary: Make it consistent with the other executors.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D25926045
      
      fbshipit-source-id: ad2f101fbba918fe2a421e394870bf67c0a044b9
      6a6ea7ca
    • Xiao Shi's avatar
      move folly gdb pretty printers to OSS repo · 118e9141
      Xiao Shi authored
      Summary: As title, move gdb pretty printers from internal repo to OSS repo
      
      Reviewed By: yfeldblum
      
      Differential Revision: D25684325
      
      fbshipit-source-id: b7999dee1379801ee68553de64f16ac4db78b174
      118e9141
    • Niles Rogoff's avatar
      Migrate bistro to getdeps · 63154657
      Niles Rogoff authored
      Summary:
      This took a lot of cmake fuckery. I am guessing it will break the current travis-ci.org based build, since it no longer downloads gflags.
      
      As I put this diff up, mvfst (a dependency of quic (a dependency of proxygen)) is not building right now due to another diff - a fix is in progress but isn't landed yet. I applied the fix locally for the test plan, but didn't include it in the diff.
      
      Reviewed By: snarkmaster
      
      Differential Revision: D25651851
      
      fbshipit-source-id: b4f15ac7fa5293123710fe367c20d355c0970c42
      63154657
  8. 14 Jan, 2021 1 commit
    • Pranjal Raihan's avatar
      Allow using unused MicroLock slots as data · 3d7f331c
      Pranjal Raihan authored
      Summary: `folly::MicroLock` is actually 4 locks, each using 2 bits. In cases we don't need all the slots, we can use the other bits to store some data which is loaded/stored atomically with locking and unlocking. There is no change in existing `MicroLock` usage behavior.
      
      Reviewed By: davidtgoldblatt
      
      Differential Revision: D25842148
      
      fbshipit-source-id: 5f6ff705c35529d279629ccc256a9c210907ea5c
      3d7f331c
  9. 13 Jan, 2021 3 commits
    • Pranjal Raihan's avatar
      Fix wrong method name in DelayedInit documentation · 9d8cc918
      Pranjal Raihan authored
      Summary: This was forgotten in a refactor.
      
      Reviewed By: Mizuchi
      
      Differential Revision: D25903164
      
      fbshipit-source-id: 419131987a886f0d8d057b5b04b012d1162e564d
      9d8cc918
    • Pedro Eugenio Rocha Pedreira's avatar
      Add support for `extra_cmake_defines` · 25ce99fc
      Pedro Eugenio Rocha Pedreira authored
      Summary:
      `extra_cmake_defines` are extra flags that are passed to cmake when
      compiling each one of the dependencies. For instance:
      ```
      $ ./opensource/fbcode_builder/getdeps.py  build f4d --extra-cmake-define='{"CMAKE_CXX_FLAGS": "-mavx2 -mfma -mavx -mf16c -march=native"}'
      ```
      It takes a json map as input, which can take a list of defines (key value
      pairs).
      
      Reviewed By: wez
      
      Differential Revision: D25855781
      
      fbshipit-source-id: 7f4fef2c66f4d12f23c8d7086d6a4f24fcc01ff7
      25ce99fc
    • Michael Park's avatar
      Fix eagerness bug in FOLLY_CREATE_STATIC_MEMBER_INVOKER · 6bc74fbd
      Michael Park authored
      Summary:
      This patch performs SFINAE-friendly invocation in `FOLLY_CREATE_STATIC_MEMBER_INVOKER` in order for invocability tests to return `false` in the situation where the member is not even available. For example, given:
      ```
      FOLLY_CREATE_STATIC_MEMBER_INVOKER(foo_invoker, foo);
      ```
      With this diff, something like `std::is_invocable_v<foo_invoker, HasNoFoo>` yields `false` rather than a compilation error.
      This brings `FOLLY_CREATE_STATIC_MEMBER_INVOKER` in line with `FOLLY_CREATE_FREE_INVOKER` and `FOLLY_CREATE_MEMBER_INVOKER`.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D25878262
      
      fbshipit-source-id: 150ae6b2c71941317bc02de20720fed014639bf5
      6bc74fbd
  10. 12 Jan, 2021 6 commits
    • Pranjal Raihan's avatar
      Use DelayedInit for SimpleObservable · 69ab6ff9
      Pranjal Raihan authored
      Summary: The lazy initialization logic can now be simplified.
      
      Reviewed By: andriigrynenko
      
      Differential Revision: D25675031
      
      fbshipit-source-id: 048328220a2b02c13a672bebe47b79521d5f5e7a
      69ab6ff9
    • Pranjal Raihan's avatar
      DelayedInit · 56d1379c
      Pranjal Raihan authored
      Summary: `folly::DelayedInit` serves a similar use case to `folly::Lazy` but is suitable for data members and is thread-safe. The summary in `DelayedInit.h` provides a good overview.
      
      Reviewed By: andriigrynenko
      
      Differential Revision: D25671587
      
      fbshipit-source-id: 1933b15fdc7207a52067658188ca4d5724d9c40b
      56d1379c
    • Victor Zverovich's avatar
      Migrate from Folly Format to fmt · 5295ccef
      Victor Zverovich authored
      Summary: Migrate a couple of uses of Folly Format to fmt.
      
      Reviewed By: simpkins
      
      Differential Revision: D20152350
      
      fbshipit-source-id: fb9798f5ff458ee03e1c01f839dc1c55796d0eaa
      5295ccef
    • Yinan Zhang's avatar
      Add a caching utility for mallctl · 99728475
      Yinan Zhang authored
      Summary:
      This utility is meant for usage cases where
      - the same `mallctl` command is called many times, and
      - performance is important.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D23638723
      
      fbshipit-source-id: 6cab9acb1121ef4f46bf7acbe29d3877005b66b1
      99728475
    • Alfred Fuller's avatar
      Fix include order and grouping in folly - 12/13 · 325e3951
      Alfred Fuller authored
      Summary: All changes were automated
      
      Reviewed By: Orvid
      
      Differential Revision: D25507587
      
      fbshipit-source-id: fe757e6919793e9b8b28d6c1ce6f064d7e2623fb
      325e3951
    • Pranav Thulasiram Bhat's avatar
      Fix race condition in loop destruction · 8df00ddc
      Pranav Thulasiram Bhat authored
      Summary:
      See docblock in new test. If the FiberManager weakref is created after the AsyncioExecutor weakref, then the native FiberManager object may be destroyed without being drained.
      
      Unfortunately, there's no way to enforce an ordering between the destructors here (since weakrefs are cleaned up in inverse order of creation).
      
      This diff adds a `__dealloc__` method to AsyncioExecutor to drain the native FiberManager
      
      Reviewed By: yfeldblum
      
      Differential Revision: D25797920
      
      fbshipit-source-id: d1a548ebd67e7d9153eb43b169bf009a6a986e68
      8df00ddc
  11. 11 Jan, 2021 3 commits
    • Shai Szulanski's avatar
      Rename Try::throwIfFailed -> throwUnlessValue · a74807f5
      Shai Szulanski authored
      Summary: Update name to match usage of Try as tri-state, since this method also throws if the Try is empty
      
      Reviewed By: yfeldblum
      
      Differential Revision: D25737810
      
      fbshipit-source-id: a4166153362f07353d212216fbaf7105867eef2a
      a74807f5
    • Yedidya Feldblum's avatar
      tweak is_coroutine_handle detail trait · 8d485aeb
      Yedidya Feldblum authored
      Summary: Tweak `is_coroutine_handle` detail trait. No need for leading `_` and let it be a trait variable.
      
      Reviewed By: iahs
      
      Differential Revision: D25864424
      
      fbshipit-source-id: 2f0723fcb3c97c6a0972056999f1d9574695c30b
      8d485aeb
    • Andrii Grynenko's avatar
      Fix Timekeeper.executor test · f07bb93a
      Andrii Grynenko authored
      Summary:
      1. Patch the test to remove racy behavior
      2. Added another test for a case where the timeout is hit.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D25854609
      
      fbshipit-source-id: c1694e5b46b9645dc3e71a12ddc8ed12e8cf270c
      f07bb93a
  12. 10 Jan, 2021 2 commits
    • Dan Melnic's avatar
      Fix typo · 12bcb6a9
      Dan Melnic authored
      Summary: Fix typo
      
      Reviewed By: yfeldblum
      
      Differential Revision: D25861463
      
      fbshipit-source-id: c24a521572229cbc5892a4da10999dcff94741c7
      12bcb6a9
    • Andres Suarez's avatar
      Apply clang-format update fixes · 4dab0948
      Andres Suarez authored
      Reviewed By: igorsugak
      
      Differential Revision: D25849195
      
      fbshipit-source-id: 611df723a38b5c2a7ba5184c63fdeeed1ed27025
      4dab0948
  13. 09 Jan, 2021 5 commits
    • Chang Kyu Lee's avatar
      ConcurrentHashMap: Add reserve test · d22ff006
      Chang Kyu Lee authored
      Summary: Adds a test for ConcurrentHashMap::reserve().
      
      Reviewed By: magedm
      
      Differential Revision: D25853643
      
      fbshipit-source-id: 39404105c88d6dc38cdd0b399c646affad1b26e0
      d22ff006
    • Maged Michael's avatar
      ConcurrentHashMap: Rehash only when expanding · ed6fa93c
      Maged Michael authored
      Summary:
      Fixes a bug when a call to reserve leads to calling rehash with a buck_count value that is not a power of two and/or less than the current count.
      The rehash algorithm depends on the bucket_count being a power of two and that the count does not decrease.
      
      The fix: Ensure that reserve calls rehash with a power of two argument and that rehash is skipped if the new count is not greater than the old one.
      
      Reviewed By: davidtgoldblatt
      
      Differential Revision: D25852794
      
      fbshipit-source-id: ae1ae6cfbcbd0659becc14c703920e9505181109
      ed6fa93c
    • Alfred Fuller's avatar
      Fix include order and grouping in folly - 8/13 · 3c135dba
      Alfred Fuller authored
      Summary: All changes were automated
      
      Reviewed By: Orvid
      
      Differential Revision: D25507562
      
      fbshipit-source-id: ffed8f0e41d3581242b4e8e00bfd1fa6ee3e299b
      3c135dba
    • Alex Guzman's avatar
      Add support for io_uring · a3de19be
      Alex Guzman authored
      Summary: Sets out the foundation of io_uring support into fizz and enables support in the fizz tool
      
      Reviewed By: mingtaoy
      
      Differential Revision: D23592810
      
      fbshipit-source-id: 6f995c99541bc2aeca3cdfb7d84ebd2d25eb1f5e
      a3de19be
    • Andrii Vasylevskyi's avatar
      Tiny fix for folly::Random::secureOneIn(0) case · 06f9ac30
      Andrii Vasylevskyi authored
      Summary: Same code as in oneIn() explicit check for arg 0, 1.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D25838957
      
      fbshipit-source-id: 36ead588e435f116d0870ba45a181979c591c3f2
      06f9ac30