1. 07 Sep, 2018 5 commits
    • Dan Melnic's avatar
      Fix: folly/experimental/coro/test/CoroBenchmarkAllocator.cpp:363:20: error:... · 1958c549
      Dan Melnic authored
      Fix: folly/experimental/coro/test/CoroBenchmarkAllocator.cpp:363:20: error: 'Recursion' has not been declared
      
      Summary: Fix: folly/experimental/coro/test/CoroBenchmarkAllocator.cpp:363:20: error: 'Recursion' has not been declared
      
      Reviewed By: yfeldblum
      
      Differential Revision: D9727088
      
      fbshipit-source-id: 91447187bc6d34b965d5f8c2cedd66950b1fe909
      1958c549
    • Nathan Bronson's avatar
      F14 fallback mode cleanups · 7ae9308b
      Nathan Bronson authored
      Summary:
      This diff adds operator=(initializer_list) to the F14 fallback
      implementations, relaxes the guarantees provided by visitAllocationClasses
      for fallbacks (so that the current implementation can be considered
      correct), enables additional tests, and avoids a bit of logic repetition.
      Changes should only be made to the fallback mode and tests, and this diff
      should not change the set of platforms for which fallback mode is enabled.
      
      Reviewed By: shixiao
      
      Differential Revision: D9664700
      
      fbshipit-source-id: 1f3fc6f0c48009bb3e5fd249506b42f54d93df43
      7ae9308b
    • Victor Zverovich's avatar
      Fix CMake commands in README · 5bb6b0ae
      Victor Zverovich authored
      Summary:
      Remove bogus `configure` argument from cmake commands which is likely an
      artefact from automake migration. The correct invocation of CMake is
      
      ```
      cmake [<options>] {<path-to-source> | <path-to-existing-build>}
      ```
      
      Reviewed By: Orvid
      
      Differential Revision: D9721030
      
      fbshipit-source-id: 95da844d3292cbf2acbec85753499f3603567e08
      5bb6b0ae
    • Cameron Pickett's avatar
      Remove superfluous template type from Future::then · 5de46e43
      Cameron Pickett authored
      Summary: The template type here seems unnecessary, since the rest of the APIs refer to `folly::Executor` and not a template typename `Executor`
      
      Reviewed By: LeeHowes
      
      Differential Revision: D9695862
      
      fbshipit-source-id: 26d4ddb6fe09454f037fcf1f5417add062e8371f
      5de46e43
    • Nathan Bronson's avatar
      add missing operator=(initializer_list) overloads · 4b17db44
      Nathan Bronson authored
      Summary:
      F14 maps and sets were missing the operator= overload that takes
      an initializer list, resulting in map = {} having reset behavior rather
      than clear behavior.  Without the overload an empty map is constructed and
      then moved onto the lhs, freeing all memory.  With the overload we call
      clear(), which retains the existing allocation when it is not too large.
      This diff also cleans up the default constructor definitions, adding
      noexcept for F14FastMap and F14FastSet and making the others more concise.
      
      Reviewed By: shixiao
      
      Differential Revision: D9661526
      
      fbshipit-source-id: 101d66623bc4d50e7935fa9a73405a825648e6a5
      4b17db44
  2. 06 Sep, 2018 6 commits
    • Yedidya Feldblum's avatar
      Apply clang-format to folly/futures/ · 46bb4594
      Yedidya Feldblum authored
      Summary: [Folly] Apply `clang-format` to `folly/futures/`.
      
      Reviewed By: LeeHowes
      
      Differential Revision: D9672492
      
      fbshipit-source-id: c41632c4da6c450096eb249f0708af3db5057a14
      46bb4594
    • Yedidya Feldblum's avatar
      Apply clang-format to folly/container/ · 4aa9b357
      Yedidya Feldblum authored
      Summary: [Folly] Apply `clang-format` to `folly/container/`.
      
      Reviewed By: shixiao
      
      Differential Revision: D9672403
      
      fbshipit-source-id: da8e2a10eafcc8a278c002223cfeec055936d0bc
      4aa9b357
    • Yedidya Feldblum's avatar
      Apply clang-format to folly/gen/ · 062bb26d
      Yedidya Feldblum authored
      Summary: [Folly] Apply `clang-format` to `folly/gen/`.
      
      Reviewed By: Orvid
      
      Differential Revision: D9671968
      
      fbshipit-source-id: 1164cf0d236914b5fd7ed35d5d41c785935e876b
      062bb26d
    • Ajanthan Asogamoorthy's avatar
      update folly makefile · d98241e2
      Ajanthan Asogamoorthy authored
      Summary: D9624966 deleted FormatArg.cpp but makefile not updated
      
      Reviewed By: knekritz
      
      Differential Revision: D9663460
      
      fbshipit-source-id: 02dc40d4b23de697834aca0247335ee79bebc647
      d98241e2
    • Adam Norton's avatar
      KeepAlive via functions · 261d2494
      Adam Norton authored
      Summary: Add via helpers for KeepAlive argument
      
      Reviewed By: yfeldblum
      
      Differential Revision: D9617303
      
      fbshipit-source-id: 4ace3ea5f48fd8fbed70bcdf7654a1435f5e1d72
      261d2494
    • Amol Bhave's avatar
      Fix printf format specifier in Elf.h · 1723003c
      Amol Bhave authored
      Summary:
      The format specifier for printf should be %zu to take into account
      32bit machines.
      
      Reviewed By: Orvid
      
      Differential Revision: D9665574
      
      fbshipit-source-id: e7019c1deba80addef36ea8f6ebff48b45eceefa
      1723003c
  3. 05 Sep, 2018 10 commits
    • Yedidya Feldblum's avatar
      DRY some common code in folly/gen/test/ParallelBenchmark.cpp · f143a3c7
      Yedidya Feldblum authored
      Summary: [Folly] DRY some common code in `folly/gen/test/ParallelBenchmark.cpp`.
      
      Reviewed By: Orvid
      
      Differential Revision: D9664846
      
      fbshipit-source-id: adf198a60ab637e47986ddea9c5c4e7392cf8b27
      f143a3c7
    • Amol Bhave's avatar
      Fix CoroBenchmarkNRVO for non FOLLY_HAS_COROUTINE builds · f169a842
      Amol Bhave authored
      Summary:
      This code fails to compile when FOLLY_HAS_COROUTINES is false. This is
      because ExpensiveCopy is defined inside the if scope, and if that macro is
      false, then ExpensiveCopy never gets defined. Yet it gets used in the nestedCalls function.
      
      This diff fixes build for that case.
      
      Reviewed By: lewissbaker
      
      Differential Revision: D9663539
      
      fbshipit-source-id: 1c3dd70decab7db955c038cd5c476920bfa6ba53
      f169a842
    • Yedidya Feldblum's avatar
      Fix for_each and fetch unit-tests under MSVC · e89b8aa9
      Yedidya Feldblum authored
      Summary: [Folly] Refactor `for_each` and `fetch` to fix their unit-tests under MSVC. New code is smaller.
      
      Reviewed By: Orvid
      
      Differential Revision: D9569412
      
      fbshipit-source-id: 87807ddf41f1dbd16244a82c5be30eae08dbdf4c
      e89b8aa9
    • Yedidya Feldblum's avatar
      Assorted fixes to for_each and fetch comments · 8f2ad2b9
      Yedidya Feldblum authored
      Summary: [Folly] Assorted fixes to for_each and fetch comments
      
      Reviewed By: aary
      
      Differential Revision: D9632155
      
      fbshipit-source-id: 64932770d3476cdd06c5fa9eb9bd845600f18fff
      8f2ad2b9
    • Andrii Grynenko's avatar
      Coroutine allocator benchmark · ebc7efbb
      Andrii Grynenko authored
      Reviewed By: lewissbaker
      
      Differential Revision: D9388165
      
      fbshipit-source-id: fa94f008d088c5560d5207c726fabb0e764193fb
      ebc7efbb
    • Kyle Nekritz's avatar
      Bind to ephemeral port in tos tests. · 1285b5cb
      Kyle Nekritz authored
      Summary: Always using 10000 is no good for concurrent tests.
      
      Reviewed By: Orvid
      
      Differential Revision: D9656798
      
      fbshipit-source-id: 4fb7e48239e42c3b2acd2cc976cb74535c573ef6
      1285b5cb
    • Yedidya Feldblum's avatar
      Do only single var decl per statement in folly/test/DynamicConverterTest.cpp · c043e0a8
      Yedidya Feldblum authored
      Summary: [Folly] Do only single var decl per statement in `folly/test/DynamicConverterTest.cpp`.
      
      Reviewed By: igorsugak
      
      Differential Revision: D9653672
      
      fbshipit-source-id: 08bb529cc90761c69dabd2e00f58f1767f07146a
      c043e0a8
    • Yedidya Feldblum's avatar
      Cut the extra braces in folly/test/ExceptionTest.cpp · 3d646906
      Yedidya Feldblum authored
      Summary:
      [Folly] Cut the extra braces in `folly/test/ExceptionTest.cpp`.
      
      And reformat.
      
      Reviewed By: igorsugak
      
      Differential Revision: D9653533
      
      fbshipit-source-id: dfeec84d322b32921a375721669ef5ac7a77099f
      3d646906
    • Aaryaman Sagar's avatar
      Fix mimic comment for atomic_uint_fast_wait_t · a5119cce
      Aaryaman Sagar authored
      Summary: Forgot to include the paper number
      
      Reviewed By: yfeldblum
      
      Differential Revision: D9650597
      
      fbshipit-source-id: 05c0720a18ee39a8085739a72fea269589e3c0fa
      a5119cce
    • Prabhakaran Ganesan's avatar
      Reflect TOS from thrift server · 14812ec5
      Prabhakaran Ganesan authored
      Summary:
      There are efforts as part of the OlympicQos initiative to ensure QOS configuration for all network transfers. As part of these efforts, one of the requirements is the ensure TOS marking for server-->client traffic. Since the server does not have a way of knowing the priority of the response, the server needs to reflect the TOS settings from the client. The idea is the cache the client's SYN, derive the TOS from the same and set hte same TOS for the responses. Made changes to
      
      1) setsockopt(TCP_SAVE_SYN) in AsyncServerSocket() for all listen sockets
      2) Upon an accepted connection, getsockopt(TCP_SAVED_SYN) to get the TOS from IPv6 header and setsockopt to set TOS on the connected socket. Do this conditionallly (based on tosReflect_ setting and only for family IPv6)
      3) Added API setTosReflect() to enable the feature and included flag on thrift server to control the same
      
      Reviewed By: yfeldblum
      
      Differential Revision: D9566136
      
      fbshipit-source-id: ad61fed4e205893e2b7c5654e1b4f21ed5472c06
      14812ec5
  4. 04 Sep, 2018 9 commits
    • Yedidya Feldblum's avatar
      FOLLY_DECLARE_REUSED · 64c7918d
      Yedidya Feldblum authored
      Summary: [Folly] `FOLLY_DECLARE_REUSED`.
      
      Reviewed By: marksantaniello
      
      Differential Revision: D9626462
      
      fbshipit-source-id: 23be21e2c6a314b3f65bbfca660958e596915b53
      64c7918d
    • Xiao Shi's avatar
      use heterogeneous lookup and mutation in folly::dynamic · 0fe88247
      Xiao Shi authored
      Summary:
      This diff allows `folly::dynamic` to lookup and mutate using any type that is
      convertible to `StringPiece` (i.e., `const char*`, `std::string`, `fbstring`)
      without having to construct a `dynamic` object (which requires copying the
      string).
      
      Previously (D8299863), we SFINAE'd and took `StringPiece` by reference. This
      caused linker errors for non-member constexpr string constants like the
      following which are odr-used.
        struct S {
          static constexpr auto kXXX = "xxx";
        };
        d.at(kXXX); // linker error
      Hence in this diff, we template on types that are convertible to dynamic but
      NOT to StringPiece, and add a separate overload which takes StringPiece by
      value.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D9540388
      
      fbshipit-source-id: 529de31585200947b8b92fcf3126442a8ed51a73
      0fe88247
    • Yedidya Feldblum's avatar
      Apply clang-format to folly/compression/ · 89003304
      Yedidya Feldblum authored
      Summary: [Folly] Apply `clang-format` to `folly/compression/`.
      
      Reviewed By: igorsugak
      
      Differential Revision: D9625742
      
      fbshipit-source-id: 5098aa62a3f5d9cc12da0932ab4f33d5a11111dc
      89003304
    • Yedidya Feldblum's avatar
      Apply clang-format to folly/system/ · b75576a1
      Yedidya Feldblum authored
      Summary: [Folly] Apply `clang-format` to `folly/system/`.
      
      Reviewed By: igorsugak
      
      Differential Revision: D9625730
      
      fbshipit-source-id: 88f93231f77497d933233d4267c6983558baeb25
      b75576a1
    • Yedidya Feldblum's avatar
      Apply clang-format to folly/fibers/ · c5b81a8d
      Yedidya Feldblum authored
      Summary: [Folly] Apply `clang-format` to `folly/fibers/`.
      
      Reviewed By: igorsugak
      
      Differential Revision: D9625725
      
      fbshipit-source-id: e00f6406db994a1a3f17c1d23b415bea13495e99
      c5b81a8d
    • Yedidya Feldblum's avatar
      Apply clang-format to folly/lang/ · fa256453
      Yedidya Feldblum authored
      Summary: [Folly] Apply `clang-format` to `folly/lang/`.
      
      Reviewed By: igorsugak
      
      Differential Revision: D9625707
      
      fbshipit-source-id: 345dcfbeb67981e928093b03f75125089c4210c1
      fa256453
    • Yedidya Feldblum's avatar
      Apply clang-format to folly/portability/ · f21a7042
      Yedidya Feldblum authored
      Summary: [Folly] Apply `clang-format` to `folly/portability/`.
      
      Reviewed By: igorsugak
      
      Differential Revision: D9625664
      
      fbshipit-source-id: fa63f3e3a719c22ea88cd14172d34e360353145f
      f21a7042
    • Yedidya Feldblum's avatar
      Do conditional compilation for MPMCPipeline using C++ · 61276a38
      Yedidya Feldblum authored
      Summary: [Folly] Do conditional compilation for `MPMCPipeline` using C++ via selecting a base class v.s. using the preprocessor.
      
      Reviewed By: Orvid
      
      Differential Revision: D9625568
      
      fbshipit-source-id: 2e0d7195bb7fa4f44cf8b99ed3d7564b18393b73
      61276a38
    • Dan Melnic's avatar
      Remove stop() comment since it's not accurate · 3acfb909
      Dan Melnic authored
      Summary: Remove stop() comment since it's not accurate
      
      Reviewed By: yfeldblum
      
      Differential Revision: D9600621
      
      fbshipit-source-id: 599551efc775a622d5a5b4a45ead1f3dcbf10abb
      3acfb909
  5. 03 Sep, 2018 6 commits
    • Orvid King's avatar
      Fix the autotools build · 130943d8
      Orvid King authored
      Summary:
      It was missing things.
      
      Closes https://github.com/facebook/folly/issues/925
      
      Reviewed By: yfeldblum
      
      Differential Revision: D9631683
      
      fbshipit-source-id: 3ea572ecf5b4d640b6cd2f376cd4c6916e43ed1d
      130943d8
    • Yedidya Feldblum's avatar
      Make ThreadPoolExecutorTest.DynamicThreadsTest not timing-sensitive · 31ac3787
      Yedidya Feldblum authored
      Summary:
      [Folly] Make `ThreadPoolExecutorTest.DynamicThreadsTest` not timing-sensitive.
      
      The timing-sensitive version of the test sometimes fails under load, and is observed in some internal `folly-oss` jobs.
      
      Rewrite the test to avoid using long sleeps to try to approximate synchronization. Use a barrier and spin-yield loop instead.
      
      Differential Revision: D9628339
      
      fbshipit-source-id: fef752ad15dbff853cfa7cbaac1081580007754c
      31ac3787
    • Yedidya Feldblum's avatar
      Remove some [[noreturn]] functions · 27cfbc10
      Yedidya Feldblum authored
      Summary: [Folly] Remove some `[[noreturn]]` functions - many of them can be replaced with `throw_exception`.
      
      Reviewed By: Orvid
      
      Differential Revision: D9624966
      
      fbshipit-source-id: e5e472c660677112edf99e30e36d78c1b1718b52
      27cfbc10
    • Yedidya Feldblum's avatar
      Let StaticMeta have a deleted dtor · 685a2941
      Yedidya Feldblum authored
      Summary: [Folly] Let `StaticMeta` have a deleted dtor - a compile-time enforcement that the dtor will not be invoked, to replace the existing runtime non-enforcement.
      
      Reviewed By: elsteveogrande
      
      Differential Revision: D9624686
      
      fbshipit-source-id: 9185defbea343e4123e66c8d0d38f20c561aebea
      685a2941
    • Yedidya Feldblum's avatar
      Check the behavior of ThreadPoolExecutor destruction · 8f91fe9e
      Yedidya Feldblum authored
      Summary: [Folly] Check the behavior of ThreadPoolExecutor destruction regarding execution or dropping of outstanding tasks.
      
      Differential Revision: D9627237
      
      fbshipit-source-id: 4bb3c1480cc94ceeb3e550f52c298e3d2dcf71c5
      8f91fe9e
    • Aaryaman Sagar's avatar
      Extend futex to work with non-standard widths · 146b07b5
      Aaryaman Sagar authored
      Summary:
      Contains a subset of the functions described in p1135r0, with some additions
      for timed waiting that essentially extends the futex interface to work with
      non-standard futex widths
      
      In the regular 32 bit case, we fall back to the existing folly futex()
      implementation.  In all other cases, we use folly::ParkingLot to mimic futex()
      
      Reviewed By: djwatson
      
      Differential Revision: D9381922
      
      fbshipit-source-id: faf84e105e1d44a6dd6034e25440fcb3eb664846
      146b07b5
  6. 02 Sep, 2018 1 commit
    • Yedidya Feldblum's avatar
      Write /* static */ if as if /* constexpr */ · fafeb979
      Yedidya Feldblum authored
      Summary: [Folly] Write `/* static */ if` as `if /* constexpr */`. Once the time comes to jump to C++17, all that remains is to remove the comments.
      
      Reviewed By: aary
      
      Differential Revision: D9627826
      
      fbshipit-source-id: 56078e727a3a4420851f1c441783b80da55a8e6c
      fafeb979
  7. 01 Sep, 2018 3 commits