- 13 Mar, 2020 3 commits
-
-
Mohamad Gebai authored
Summary: When n = 1, `oneIn` is always true. This can be used to avoid generating a random number. Reviewed By: yfeldblum Differential Revision: D20267645 fbshipit-source-id: 0c0bde1e80389f11ffdb0ad0f0de053d47b9f760
-
Shrikrishna Khare authored
Summary: Next OpenNSA release with increased stack size (needed for FBOSS) is available. Start linking with it. Differential Revision: D20062997 fbshipit-source-id: 9938270c322087ac3990861aa1ddd3b9ea1148ac
-
Dan Melnic authored
Summary: Add UDP GRO support Reviewed By: mjoras Differential Revision: D20347326 fbshipit-source-id: be3c31f070c4f2c1ef84f9e2df60f49a5fcabd93
-
- 12 Mar, 2020 6 commits
-
-
Victor Zverovich authored
Summary: Move `toStdString` to `FBString.h` because it's fbstring-related and remove the dependency between `String.h` and `FBString.h`. This is possible because the only other use of fbstring in `String.h` is removed in previous diff. Reviewed By: yfeldblum Differential Revision: D20195591 fbshipit-source-id: b5ff7c918669e063e24bf91155a2496f82d7e975
-
Dan Melnic authored
Summary: Add ThreadWheelTimekeeperHighRes class Reviewed By: LeeHowes Differential Revision: D20355093 fbshipit-source-id: b76563a3706d7732b490a88096fed484954820e5
-
Mohamad Gebai authored
Summary: It looks like that test file was deleted, but it was still referenced in a CMakeLists.txt file. Reviewed By: yfeldblum, Gownta Differential Revision: D20365343 fbshipit-source-id: 40792bb9c526e1aef48062b0e560646bdcf201b8
-
Maged Michael authored
Summary: Add support for onClear() callback function to RequestData. The callback is to be executed on the last clearing of RequestData. This typically happens upon the destruction of the last RequestContext that contains the RequestData or due to explicit calls to RequestContext::clearContextData that remove the RequestData from the RequestContext. The onClear() callback is executed exactly once. If there are no calls to clearContextData, then onClear is executed upon the destruction of the last RequestContext that refers to the RequestData. If there are calls to clearContextData, then onClear is executed upon the removal of the last reference to the RequestData from a RequestContext. RequestData::hasCallback() applies only to onSet() and onUnset() which may be called multiple times, whereas onClear() is called exactly once. If a class derived from RequestData overrides onClear and either or both of onSet and onUnset, then care must be taken that the callbacks are mutually safe, as it is possible for the execution of onClear to be concurrent with executions of onSet and onUnset. Motivation: Some uses of RequestContext::clearContextData expect the immediate destruction of associated RequestData. The hazard pointer-based implementation of RequestContext guarantees only that all associated RequestData is destroyed before the completion of the destructor of the RequestContext. This callback provides users of RequestContext more control of the timing of executing actions related to clearing the data. The addition of this capability is intended to provide a tool to eliminate differences in timing of executing actions between the two implementations of RequestContext (hazard pointer-based vs. read lock-based). Also, fixes a minor bug in request_context_test, where the key "test2" was used in two tests (setIfAbsentTest and deadlockTest) without being cleared, which generated a warning when the tests were run in the same process. Reviewed By: davidtgoldblatt Differential Revision: D20332008 fbshipit-source-id: c9cefffb28c8da098e97f851f31d29a1bf704061
-
Yixian Jiang authored
Summary: Clean the sigar build dependency completely under: - fbcode/fbzmq/public_tld/build/... - fbcode/openr/public_tld/build/... Delete files: - fbcode/opensource/fbcode_builder/manifests/sigar - fbcode/opensource/fbcode_builder/specs/sigar.py Reviewed By: steven1327 Differential Revision: D20376067 fbshipit-source-id: 3321a14df2551525acee605028ef06a04cda7c6a
-
Alex Guzman authored
Summary: This is mainly used for logging, and we can elide an unnecessary copy in some cases. Reviewed By: mingtaoy Differential Revision: D20402430 fbshipit-source-id: 79b73792a69cf2817ffb88b07d9973139c3c67bb
-
- 11 Mar, 2020 2 commits
-
-
Dan Melnic authored
Summary: Split WTCallback cod Reviewed By: LeeHowes Differential Revision: D20355082 fbshipit-source-id: 9ead4905cafeef27a9e2956fc50ebd59098cb80e
-
Dan Melnic authored
Summary: Use decltype(event::ev_fd) instead of #ifdef (Note: this ignores all push blocking failures!) Reviewed By: yfeldblum, kevin-vigor Differential Revision: D18525100 fbshipit-source-id: 7cef32def7b40c71b2298f9dc354fbe63607fb8e
-
- 10 Mar, 2020 4 commits
-
-
Laurent Stacul authored
Summary: As written in the documentation, {fmt} should be built alongside folly. This is not possible in my case. My usecase is to provide some kind of small distribution of shared libraries that can be installed on any systems. Hence I really need to have libfmt treated as a normal shared lib. Moreover, libfmt can be consumed on our side as a normal library outside on cmake. We do not provide the cmake config file which are strongly dependent on the system on which libfmt is installed. My proposal is to first look for the fmt-config.cmake as it is now but in case of cmake support is not provided by system, we fall back to a normal library lookup. Pull Request resolved: https://github.com/facebook/folly/pull/1328 Reviewed By: simpkins Differential Revision: D20312046 Pulled By: yfeldblum fbshipit-source-id: 2d6b4917b37a8ed1d553600599702259db22c212
-
Dmytro Stechenko authored
Reviewed By: Orvid Differential Revision: D20353603 fbshipit-source-id: 1910261be637237923b1f1d6a56fc954554176d2
-
Victor Zverovich authored
Summary: The result of `errnoStr` is often converted to `std::string` so returning `fbstring` adds an extra copy. Make it return `std::string` instead. This will also allow removing dependency between `String.h` and `FBString.h`. (Note: this ignores all push blocking failures!) Reviewed By: yfeldblum Differential Revision: D20195395 fbshipit-source-id: 0dc65f1566911156be3fcb715dd105c58f2a8822
-
Wez Furlong authored
Summary: Ideally we'd be using mkscratch, but this still isn't shipped to our Windows systems. Pick a path that is more friendly to our corp windows environment by default. Reviewed By: pkaush Differential Revision: D20342277 fbshipit-source-id: c85bccee6701adc03b26c92ba217b18bd684257a
-
- 08 Mar, 2020 2 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Cut `CachelinePadded` after migrating all uses to `cacheline_aligned`. Reviewed By: aary Differential Revision: D19657696 fbshipit-source-id: d2e5b4695bdc3734340723d5d3681e724734691e
-
Laurent Stacul authored
Summary: When Gtest cannot be discovered by CMake config file, the tests fails to compile: ``` In file included from /home/docker/opensource/folly/folly/test/common/TestMain.cpp:23: /home/docker/opensource/folly/folly/portability/GTest.h:32:10: fatal error: gtest/gtest.h: No such file or directory 32 | #include <gtest/gtest.h> | ^~~~~~~~~~~~~~~ ``` This PR fixes this problem with a classic `find_package`. Pull Request resolved: https://github.com/facebook/folly/pull/1331 Differential Revision: D20323404 Pulled By: yfeldblum fbshipit-source-id: 2e41f99172c504063c00c45a9fa5c08a26bcc0c8
-
- 06 Mar, 2020 5 commits
-
-
Lee Howes authored
Summary: Migration from Future-returning executor-erasing collectX forms to SemiFuture-returning forms, that are less risky in particular with coroutines. An earlier change added collectXSemiFuture. This diff adds collectXUnsafe as a migration path. Reviewed By: yfeldblum Differential Revision: D20255061 fbshipit-source-id: 379b5ed95aa7782aa121dba8e84cb48f802a57cd
-
Lee Howes authored
Summary: SingletonThreadLocal is not needed by Future.cpp. Reviewed By: Orvid Differential Revision: D20142400 fbshipit-source-id: d0f3b7c1bbef03226c8d6264abeb96822587a465
-
Oded Horovitz authored
Summary: As title. Expose the useful portable mlock2() wrapper. Reviewed By: alikhtarov Differential Revision: D20239849 fbshipit-source-id: 0fa776faf29ad69e551dfbe6eb69369560800a0e
-
Jason Meisel authored
Summary: Cast from unsigned to signed *before* negating. The resulting assembly code is the same, but there's no warning. Reviewed By: yfeldblum, jdonald Differential Revision: D19588115 fbshipit-source-id: d0d61ab0543211e2399f42a86a7a7a2366679d37
-
Dave Rigby authored
Summary: The absence of GFlags is already partially optional - portability/GFlags.h defines a number of stub macros / clases if FOLLY_HAVE_LIBGFLAGS is false. However the top-level CMake rules don't correctly handle when GFlags isn't present - they unconditionally add GFlags-related variables to CMAKE_REQUIRED_xxx variables. Additionally there are a couple of source files which should not be compiled if GFlags isn't available. Pull Request resolved: https://github.com/facebook/folly/pull/1325 Differential Revision: D20252030 Pulled By: yfeldblum fbshipit-source-id: 7c3441e8b2850d68df125fb9c14b8417f4d08b55
-
- 05 Mar, 2020 2 commits
-
-
Mark Santaniello authored
Summary: Support the brand-new TCMalloc version that was just released. Reviewed By: luciang Differential Revision: D19943852 fbshipit-source-id: 10ae07051d2bc56a502ee0d5e5767035cf53794f
-
Yixian Jiang authored
Summary: Replace the methods to get CPU and memory usage statistics: - For the memory: use `VmRSS` of `/proc/[pid]/status`: http://man7.org/linux/man-pages/man5/proc.5.html - For the CPU%: calculate the process is occupied how much percentage of the CPU time, use `getrusage()`: http://man7.org/linux/man-pages/man2/getrusage.2.html - Implemented like the sigar: https://our.intern.facebook.com/intern/diffusion/FBS/browse/master/third-party/sigar/src/sigar.c?commit=4f945812675131ea64cb3d143350b1414f34a351&lines=111-169 - Formula: - CPU% = `process used time` during the period / `time period` * 100 - `time period` = current query timestamp - last query timestamp - `process used time` = current `process total time` - last query `process total time` - `process total time` = CPU time used in user mode + CPU time used in system mode // get from the API `ru_utime` and `ru_stime` Remove the `fbzmq::ResourceMonitor` and `sigar`: - Change and rename the UT - `ResourceMonitorTest.cpp` -> `SystemMetricsTest.cpp` - `ResourceMonitor` -> `SystemMetricsTest` in `openr/tests/OpenrSystemTest.cpp` - Remove `ResourceMonitor` code and dependency for `Watchdog` and `ZmqMonitor` - Remove `sigar` dependency used in building Reviewed By: saifhhasan Differential Revision: D20049944 fbshipit-source-id: 00b90c8558dc5f0fb18cc31a09b9666a47b096fe
-
- 04 Mar, 2020 5 commits
-
-
Haijun Zhu authored
Summary: This seems to not happen reliably and causes rss to grow. The `__dealloc__` cannot fix it completely, although I verified it is called. So calling it explicitly seems to guarantee it to happen. Reviewed By: yfeldblum Differential Revision: D20206887 fbshipit-source-id: 6285a8e8943a53d20714e54efd3220a545010102
-
Yang Chi authored
Summary: as title, just to add a mock function Reviewed By: yfeldblum, lnicco Differential Revision: D20130909 fbshipit-source-id: 469d904cce93dc8e88c5dc4728b1f1fbd0baf798
-
Giuseppe Ottaviano authored
Summary: We have noticed some inappropriate uses of `assume_unreachable()`, and we believe that the documentation does not convey strongly enough that it is not an assertion. This diff moves the implementation to a separate header (as the assertions in there might be misleading) and fleshes out more the intended use cases. Reviewed By: yfeldblum, mkatsevVR, luciang Differential Revision: D20182339 fbshipit-source-id: 8a3be1ada06dead7ea936971c42c4f30389fc23a
-
Yedidya Feldblum authored
Summary: [Folly] Fix `small_vector::insert` with non-random-access iterator arguments. Closes https://github.com/facebook/folly/issues/1322. Reviewed By: ot, terrelln Differential Revision: D20150453 fbshipit-source-id: 184e748dcbb7cb60318b5f0a3104d9aeb8352d7b
-
Amlan Nayak authored
Summary: Codel is statically initialized with some default target delay and interval period. It would be useful to have the ability to update these parameters at runtime to fine tune load shedding to a given use case. Adding methods here to update the target delay and interval parameters. Reviewed By: yfeldblum Differential Revision: D19987838 fbshipit-source-id: 4d67277f38037840883f6d9d5fd2d5f9be760f44
-
- 03 Mar, 2020 4 commits
-
-
Ján authored
Summary: `type_traits` needed for `std::enable_if_t` Reviewed By: yfeldblum, Orvid Differential Revision: D20196749 fbshipit-source-id: 4d4e44c523959dda1f04b452d65880ca3401e036
-
Phil Willoughby authored
Summary: Might as well store the count of newlines in the Log Message - as the field is already padded to <pointersize> bytes by the alignment requirements of the field either side it will not use any more space than the existing `bool` Reviewed By: simpkins Differential Revision: D20200298 fbshipit-source-id: 84cc52898069eae1af5bd0f103d4ab3177c45206
-
Dan Melnic authored
Summary: Add support for futures folly::HighResDuration Reviewed By: kevin-vigor Differential Revision: D19981652 fbshipit-source-id: 4a321fda487d5acdee04d138b0e4f0f10a4119f1
-
Yedidya Feldblum authored
Summary: [Folly] Avoid uses of gflags integer aliases, preferring std integer aliases. Reviewed By: WillerZ, vitaut Differential Revision: D20204609 fbshipit-source-id: e00b183ab2574af7ea064b9602f1ab8efced50b0
-
- 28 Feb, 2020 3 commits
-
-
Nathan Bronson authored
Summary: g++ aggressively inlines F14VectorMap::operator[] calls from some testing loops with the loop index as a key. On platforms that have SSE2 but not SSE4.2 we use a multiplication and xor based bit mixer, which undergoes a strength reduction in optimized builds. Somehow the resulting code miscalculates the result (no minimal repro yet), which causes the tests to persistently fail. This diff blocks the compiler optimization, allowing the tests to pass. Reviewed By: yfeldblum Differential Revision: D19910180 fbshipit-source-id: 6cccba67645481061f923bd7b3e681df573c4039
-
Yedidya Feldblum authored
Summary: [Folly] Let `Init` work without `gflags` support. Reviewed By: simpkins Differential Revision: D20150102 fbshipit-source-id: ceaae7ec3373f46457ba0d2a524b1223dec9961c
-
TJ Yin authored
Reviewed By: vitaut Differential Revision: D20098574 fbshipit-source-id: 409c3c1e7716a38f253fa3d0d8afe615139426cc
-
- 27 Feb, 2020 4 commits
-
-
Saif Hasan authored
Summary: This diff adds fb303 dependency to Open/R. fb303 is FB's open-sourced project which provides basic infrastructure for thrift service e.g. base functions, counters supports etc. Using this in Open/R will allow both internal & external users leverage counters via thrift APIs Reviewed By: xiangxu1121 Differential Revision: D20134243 fbshipit-source-id: 23782ec99dc749dd27dc19f2b2b023f1c229608b
-
Lewis Baker authored
Summary: Adds a few simple benchmarks to get an idea for the overhead of `folly::coro::Task` coroutines. Reviewed By: yfeldblum Differential Revision: D19729527 fbshipit-source-id: cdfbd5c408c24dd258c56bc159af0c03cb1cd55e
-
Andrew Huang authored
Summary: As a step to eventually supporting TLS 1.3 by default for OpenSSL, we want to add the ability to selectively enable TLS 1.3 in folly::SSLContext. Reviewed By: mingtaoy Differential Revision: D20102778 fbshipit-source-id: 0865821ad2730482e797b888d16561b6989dca62
-
Mark Santaniello authored
Summary: We should probably just free this. Reviewed By: yfeldblum Differential Revision: D20119718 fbshipit-source-id: 2a6c79730243b7af5ba90dac631ce0c8e1e0e6a4
-