lp:folly

Created by Sam Spilsbury on 2013-05-10 and last modified on 2019-05-25
Get this branch:
bzr branch lp:folly

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Sam Spilsbury
Project:
folly
Status:
Development

Import details

Import Status: Reviewed

This branch is an import of the HEAD branch of the Git repository at git://github.com/facebook/folly.git.

The next import is scheduled to run in 2 hours.

Last successful import was 3 hours ago.

Import started 3 hours ago on izar and finished 3 hours ago taking 20 seconds — see the log
Import started 9 hours ago on alnitak and finished 9 hours ago taking 20 seconds — see the log
Import started 15 hours ago on izar and finished 15 hours ago taking 20 seconds — see the log
Import started 21 hours ago on alnitak and finished 21 hours ago taking 20 seconds — see the log
Import started on 2019-05-24 on alnitak and finished on 2019-05-24 taking 20 seconds — see the log
Import started on 2019-05-24 on alnitak and finished on 2019-05-24 taking 20 seconds — see the log
Import started on 2019-05-24 on alnitak and finished on 2019-05-24 taking 20 seconds — see the log
Import started on 2019-05-23 on alnitak and finished on 2019-05-23 taking 20 seconds — see the log
Import started on 2019-05-23 on alnitak and finished on 2019-05-23 taking 20 seconds — see the log
Import started on 2019-05-23 on izar and finished on 2019-05-23 taking 25 seconds — see the log

Recent revisions

7189. By Yedidya Feldblum <email address hidden> 16 hours ago

Disable TLS optimization in PIC mode for SingletonThreadLocal

Summary:
[Folly] Disable TLS optimization in PIC mode for `SingletonThreadLocal`.

In PIC mode, TLS offsets must be translated to addresses at runtime via calls to `__tls_get_addr`. Since there is not much of a small inline path or a fast inline fast path anymore anyway in PIC mode, might as well skip the bulky slow caching.

Also, some versions of gcc do not properly support this code in shared libraries. Details in #1135 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90562.

Fixes #1135.

Reviewed By: andriigrynenko

Differential Revision: D15468086

fbshipit-source-id: 038e13f900fe56205c1333a620ea3bfa468c47ad

7188. By Greg McGary <email address hidden> 18 hours ago

Avoid redefinition of mmsghdr with Android NDK unified headers

Summary:
Avoid redefinition of mmsghdr with newer Android NDK unified headers.

Unified headers unconditionally define `struct mmsghdr`, but the `sendmmsg` and `recvmmsg` system calls are conditional on API level. API 21 is the first level that supports them.

Reviewed By: yfeldblum

Differential Revision: D15344307

fbshipit-source-id: 6f03197cc346511ce7a02f1468c35313140a8fd7

7187. By Brandon Schlinker <email address hidden> 19 hours ago

Support TIMESTAMP_TX flag

Summary:
The `TIMESTAMP_TX` flag can be used to signal a request TX / NIC timestamping. This flag needs to be passed through to the application via the `SendMsgParamsCallback::getAncillaryData` callback so that the application can populate a socket control message with the ancillary data required to signal the timestamping request.

`folly::AsyncSSLSocket` has extra logic for tracking the end of record (EOR) byte, but this logic currently only passes through `WriteFlags::EOR`. This diff adds support for passing through any flag specified as an EOR-related write flag when the EOR byte is written. As part of this change, the relevant unit tests are extended / cleaned up (some of them still reference MSG_EOR, which is out of date).

Reviewed By: yfeldblum

Differential Revision: D15465432

fbshipit-source-id: 2ab5619607959dd829427a695aefd95a33b4abce

7186. By Brandon Schlinker <email address hidden> 19 hours ago

Fix ErrMessageCallback test flakyness

Summary: Need to use `readAll` to ensure that we've read in all bytes that were written (up to EOF). Current approach sometimes returns after only a partial read.

Reviewed By: yfeldblum

Differential Revision: D15456484

fbshipit-source-id: f36a596a3557d4d3714bfaa3c33c726d81ccb5a4

7185. By Wez Furlong <email address hidden> 20 hours ago

getdeps: configure testpilot to use collections and tag tests

Summary:
This should enable test pilot to skip broken/flakey tests.

The `--tag-new-tests` flag is only appropriate for code that has been
landed on master and is used by the FB infra to classify new tests
appropriately.

For continuous builds we use a test collection with different parameters
from the normal developer facing flow so that the infra can re-assess
their status and enable/disable high-signal/noisy tests.

Depends: D15495344

Reviewed By: Ben0mega

Differential Revision: D15500955

