- 21 Jan, 2016 2 commits
-
-
Kyle Nekritz authored
Summary: So that these deleter and unique_ptr types don't have to be redeclared every single place they are used. To be expanded on. Reviewed By: mzlee Differential Revision: D2850376 fb-gh-sync-id: e7f8bba320163b8b12a93b5cf3cd9a5921d38edc
-
Dmitry Pleshkov authored
Summary: k-th bit selection could be efficiently implemented via new BMI2 instruction set. Reviewed By: ot, philippv Differential Revision: D2843311 fb-gh-sync-id: 4c0cf52176a03422aef276ce5f677080f67f5fdf
-
- 20 Jan, 2016 2 commits
-
-
Michael Lee authored
Summary: StringTest.cpp is a mix of benchmarks and normal unittests. Fixing this. Reviewed By: yfeldblum Differential Revision: D2840804 fb-gh-sync-id: d3efc357f5f09385e9f69b70e38b64d59045ff0d
-
Michael Lee authored
Summary: Starting with this, but I will keep digging through these. The tests will be compiled into one combined test with a single main. Reviewed By: yfeldblum Differential Revision: D2841391 fb-gh-sync-id: 78fd153e282f1ca2dbe7ada942dc04fc8ba5d42d
-
- 19 Jan, 2016 1 commit
-
-
Alan Frindell authored
Summary: Needed to use StringPiece with boost::algorithm::trim() Reviewed By: yfeldblum Differential Revision: D2833657 fb-gh-sync-id: 3430b1a2540279b2f69f04c871df3bca748f2cb1
-
- 15 Jan, 2016 3 commits
-
-
Alexey Spiridonov authored
Summary: Null by itself was printing as 0, now it prints as null, which is consistent with the 'pseudo json' output. Reviewed By: yfeldblum Differential Revision: D2789284 fb-gh-sync-id: f318b8d0f8349f4b36f868c419842fb50bee9517
-
Aaron Balsara authored
Summary: D2800746 broke buck with an unsigned/signed compare Reviewed By: dkgi Differential Revision: D2835102 fb-gh-sync-id: a0b8311b38a199e089d3ed5a69b12f8f8abe38b1
-
Aaron Balsara authored
Summary: Added the ability for SSLContext to load X509 Certificates and private keys from memory Reviewed By: yfeldblum Differential Revision: D2800746 fb-gh-sync-id: 14cad74f8d761b9b0f07e2827b155cec9ba27f50
-
- 14 Jan, 2016 2 commits
-
-
Francis Ma authored
Summary: folly::fibers have a bunch of dependencies that are shaky on mobiles. Decoupling it by using folly::Baton instead of folly::fibers::Baton. Should have zero effect on fbcode cases. Reviewed By: djwatson, yfeldblum Differential Revision: D2821603 fb-gh-sync-id: 0ce3472c9eedf97224e8584d25e04515396cd18e
-
Rachel Kroll authored
Reviewed By: yfeldblum Differential Revision: D2828789 fb-gh-sync-id: 71e45ffe31061220e06d7e7762058f8a1501b5cc
-
- 13 Jan, 2016 2 commits
-
-
Michael Lee authored
Summary: Adding the standard preprocessor guard around the `#define __STD_LIMIT_MACROS` in IOBuf.cpp. public Reviewed By: knekritz Differential Revision: D2825816 fb-gh-sync-id: 191824ec8d1f837e2b8380a2f8451972c421ceaa
-
Michael Lee authored
Summary: Provide a more Android compatible version of sformat. Reviewed By: sgolemon Differential Revision: D2825105 fb-gh-sync-id: ce328d17b9f8008d81bc7dd5bf7f0905e560dfe1
-
- 12 Jan, 2016 1 commit
-
-
Rachel Kroll authored
Reviewed By: yfeldblum Differential Revision: D2816450 fb-gh-sync-id: 3d3b0bf20a3f20570f847e3c5ec91a5e3786a370
-
- 11 Jan, 2016 1 commit
-
-
Kyle Nekritz authored
Reviewed By: siyengar Differential Revision: D2805183 fb-gh-sync-id: 9ed320dd3762658e993daa658100d0c3c617d210
-
- 09 Jan, 2016 2 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] `SingeltonVault::ScopedExpunger` - RAII class to clear singletons. Clears all singletons in the given vault at ctor and dtor times. Useful for unit-tests that need to clear the world. This need can arise when a unit-test needs to swap out an object used by a singleton for a test-double, but the singleton needing its dependency to be swapped has a type or a tag local to some other translation unit and unavailable in the current translation unit. Other, better approaches to this need are "plz 2 refactor" .... Reviewed By: andriigrynenko Differential Revision: D2802459 fb-gh-sync-id: c24cebd3a464ed5da29ea1d9e7b86c51d61cf631
-
Andrii Grynenko authored
Reviewed By: alikhtarov Differential Revision: D2813735 fb-gh-sync-id: ab3c3e18618ed8bf15f478bcfca008786834e65c
-
- 08 Jan, 2016 2 commits
-
-
Pallab Bhattacharya authored
Summary: added functionality in Symbolizer.cpp to handle multi-segment binary and to allow symbol lookup via /proc/self/exe when some or whole text is relocated to ANON pages such as during hugification. An example of multi-segment binary : P56071432 cc markw65 - a part of the change include logic pulled from hphp/runtime/base/stack-logger.cpp:symbolize_huge_text so that hugified consumers of dumpStackTrace need not fork off. Reviewed By: edwardc Differential Revision: D2802837 fb-gh-sync-id: 577ab1b4ef8f22059894bfdd9c0526a22ee89ca8
-
Giuseppe Ottaviano authored
Summary: `insert()` returns `fbstring` in most cases, but `iterator` (that is, `value_type*`) when the first argument is an iterator. Two overloads of `operator+` used `insert` as if it returned `fbstring`, which by chance works anyway unless the resulting string contains a `'\0'` (plus it does an extra string copy). This diff fixes the bug. Reviewed By: philippv, luciang, Gownta Differential Revision: D2813713 fb-gh-sync-id: 015188b72813da2dabe23980f50f00832d62aa14
-
- 06 Jan, 2016 1 commit
-
-
David Callahan authored
Reviewed By: yfeldblum Differential Revision: D2803911 fb-gh-sync-id: 65023cae7fd8e06c30fed100826b4b834ee2e9b1
-
- 05 Jan, 2016 4 commits
-
-
Gustavo Serra Scalet authored
Summary: This PR is necessary for both Folly and HHVM to compile on PPC64 (https://github.com/PPC64/hhvm) and other platforms that are not compatible with SSE instructions. It also removes GroupVarint32 tables generator dependency on x86 platform. Closes https://github.com/facebook/folly/pull/339 Reviewed By: mxw Differential Revision: D2760156 fb-gh-sync-id: b4e93b54b62d6f68ccf684d34840678f677bf276
-
David Callahan authored
Reviewed By: lbrandy Differential Revision: D2803778 fb-gh-sync-id: 0cb21413bb1c78d256b4408322f8d585f53cb0ac
-
Neel Goyal authored
Summary: Determine if the cursor can advance N bytes. This is useful if applications want to check before reading so an exception isn't thrown. It tries to walk the minimal amount of links needed in the chain. I had a task that could have used this, though caching totalLength and macro magic ended up being the implementation chosen. I think this just adds to the cursor API. Reviewed By: djwatson Differential Revision: D2728498 fb-gh-sync-id: 8657653b82a48828cccab143653dc169ef715702
-
Michael Lee authored
Summary: SYS_gettid is different on Linux vs. OSX. `__NR_gettid` is only sometimes present and `SYS_gettid` is only sometimes present, but we can pick one name and just follow that one. Reviewed By: dcolascione Differential Revision: D2800515 fb-gh-sync-id: 4245de4b9184ac4233ade9da297409c1031869a3
-
- 04 Jan, 2016 1 commit
-
-
Michael Lee authored
Summary: Clean up and remove unecessary gflags use. Reviewed By: yfeldblum Differential Revision: D2795904 fb-gh-sync-id: 99cccb4dc32a051b3d552b72cbc9243e20ba8127
-
- 30 Dec, 2015 1 commit
-
-
Giuseppe Ottaviano authored
Summary: When a large number of processes concurrently bind and close `AsyncServerSocket`s with `port=0` (for example in tests) binding the IPv4 socket on the same port bound with the IPv6 socket can currently fail, because sockets are closed in the same order as they are opened, which makes the following scenario possible: ``` P0: close IPv6 port P1: open IPv6 port (succeed) P1: open IPv4 port (FAIL) P0: close IPv4 port ``` This diff reverses the closing order, and also fixes a couple of outdated comments. Reviewed By: philippv Differential Revision: D2795920 fb-gh-sync-id: 0b5157a56dfed84aed4a590c103050a2727847b3
-
- 28 Dec, 2015 1 commit
-
-
Samrat Bhattacharya authored
Summary: As above Reviewed By: alandau Differential Revision: D2791829 fb-gh-sync-id: 8ae5b875464dfa910b88dc12465879a9420d398c
-
- 24 Dec, 2015 2 commits
-
-
Dominik Gabi authored
Reviewed By: yfeldblum Differential Revision: D2784472 fb-gh-sync-id: 84c7426cc82edabb04c662fa699764ffc0864b7e
-
Dominik Gabi authored
Summary: adding GCC compatible wrappers for clang attributes to folly. Reviewed By: yfeldblum Differential Revision: D2706913 fb-gh-sync-id: 17db34089d48a6a01c20904321a47ff98141c2fe
-
- 23 Dec, 2015 4 commits
-
-
Michael Lee authored
Summary: SYS_gettid is not available on all platforms, but __NR_gettid should be. Reviewed By: dcolascione Differential Revision: D2787003 fb-gh-sync-id: ee024437ac95281a3573e2440653847f6f7d1738
-
Giuseppe Ottaviano authored
Summary: `dynamic` is one of the few unfortunate recursive types that have a constructor of the form `T(initializer_list<T>)`. After the Defect Report 95 (http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1467) a statement `T t = {v};` where `v` is of type `T` invokes the copy constructor instead of the initializer list constructor. Clang 3.7 implements the new behavior, and GCC probably will soon. This diff only fixes a test where the ambiguous syntax is used, but a better solution would be preferable. Reviewed By: philippv Differential Revision: D2786455 fb-gh-sync-id: 7fa5235e4041cbc8dd3ce685b5a0c23c343f78d2
-
Mike Kolupaev authored
Summary: D2078239 added a template method to HistogramBuckets but didn't add an instantiation for it, similar to getPercentileBucketIdx() and getPercentileEstimate() (see comment in Instantiations.cpp). This diff adds it, making `computeTotalCount()` usable without including `Histogram-defs.h`. Also removes the weird `const` in return type. Reviewed By: simpkins Differential Revision: D2783534 fb-gh-sync-id: 9226489820116e0cbcb1f6a631b389439558061e
-
Michael Lee authored
Summary: This is not used within the file. Cleaning up. Reviewed By: yfeldblum Differential Revision: D2784500 fb-gh-sync-id: 60270cb20c40b79f988c5536fa00e0a0f1d08e46
-
- 21 Dec, 2015 1 commit
-
-
Michael Lee authored
Summary: Move ThreadLocal.h out of Random.h so we don't over include. Reviewed By: yfeldblum Differential Revision: D2770085 fb-gh-sync-id: e6934d606236c2b5cdde728639f372641ee716dc
-
- 18 Dec, 2015 1 commit
-
-
Kosov Eugene authored
Summary: Fixing by deleting unnecessary macro checks - folly already requires at least g++4.8 Closes https://github.com/facebook/folly/pull/338 Reviewed By: yfeldblum Differential Revision: D2742024 Pulled By: fredemmott fb-gh-sync-id: c0ecc7edceeebd1f972b0be4f4740214211f1c24
-
- 17 Dec, 2015 3 commits
-
-
Andrii Grynenko authored
Summary: Existing scheduleThreadSafe implementation had 2 potential races on destruction: 1. (very unlikely) insertHead is complete, but fiber loop is already running on another thread, so it finishes processing all of the fibers, destroys FiberManager or EventBase or both. By the time we get to scheduleThreadSafe EventBaseLoopController is already destoyed 2. (more likely) scheduleThreadSafe is complete, but FiberManager loop which is already running, picks complete fiber, finishes the processing. After that FiberManager may be destoyed. So when EventBase actually executes the callback FiberManager is already dead. This solution fixes both races. Holding the alive shared_ptr when completing sheduleThreadSafe assures EventBase can't be destoyed until its completed (or it won't try to schedule anything after EventBase was destroyed). Locking alive weak_ptr in the EventBase loop callback ensures FiberManager and thus EventBaseLoopController were not destroyed yet (they can be destoyed only by the same thread which is running EventBase loop). Reviewed By: spalamarchuk Differential Revision: D2763206 fb-gh-sync-id: 1972d6c0c11aa931747ebdaed4029a209130f69c
-
Michael Lee authored
Summary: Add configuration for disabling unaligned reads in SpookyHashV2 Reviewed By: yfeldblum Differential Revision: D2750885 fb-gh-sync-id: 9f48dcdfd5af05478a38e354f6fa0332b1332c14
-
Bin Liu authored
Summary: There is an optimized assembler version of memcpy that is showing 1.5% gain on TAO, add it to folly Reviewed By: yfeldblum Differential Revision: D2218473 fb-gh-sync-id: d5ac7f5ab30ff6febe7e94b017766c68dbd8934d
-
- 15 Dec, 2015 3 commits
-
-
Lovro Puzar authored
Summary: gzip files can be easier to work with operationally than raw zlib thanks to gzip+gunzip. zlib supports adding/stripping the gzip header; expose that through a new CodecType. Reviewed By: chipturner Differential Revision: D2759554 fb-gh-sync-id: 67e0f5f88e087d363db1c349cabb909fb3f00417
-
Neel Goyal authored
Summary: Change next pick logic to use `std::discrete_distribution`. Use folly::Random::DefaultGenerator as the generator. Update the TARGETS to have sslcontext depend on random (which was the build break in D2741855) Reviewed By: siyengar Differential Revision: D2749166 fb-gh-sync-id: 7a6b400173b1e8c69a961f9e75e97d4777d5467a
-
Yang Chi authored
Summary: this is way simpler than D2623385 + D2709121. There will be a followup diff to clean the existing per-write call BufferCallback. The new one is on per-socket basis, much straightforward. I will only setup this in HTTPUpstreamSession. Reviewed By: afrind Differential Revision: D2723493 fb-gh-sync-id: 6b1c21a719281b9693330b6a4074f7149d7c342a
-