- 13 Oct, 2015 7 commits
-
-
Ben Maurer authored
Summary: The thread local destructor was assuming that the singleton object had been created. Reviewed By: @yangchi Differential Revision: D2536166 fb-gh-sync-id: b0c08e0990f684c0afae054ee17c62a924260f2b
-
Lucian Grijincu authored
Summary: Include headers for all std:: stuff used in the header + getpid(). ``` #include <sys/types.h> #include <unistd.h> pid_t getpid(void); pid_t getppid(void); ``` Reviewed By: @yfeldblum Differential Revision: D2535284 fb-gh-sync-id: b1167e8f382878d27553161b9b569968006355b3
-
Igor Sugak authored
Summary: Fix a few `-Wsign-compare` violations Reviewed By: @meyering Differential Revision: D2527969 fb-gh-sync-id: 140acbd06eedf2e2a315e1927b331ff5efb20d0f
-
Igor Sugak authored
Summary: Make folly `-Wpessimizing-move` clean: Common errors: ```lang=bash folly/io/test/NetworkBenchmark.cpp:71:30: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move] unique_ptr<IOBuf> next = std::move(head->pop()); ^ folly/io/IOBufQueue.cpp:153:28: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move] appendToChain(head_, std::move( ^ folly/IPAddressV6.cpp:341:12: error: moving a local object in a return statement prevents copy elision [-Werror,-Wpessimizing-move] return std::move(ip); ^ folly/IPAddressV6.cpp:341:12: note: remove std::move call here return std::move(ip); ^~~~~~~~~~ ~ 1 error generated. ``` Reviewed By: @fugalh, @meyering Differential Revision: D2526950 fb-gh-sync-id: 49291a8b49905eb9b2042d004830ff2f599dfbd3
-
Woo Xie authored
Summary: current wangle has no way to close socket write side. writeFlags is extended so that wangle/AsyncSocketHandler can distinguish closeNow(), closeWithReset() and shutdownWrite() Reviewed By: @viswanathgs Differential Revision: D2522056 fb-gh-sync-id: 60616176d78311a4a09f9761a6ccda01dd502a88
-
Ben Maurer authored
Summary: Right now ThreadLocal & friends don't operate correctly when used as a static variable (which is the idiomatic way to use them). The TLS id is allocated in the static constructor so anybody who uses the ID prior to first use would use an invalid ID. This makes ThreadLocal unusable for core code such as per-thread reference counting. This diff allocates the ID on first use. By making the invalid ID maxint we avoid adding any extra branches in the fast path. We can then make the constructor a constexpr meaning that initialization will happen prior to any code running. Reviewed By: @meyering Differential Revision: D2457989 fb-gh-sync-id: 21d0c0d00c638fbbd36148d14d4c891f66f83706
-
Ben Maurer authored
Summary: objdump was showing that the shiftXXX tables are being generated each time this file is included. For example, HHVM has about 200 of each of the 4 tables. Since each one is 512 bytes this is 400 KB. I'm not quite sure why this was happening -- I'd think that the linker would combine a constant table that was identical. I think the best thing to do here is just to use extern template. This way you there's only one copy of the table and you don't have to parse all of this code in every file Reviewed By: @yfeldblum Differential Revision: D2506571 fb-gh-sync-id: b01a522c536a2ff4136340245cacaa33897afefb
-
- 10 Oct, 2015 1 commit
-
-
Yedidya Feldblum authored
Summary: [Folly] Fix Build: GCC 4.9 has `std::make_unique` but not `__cplusplus >= 201402L`. Reviewed By: @igorsugak Differential Revision: D2528584 fb-gh-sync-id: 9ad0567429698fb1320ad4066ee06add31acbd57
-
- 09 Oct, 2015 4 commits
-
-
Hans Fugal authored
Fix configure script bug on Mac OS X
-
Steve O'Brien authored
Summary: Allow notification upon async eager initialization completion. Reviewed By: @luciang Differential Revision: D2518925 fb-gh-sync-id: 95f96da2afa6e5953630dd935d74819521716e5f
-
软件工程师李飛 authored
Summary: Fixes facebook/folly#323 Reviewed By: @JoelMarcey Differential Revision: D2518882 Pulled By: @fredemmott fb-gh-sync-id: fc0a07d925945f7d7e1cddb7302c8bf18e0130ab
-
Vlad Buslov authored
-
- 08 Oct, 2015 1 commit
-
-
Orvid King authored
Summary: Because MSVC doesn't support the latter. Closes https://github.com/facebook/folly/pull/271 Reviewed By: @meyering, @fredemmott Differential Revision: D2283975 fb-gh-sync-id: d021f739ceead9998b8fedbbd95f22ec9fe949b2
-
- 07 Oct, 2015 4 commits
-
-
Bruno Goncalves authored
Summary: Tested in: Distro: Fedora 20 - x86_64 kernel: 3.19 compiler: gcc version 4.8.3 Closes https://github.com/facebook/folly/pull/320 Reviewed By: @sgolemon Differential Revision: D2519083 fb-gh-sync-id: 07b1437326c393c99feeb6e0764d664d3e22faea
-
Steve O'Brien authored
Summary: Singletons requires Futures, and Futures indirectly (via HHWheelTimeKeeper) require Singletons. This breaks the dependency. It removes a Future-using API which will be replaced with a better alternative. Reviewed By: @luciang Differential Revision: D2517807 fb-gh-sync-id: 93df371a74d0f80dc8c55fb0eadd0b688b27b525
-
Steve O'Brien authored
Summary: Move some methods which are generally only used during initialization time (registration, eager-init functions) from the header to the .cpp file Reviewed By: @luciang Differential Revision: D2513043 fb-gh-sync-id: 58d1f6e0d158d805a12b8d267421927b3cfc6118
-
Yedidya Feldblum authored
Summary: [Folly] Remove evil `using` statements from `AsyncSSLSocket.h`. `using` in headers is frowned upon. Consider this diff a frown. Reviewed By: @alandau Differential Revision: D2509810 fb-gh-sync-id: 4a752b9f4a5be6ac4ca7c498c0168ffad5c35d7f
-
- 06 Oct, 2015 2 commits
-
-
Lucian Grijincu authored
Summary: smallandbroken Reviewed By: @fugalh Differential Revision: D2509021 fb-gh-sync-id: 5e379b82615117df89cbc12943fdbe92511c067e
-
Adrian Zgorzalek authored
Summary: Stacktraces and more details can be found in the associated task http://clang.llvm.org/docs/AttributeReference.html#no-sanitize-clang-no-sanitize seems to be the new hotness to disable sanitizers. Reviewed By: @yfeldblum Differential Revision: D2510320 fb-gh-sync-id: 01cce68733509a6f5bcf9dbe3a4af6fc2792a43b
-
- 05 Oct, 2015 3 commits
-
-
Tom Jackson authored
Summary: It works fine, this proves it. Reviewed By: @yfeldblum, @jkron Differential Revision: D2509771 fb-gh-sync-id: 28805a1e1db433d3d9a44b9d33f81e30333e44ab
-
Kyle Nekritz authored
Summary: If it is, return false. Reviewed By: @siyengar Differential Revision: D2503765 fb-gh-sync-id: 36b5e2e8cabc2a5157735637be6ca3414005da81
-
Giuseppe Ottaviano authored
Summary: The move constructor of `fbstring` generates a large amount of code, preventing it to be inlined, and it is inefficient for small strings. This diff fixes both problems. Reviewed By: @yfeldblum Differential Revision: D2505762
-
- 04 Oct, 2015 1 commit
-
-
Pavlo Kushnir authored
Summary: title Reviewed By: @yfeldblum Differential Revision: D2506703
-
- 03 Oct, 2015 4 commits
-
-
Andre Pinto authored
Summary: AsyncPipe is already open source Reviewed By: @yfeldblum Differential Revision: D2506476
-
Yedidya Feldblum authored
Summary: [Folly] Fix Build: `folly/Range.h` for build platforms missing SSE42 headers. We make the assumption that if the compiler defines the appropriate symbols indicating SSE42, that the corresponding intrinsics headers are available. We also remove `Range.cpp` from `Makefile.am`, which we forgot to do in the blamed diff. Reviewed By: @nbronson Differential Revision: D2504934
-
Alexey Spiridonov authored
Summary: I noticed myself trying to fake this kind of callback for a log-based test I was writing. It seems much nicer to add the callback to `CaptureFD` than roll ugly wrappers around it to do the same thing. Reviewed By: @yfeldblum Differential Revision: D2506106
-
Yedidya Feldblum authored
Summary: [Folly] Converge `folly::make_unique` to C++14's `std::make_unique`. The primary use-case of ther deleter variety of `folly::make_unique` is `DelayedDestruction`. Let the classes matching this use-case define their own factories. Reviewed By: @fugalh Differential Revision: D2495718
-
- 02 Oct, 2015 2 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Support SSE-enabled `Range` functions under Clang. Basically, we remove GCC-only -isms. In particular, we use only names from the `<emmintrins.h>` and `<smmintrins.h>` headers, instead of the GCC-specific SSE builtins that the original code uses. But in order to get this to work, we must split out the SSE-enabled functions into their own sources and compile them with the `-msse4.2` flag. There is a way to get around this in GCC by marking individual functions as SEE-enabled, but that technique is not supported in Clang. This is the new `RangeSse42` module. And in order to do that, we must split out the code that is called by both the original `Range` and the new SSE-enabled functions into yet a third module, `RangeCommon`. Ahhhhhh, dependencies. Note that we always compile the SSE-enabled functions, but we only run them on architectures supporting SSE. The original code tests the CPU's capabilities before running any SSE-enabled functions; this change retains that check. Reviewed By: @nbronson Differential Revision: D2428983
-
Nathan Bronson authored
Summary: This diff fixes the compiler warnings emitted by gcc-4.9's stricter -Wsigned-comparison check, as well as those revealed by -Wunused-variable. Reviewed By: @meyering, @yfeldblum Differential Revision: D2494514
-
- 01 Oct, 2015 2 commits
-
-
Alex Landau authored
Summary: Server can find out client's common name through Cpp2ConnContext::getPeerCommonName Reviewed By: @siyengar Differential Revision: D2469588
-
Alecs King authored
Summary: fix typo jenkins and oss build (e.g. travis) failing. Reviewed By: @pavlo-fb Differential Revision: D2499462
-
- 30 Sep, 2015 5 commits
-
-
Mohammad Husain authored
Reviewed By: @afrind Differential Revision: D2466921
-
Steve O'Brien authored
Summary: On a (broken) unit test there is a bad `CHECK` during destruction time. This triggers an ABRT, goes through the signal handler, and in the process ends up doing a use-after-free. Moved some globals inside the functions in which they are used (w/ little duplication, as they are used in one place, mostly). Reviewed By: @luciang, @meyering Differential Revision: D2494046
-
Dave Watson authored
Summary: This diff adds UpdateableSharedPtr and FastUpdateableSharedPtr classes to folly. They are efficiet RCU-style holders for a shared_ptr. See the comment at the top of UpdateableSharedPtr.h for a more detailed description and benchmark results. All the added files are copied from logdevice code with (almost) no changes (`logdevice/common/` on branch `origin/logdevice-latest`). We've been using them in logdevice for a few months. D1821723 introduced it. Reviewed By: @bmaurer Differential Revision: D1919702
-
Yedidya Feldblum authored
Summary: [Folly] Extract `SparseByteSet` into its own module. `SparseByteSet`, formerly `FastByteSet`, is actually a generic, fully standalone class. It does not need to be embedded in `Range.cpp`. Reviewed By: @bmaurer Differential Revision: D2460180
-
Ranjeeth Dasineni authored
Summary: From the client perspective, we set the list in order of preference once and call into openssl to do the selection. This adds a little more flexibility in that client optionally can customize the selection for each negotiation. added tests for the no-op case and the customized case. Feel free to suggest improvements. Reviewed By: @afrind Differential Revision: D2489142
-
- 29 Sep, 2015 3 commits
-
-
Subodh Iyengar authored
Summary: It's pretty common during parsing protocols with cursors that there will be empty iobufs along the way. This changes it so that we prune empty IOBufs in the cloned output before returning it to the user. Reviewed By: @djwatson Differential Revision: D2464488
-
Andre Pinto authored
Summary: AsyncPipeReader and AsyncPipeWriter are classes to asynchronously read and write to pipes. Reviewed By: @djwatson Differential Revision: D2479514
-
Yedidya Feldblum authored
Summary: [Thrift] CodeMod `apache::thrift::async::TEventBase` to `folly::EventBase` (remainder). A few straggler bits left out of D2349828. Reviewed By: @Gownta Differential Revision: D2489063
-
- 28 Sep, 2015 1 commit
-
-
Ben Maurer authored
Summary: sorry Reviewed By: @chiunlin Differential Revision: D2485925
-