- 14 Apr, 2018 2 commits
-
-
Adam Simpkins authored
Summary: D7479058 changed the exception_tracer code to export their targets in the main folly-targets.cmake file, but I forgot to remove the `install()` command installing the old `folly-exception-tracer-targets.cmake` file. This would cause `cmake configure` to exit with an error if it detected it could built the exception_tracer code, but it would still generate all of the necessary Makefiles correctly, so subsequent `make` commands would still work. Reviewed By: yfeldblum Differential Revision: D7626710 fbshipit-source-id: f015032c3c42cf2911fcaf9b355fc97616ff20e1
-
Léonard Gérard authored
Summary: The cmake globbing then excluding strategy implies that if the directory in which we are compiling has a folder named `build` on its path like `/home/alice/project/build/folly/...`, everything breaks. Note that it is the same for `tools` and `test`, I also fixed the tools one, but the test once has many files.... Using a file list would be the real solution. Closes https://github.com/facebook/folly/pull/815 Reviewed By: simpkins Differential Revision: D7624035 Pulled By: yfeldblum fbshipit-source-id: a3f1d2f82e55e070d13acc5c394d8cfdfabeb7ed
-
- 13 Apr, 2018 2 commits
-
-
Marc Celani authored
Summary: The existing histogram approach for estimating quantiles is inadequate for common use cases. This diff introduces TDigests for estimating quantiles of streaming values. The current histogram approach suffers from two issues: - The user needs to know something about the universe of values, U, and the underlying distribution in order to get reasonably accurate values - Because the histogram is not biased, estimating tail quantiles such as p99.9 requires a large amount of memory. t-digests (https://github.com/tdunning/t-digest/blob/master/docs/t-digest-paper/histo.pdf) are biased digests that allow for accurate estimates of tail quantiles, while using a small amount of memory and without requiring the user to know anything about U. The scaling function in the paper is slow, because it uses arcsin. This approach uses a sqrt function instead. Details of why this works in the comments of the TDigest file. Reviewed By: simpkins Differential Revision: D7512432 fbshipit-source-id: 01460433ec7380fed88e5e942ef15f032dd794bb
-
Yedidya Feldblum authored
Summary: [Folly] Fix `constexpr` predicate names, which have embarrassing typos. Reviewed By: igorsugak Differential Revision: D7605352 fbshipit-source-id: e04a87fd375f09472b020380bf446c7236a39e51
-
- 12 Apr, 2018 5 commits
-
-
Dan Melnic authored
Summary: Fix broken Android build (Note: this ignores all push blocking failures!) Reviewed By: michalgr Differential Revision: D7606076 fbshipit-source-id: 0cf0426a34cf62b045acb932d42a8e4a3cd5da71
-
Tudor Bosman authored
Summary: When trying to compile `folly/experimental/exception_tracer` with gcc-7.2, I get the following error: ``` ExceptionCounterLib.cpp: In instantiation of '{anonymous}::throwHandler(void*, std::type_info*, void (*)(void*))::<lambda(auto:9&)> [with auto:9 = std::unordered_map<long unsigned int, folly::exception_tracer::ExceptionStats>]': ../../../folly/Synchronized.h:162:20: required from 'auto folly::SynchronizedBase<Subclass, (folly::detail::MutexLevel)1>::withWLock(Function&&) [with Function = {anonymous}::throwHandler(void*, std::type_info*, void (*)(void*))::<lambda(auto:9&)>; Subclass = folly::Synchronized<std::unordered_map<long unsigned int, folly::exception_tracer::ExceptionStats>, folly::RWSpinLock>]' ExceptionCounterLib.cpp:132:4: required from here ExceptionCounterLib.cpp:127:21: error: uninitialized variable 'info' in 'constexpr' function ExceptionInfo info; ^~~~ In file included from ../../../folly/experimental/exception_tracer/ExceptionCounterLib.h:22:0, from ExceptionCounterLib.cpp:16: ../../../folly/experimental/exception_tracer/ExceptionTracer.h:30:8: note: 'struct folly::exception_tracer::ExceptionInfo' has no user-provided default constructor struct ExceptionInfo { ^~~~~~~~~~~~~ ../../../folly/experimental/exception_tracer/ExceptionTracer.h:31:25: note: and the implicitly-defined constructor does not initialize 'const std::type_info* folly::exception_tracer::ExceptionInfo::type' const std::type_info* type; ^~~~ ``` Fixed by initializing `ExceptionInfo::type`. Compiling with gcc 7.2 now works. Closes https://github.com/facebook/folly/pull/812 Reviewed By: Orvid Differential Revision: D7598341 Pulled By: yfeldblum fbshipit-source-id: 0a8859b6d5f174484c8f2148de59a2a592dc2b25
-
Yedidya Feldblum authored
Summary: [Folly] Rename `IOBufEqual` to `IOBufEqualTo` to correspond with the standard naming of `std::equal_to`. Reviewed By: Orvid Differential Revision: D7596716 fbshipit-source-id: 2e87aa4b62a002520bdd53b5b7eaba7d9bd822da
-
kumagi authored
Summary: in Linux environment, `find_package(gflass)` searches `Findgflags.cmake`. And it cannot find https://github.com/facebook/folly/blob/master/CMake/FindGFlags.cmake , because linux is case-sensitive environment in filenames and cause error. ``` CMake Error at CMake/folly-deps.cmake:34 (message): Unable to determine the target name for the GFlags package. Call Stack (most recent call first): CMakeLists.txt:65 (include) ``` For linux programmers, this line should find `FindGFlags.cmake` file which exists in the same directory. Closes https://github.com/facebook/folly/pull/805 Reviewed By: yfeldblum Differential Revision: D7505908 Pulled By: Orvid fbshipit-source-id: c30097a25569d293df9a1bfecbee84cece260306
-
Yedidya Feldblum authored
Summary: [Folly] Function objects for performing `constexpr` comparisons for C++11 or gcc49. After upgrading to C++14 and dropping support for C++11, these may be removed because the corresponding function objects in the C++14 standard library are `constexpr`-invocable. Reviewed By: Orvid Differential Revision: D7590351 fbshipit-source-id: a8702115a66836aff25761f374b8a2d7dbe12074
-
- 11 Apr, 2018 1 commit
-
-
Dan Melnic authored
Summary: Delay threadEntry destruction until all instances have completed StaticMetaBase::onThreadExit Reviewed By: djwatson Differential Revision: D7471153 fbshipit-source-id: 709a54ed2d616c5dc906b923e9fdd862ac87de9c
-
- 10 Apr, 2018 9 commits
-
-
Dave Watson authored
Summary: The domain tests seem broken. Digging in, it seems to be uninitialized ThreadCachedInts variables. Initialize them. Reviewed By: yfeldblum Differential Revision: D7505520 fbshipit-source-id: aca8a6f5b38271bf06ea8a6377bfb692328f1e33
-
Maged Michael authored
Reviewed By: djwatson Differential Revision: D7571438 fbshipit-source-id: 1484e5e323c7d57a96ad66d46fd999ce51e69951
-
Dave Watson authored
Summary: Similar to D7429494, this can be a CAS and save some latency for some readers. Reviewed By: magedm Differential Revision: D7505578 fbshipit-source-id: eeeb06c2969a74084edd3df26cf2d135b8b0e132
-
Alexander Zhavnerchik authored
Summary: If FOLLY_SETTING_DEFINE(...) is put into .cpp file right now you will get linker error about undefined references. According to http://en.cppreference.com/w/cpp/language/inline 2) The definition of an inline function or variable (since C++17) must be present in the translation unit where it is accessed (not necessarily before the point of access). Hence the linker error. This diff fixes that. Reviewed By: alikhtarov, mnv104 Differential Revision: D7567469 fbshipit-source-id: 02049e4881e50c414aeb506745e02eed1256daad
-
Adam Simpkins authored
Summary: Update `cmake_configure()`, `cmake_install()`, and `fb_github_cmake_install()` to support specifying the directory where CMakeLists.txt is found, relative to the directory where the build is being performed. Previously these functions where hardcoded to assume that CMakeLists.txt was always found at '..' Reviewed By: snarkmaster Differential Revision: D7540689 fbshipit-source-id: efd3d044345fadc0346e436c01d0a247e1b6fd70
-
Adam Simpkins authored
Summary: Add a macro to help users define the `getBaseLoggingConfig()` function. While I would prefer to avoid macros if possible, this seems worthwhile. This saves 4 or 5 lines of boilerplate code in each program that sets a custom base logger setting. It also reduces the likelihood of a developer accidentally having a typo in the function name, which would still build successfully but not have the desired results. Reviewed By: chadaustin Differential Revision: D7457652 fbshipit-source-id: 1c316c7ea6949c16bd7b61c0440cc1ee69ecb83e
-
Adam Simpkins authored
Summary: Add folly::initLoggingOrDie(), which behaves like `initLogging()` but handles errors by printing a message to stderr and then calling `exit(1)`. Most programs are expected to initialize logging early on during program start-up, and will likely use a command line argument or other configuration value as the logging settings. If an error occurs they usually want to print the message to stderr and exit unsuccesfully. `initLoggingOrDie()` makes it easy to perform these steps without requiring programs to write their own exception handlers to handle errors from `initLogging()`. Reviewed By: chadaustin Differential Revision: D7164830 fbshipit-source-id: d688046f1b6240c948e4aaabfc9fb24ba3d9ff89
-
Anton Likhtarov authored
Summary: - Let's enforce a single definition. Also makes the implementation much simpler. - Collect all static info about a setting in a Metadata struct Differential Revision: D7544210 fbshipit-source-id: d3f2ef617bd817d355a37e11fa9425b6a4259384
-
Eugene Pekurovsky authored
Summary: Currently, the memory used by a map instance is available only via computeStats(), which is quite expensive. A lightweight method is needed for getting the map memory footprint on a hot code path. Reviewed By: nbronson Differential Revision: D7544180 fbshipit-source-id: 3cbc98bb9f1c5e7f75fd9eb7f89016580fbb6523
-
- 09 Apr, 2018 3 commits
-
-
Orvid King authored
Summary: Which only supports C++11 style constepxr. Reviewed By: simpkins Differential Revision: D7546457 fbshipit-source-id: 52db98379096dd3b25f656e7e62238ce10537bf7
-
Alexander Zhavnerchik authored
Summary: According to http://en.cppreference.com/w/cpp/language/operators The overload of operator -> must either return a raw pointer or return an object (by reference or by value), for which operator -> is in turn overloaded. Hence this change. Reviewed By: mnv104 Differential Revision: D7548832 fbshipit-source-id: d98ff1f96bc00dc6e2e5cb084b96091a61421627
-
Denis Samoylov authored
Summary: Tudor who wrote this left the company... so RB.. you are the reviewers :) 1. make default commands as constants 2. remove fake message about ",h" 3. align quota usage from mix to ' 4. add support for version command 5. add function to identify built-in command (is needed for an external application to make a decision if something is mandatory or not) Reviewed By: marcinpe Differential Revision: D7048169 fbshipit-source-id: b48cf7df28cfa387e028a1cc869332407314c906
-
- 08 Apr, 2018 1 commit
-
-
Alex Guzman authored
Summary: Adds a few more OpenSSL compatibility functions for working with X509_STORE and its objects. Reviewed By: knekritz Differential Revision: D7540930 fbshipit-source-id: 0275a200d673386988bc25140b1d827859b04364
-
- 07 Apr, 2018 1 commit
-
-
Marc Celani authored
Summary: hazptr_obj is copyable and moveable, but doing so would cause a bug, because the next ptr would point to the object that was copied/moved from, which can oftentimes be garbage or another object that has not yet retired. This diff changes the copy/move constructors and assignment operators to simply check that the rhs has not been retired. Reviewed By: magedm Differential Revision: D7539444 fbshipit-source-id: f9325c7b886fcf4b553344ee37f2355ca41268b6
-
- 06 Apr, 2018 2 commits
-
-
Adam Simpkins authored
Summary: Install the CMake package configuration file under lib/cmake/folly rather than share/folly. CMake will automatically search both of these locations, but lib/cmake/folly appears to be a more commonly-used location across other open source projects. Reviewed By: Orvid Differential Revision: D7479056 fbshipit-source-id: becd3d4c05e774d2aede20f6a7a50f57d6c05875
-
Adam Simpkins authored
Summary: - Use CMakePackageConfigHelpers to help generate the file - Print a message about where folly was found if not using QUIET - Make the include, lib, and cmake installation directories configurable Reviewed By: wez Differential Revision: D7479058 fbshipit-source-id: 2548acc9d6de90d11da02ac576a58ce5ca939766
-
- 05 Apr, 2018 5 commits
-
-
Steve O'Brien authored
Summary: Include the new `UTF8String.h` header where needed. Reviewed By: Orvid Differential Revision: D7473655 fbshipit-source-id: 9d1b820123a786d8eb3d6405a4ff35331de41694
-
Orvid King authored
Summary: Neither Folly nor Thrift actually version anymore and haven't in multiple years, so just remove the code to do this. Reviewed By: yfeldblum Differential Revision: D7512580 fbshipit-source-id: 89c61cf4ef3d78ea7c09ba6855e0717cfbe022d6
-
Dan Melnic authored
Summary: Fix compile error: error: variable 'b' set but not used [-Werror=unused-but-set-variable] Reviewed By: yfeldblum Differential Revision: D7471259 fbshipit-source-id: 784e874200bb44ec9bddf4a3c12f7a90be12d17b
-
Asier Gutierrez authored
Summary: Added missing installation of UTF8String.h Closes https://github.com/facebook/folly/pull/813 Reviewed By: yfeldblum Differential Revision: D7506038 Pulled By: Orvid fbshipit-source-id: 9821a0040c44715cfd68852743b64a32df0dcf57
-
Orvid King authored
Summary: MSVC 2015 Update 3 can't parse these with curly-brace init'd, so swap the assignment. The result is the exact same. Reviewed By: simpkins Differential Revision: D7508756 fbshipit-source-id: 5e60607f978a87ae8bfed22086d1dccef15759ac
-
- 04 Apr, 2018 9 commits
-
-
Brian Gesiak authored
Summary: Optimized builds of //folly/experimental/coro test Coro.Sleep would almost always fail because the compiler would generate code that would only sleep for 0.98 seconds. Perform some simple rounding in order to ignore slight optimizations like these. Reviewed By: wqfish Differential Revision: D7496416 fbshipit-source-id: f81ff30922fbf3e5d2086fde50f4a469bdf72e51
-
Nathan Bronson authored
Summary: F14HashToken encapsulates the work of hash_function(), which is the same across F14 containers that have the same key_type and equal hash_function() (same type and operator==). This diff adds documentation that callers may rely on this fact, which means they can use this feature to reduce work if a single key is access in multiple maps/sets. (Note: this ignores all push blocking failures!) Reviewed By: shixiao Differential Revision: D7506737 fbshipit-source-id: 321032d619434501b1e0544962e54732bfc4c970
-
Janusz Kudelka authored
Summary: Allow the user to give their own pair implementation. This allows using a packed pair. Reviewed By: yfeldblum Differential Revision: D7504521 fbshipit-source-id: 11888594b8b3ef3f530ebd95b8006ef6f5afbc65
-
Tom Jackson authored
Summary: Terabytes aren't Web Scale. Reviewed By: ot, philippv, luciang Differential Revision: D7479752 fbshipit-source-id: fd353933e642b1ee024c28107c8fcb6a55fe755e
-
Tom Jackson authored
Summary: Until I do a PR on `double_conversion`, we need to work around this by catching the trailing 'e' case. Reviewed By: luciang Differential Revision: D7481130 fbshipit-source-id: 2734dbe834e6cd69c6dfe41d6b4e9a7a548a7da8
-
Jun Li (Wormhole) authored
Summary: When `startFail()` is called, it sets the state to StateEnum::ERROR. There is a chance that immediate read callback is scheduled to run in next event loop. The callback calls handleRead() then triggers `assert(state_ == StateEnum::ESTABLISHED)` in `AsyncSokcet::handleRead`. Cancel any immediate read callback when startFail is called. Reviewed By: yfeldblum Differential Revision: D7051956 fbshipit-source-id: 0d6693d851b272355a4f36ab8d001969fa47750e
-
Brian Gesiak authored
Summary: At `-O0` each coroutine call results in a heap allocation. This combined with the increased memory pressure when using ASAN results in an invalid memory access beyond the maximum address. Avoid the problem by limiting the recursion to 5,000 frames deep, instead of 10,000. This still fulfills the intent of the test, but without pushing the limits of ASAN. Reviewed By: wqfish Differential Revision: D7503976 fbshipit-source-id: 7850a9d9db23328d42c25b74a1290caa7773e6a7
-
Andrii Grynenko authored
Summary: sendRequestSync should only be implemented by channels, which own threads looping EventBases. Reviewed By: phoad Differential Revision: D7464392 fbshipit-source-id: bde6edc85438bb406592291330869972f88c787a
-
Nathan Bronson authored
Summary: Using an array of prehash tokens is quite inconvenient without the ability to default construct them. Reviewed By: shixiao Differential Revision: D7490113 fbshipit-source-id: f802a7dc6dc2c603c4682e5f384d9f135220cd54
-