fbshipit-source-id: f3b7976cec6a5cf70f5d128b38bde11620b26918

7184. By Aaryaman Sagar <email address hidden> on 2019-05-24

Pessimize DistributedMutex::try_lock, update comments and benchmarks

Summary:
A few changes:

- Pessimize DistributedMutex::try_lock() to do a load on the mutex before
  attempting a lock bts. This allows us to be effectively parallel in the case
  where acquiring the mutex is not a hard requirement for the application.
  Whenever perf-sensitive try_lock()s come up, they tend to fit this model -
  where acquiring the mutex allows one thread to make progress, but missing the
  lock doesn't lead to incorrectness. It mostly does not hurt performance, so
  seems like a good thing to have for all cases.
- More unit tests that test progress in the presence of many locks
- Also update comments to be slightly more clear, in particular add a small
  comparison with std::atomic in the first few sentences, and
- Rerun benchmarks on both broadwell and skylake

Reviewed By: djwatson

Differential Revision: D15378164

fbshipit-source-id: 124db4052dadae102a5c04ad9b9f3bcbefe74458

7183. By Rosen Penev on 2019-05-24

Fix compilation without deprecated OpenSSL APIs

Summary: Pull Request resolved: https://github.com/facebook/folly/pull/1127

Reviewed By: reanimus

Differential Revision: D15329439

Pulled By: yfeldblum

fbshipit-source-id: 6c639ef367be6adede2e6a1c487a8d89a146779d

7182. By Matthew Glazar on 2019-05-23

Reuse old build dir on Windows

Summary:
getdeps.py's find_existing_win32_subst_for_path function tries to reuse an existing build directory alias. (On Windows, the build directory is aliased to a drive letter to shorten paths.) If this function does not find and existing build directory alias, getdeps.py invalidates many of its caches.

On my Windows machine, find_existing_win32_subst_for_path always fails, so all of my builds are super slow. This happens because find_existing_win32_subst_for_path is given a path with a lower-case drive letter ("c:\users\..."), but the subst command returns paths with an upper-case drive letter ("C:\users\...").

When comparing paths, use ntpath.normpath. This makes the comparison case-insensitive for drive letters. (It also makes the comparison case-insensitive for other path components.)

On Linux and macOS, this diff should not change behavior.

Reviewed By: wez

Differential Revision: D15466096

fbshipit-source-id: 1669aa0a6eaeb6012154f3a9e24eba3f835262c6

7181. By Yedidya Feldblum <email address hidden> on 2019-05-23

Fix returning reference to temporary in futures test

Summary:
[Folly] Fix returning reference to temporary in futures test.

```
folly/futures/test/FutureTest.cpp: In instantiation of 'typename std::enable_if<(! isTry), R>::type folly::Try<NoThrowTestResult>::get() [with bool isTry = false; R = NoThrowTestResult&&; typename std::enable_if<(! isTry), R>::type = NoThrowTestResult&&]':
folly/futures/Future-inl.h:95:30: required from 'auto folly::futures::detail::wrapInvoke(folly::Try<T>&&, F&&) [with T = NoThrowTestResult; F = Future_NoThrow_Test::TestBody()::<lambda(NoThrowTestResult&&)>]'
folly/futures/Future-inl.h:1209:39: required from 'folly::Future<typename folly::futures::detail::valueCallableResult<T, F>::value_type> folly::Future<T>::thenValue(F&&) && [with F = Future_NoThrow_Test::TestBody()::<lambda(NoThrowTestResult&&)>; T = NoThrowTestResult; typename folly::futures::detail::valueCallableResult<T, F>::value_type = NoThrowTestResult]'
folly/futures/test/FutureTest.cpp:1408:14: required from here
folly/futures/test/FutureTest.cpp:1392:33: warning: returning reference to temporary [-Wreturn-local-addr]
 1392 | return std::forward<R>(value());
```

Fixes #1130.

Reviewed By: LeeHowes

Differential Revision: D15457369

fbshipit-source-id: 045ae3321f957546a6218ee5e3118753e4c8ceb2

7180. By Chris Keeline <email address hidden> on 2019-05-23

Allow calls to runInMainContext during exception handling

Summary:
This should be ok to do. Main thing I'm not sure about is if it's ok
to change these DCHECKs to CHECKs. We could probably also pass state into
InlineFunctionRunner::run() to keep these as DCHECKS here and CHECK in our
implementation.

Reviewed By: andriigrynenko

Differential Revision: D15463243

fbshipit-source-id: c1de7198e8bf48d8af0e03361bed493642e6c173

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers