Skip to content

Tags: aminya/folly

Tags

v2024.09.16.00

Don't disable folly tracepoints on Android

Summary:
Folly tracepoints were initially disabled on Android in D13293303 landed in 2018 when only x86 tracepoints were supported. D57171286 landed in May 2024 added support for aarch64 tracepoints, but remained disabled on Android by default.

This diff removes the no longer unnecessary flag and enables tracepoints by default.

Differential Revision: D62638793

fbshipit-source-id: c3f89d19d911b748dcc26bebb56392666bee99f6

v2024.09.09.00

folly io_uring: properly zero initialise folly::IoUringOp

Summary: Properly zero initialize `sqe_`, `cqe_` and `iov_` in `folly::IoUringOp`.

Reviewed By: capickett

Differential Revision: D62283277

fbshipit-source-id: 58feabccaa99df5940321d3a9594a18abca2126c

v2024.09.02.00

Remove extra semi colon from folly/experimental/coro/Merge-inl.h

Summary:
`-Wextra-semi` or `-Wextra-semi-stmt`

If the code compiles, this is safe to land.

Reviewed By: Orvid

Differential Revision: D57975880

fbshipit-source-id: 2d60cb964fc917722e735c1afce1412f0f4c4458

v2024.08.26.00

Back out "Back out "Revert D61286579""

Summary:
Original commit changeset: 251ac011c75f

Original Phabricator Diff: D61629106

Reviewed By: dogdoggoos

Differential Revision: D61776376

fbshipit-source-id: aa8a17c55ccedd8e5c218ab19f985bace26fe2dd

v2024.08.19.00

Reduce duplication between `TaskPromise` specializations

Summary: Make the `TaskPromise<>` leaf classes as simple as they can be. This shortens the code by 30 lines, and makes it easier to follow.

Reviewed By: yfeldblum

Differential Revision: D61249849

fbshipit-source-id: c12ca1d96c2c99fd85d53df9a77146450d525ca6

v2024.08.12.00

Create an enum for superconsole interaction toggles

Summary:
Current implementation of console toggles relies on `char` and display is error-prone (.e.g we forgot to add `x` option to the Help). I initially tried to fix this in D60960924 but then realized that this could happen in the future. Better to make it type-safe so that we get it for free (via `strum::EnumIter`).

Also rename  `ConsoleInteraction` to `SuperConsoleInteraction`  to signify that these only for for superconsole.

Reviewed By: stepancheg

Differential Revision: D60965981

fbshipit-source-id: e0008b46dd752446b45877e6f0c2acf43f528c7b

v2024.08.05.00

folly concepts facebook#1 (facebook#2249)

Summary:
Pull Request resolved: facebook#2249

We have a need for some common concepts that are used in many places.

This is a proposal, please let me know what you think.

Usages example:

`uncvref_same_as`:

https://www.internalfb.com/code/fbsource/[a71ce59323a15fd7559d6132c1f8e2d0256ca7cb]/fbcode/multifeed/entrepot/lib/zdb_manager/ZdbUtil.h?lines=237

`uncvref_instantiated_from`:

https://www.internalfb.com/code/fbsource/[b366209d2c108133a0545edc7943b9461323623b]/fbcode/multifeed/mfaction/MFHashSerializer.h?lines=38

Reviewed By: yfeldblum

Differential Revision: D59396081

fbshipit-source-id: 4912c2f9fe683f4d3b37fce43466c9281d03ce13

v2024.07.29.00

Add `SparseByteSet::size()` method

Summary:
Useful, when `SparseByteSet` used as fast pre check for heavyweight
operation.

Reviewed By: marksantaniello

Differential Revision: D60285173

fbshipit-source-id: 8deac984b0f00096448af51fdfee283d0bb13ca2

v2024.07.22.00

simplify cache local/lifetime coordination in SingletonRelaxedCounter

Summary:
Rather than giving up on constraining the cache thread_local local and cache thread_local lifetime to be in the same DSO, now constrain it and assert on the constraint. This allows the cache thread_local local and the cache thread_local lifetime to be 1:1 with each other, rather than M:N with each other without the constraint.

Note that there is now no cross-DSO merging of these thread_local variables - they are now explicitly per-DSO.

Differential Revision: D59144274

fbshipit-source-id: 73b3a426059321bb9abfcb92fdbdd3547656adc8

v2024.07.15.00

folly: fix github ci tests on macos arm (facebook#2253)

Summary:
These were [failing on github](https://github.com/facebook/folly/actions/runs/9923539774/job/27413784309#step:48:6919)

I think the problem was the macos runner changed from intel to arm, expectations needed updating for arm.

Pull Request resolved: facebook#2253

Test Plan:
```
./build/fbcode_builder/getdeps.py --allow-system-packages build --src-dir=. folly

./build/fbcode_builder/getdeps.py --allow-system-packages --no-facebook-internal test --no-testpilot folly
```

Before, broken
```
+ /opt/homebrew/opt/cmake/bin/ctest \
+      --output-on-failure \
+      -j \
+      3 \
+      --rerun-failed
Test project /private/var/folders/xz/lz5thm6s3vb1vdkk77vmkgbr0000gn/T/fbcode_builder_getdeps-ZUsersZrunnerZworkZfollyZfollyZbuildZfbcode_builder/build/folly
    Start 1646: arena_test.Arena.SizeSanity
    Start 2039: constexpr_math_test.ConstexprMathTest.constexpr_exp_floating
1/2 Test facebook#1646: arena_test.Arena.SizeSanity ....................................***Failed    0.01 sec
Note: Google Test filter = Arena.SizeSanity
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from Arena
[ RUN      ] Arena.SizeSanity
/Users/runner/work/folly/folly/folly/memory/test/ArenaTest.cpp:81: Failure
Expected: (arena.totalSize()) <= (maximum_size), actual: 1544 vs 1536

/Users/runner/work/folly/folly/folly/memory/test/ArenaTest.cpp:91: Failure
Expected: (arena.totalSize()) <= (maximum_size), actual: 1544 vs 1536

[  FAILED  ] Arena.SizeSanity (0 ms)
[----------] 1 test from Arena (0 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (0 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] Arena.SizeSanity

 1 FAILED TEST

2/2 Test facebook#2039: constexpr_math_test.ConstexprMathTest.constexpr_exp_floating ...***Failed    0.01 sec
Note: Google Test filter = ConstexprMathTest.constexpr_exp_floating
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from ConstexprMathTest
[ RUN      ] ConstexprMathTest.constexpr_exp_floating
/Users/runner/work/folly/folly/folly/test/ConstexprMathTest.cpp:990: Failure
Expected equality of these values:
  std::exp(471.L)
    Which is: 3.5702693074778485e+204
  a
    Which is: 3.5702693074778518e+204

[  FAILED  ] ConstexprMathTest.constexpr_exp_floating (0 ms)
[----------] 1 test from ConstexprMathTest (0 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (0 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] ConstexprMathTest.constexpr_exp_floating

 1 FAILED TEST

0% tests passed, 2 tests failed out of 2

Total Test time (real) =   0.13 sec

The following tests FAILED:
	1646 - arena_test.Arena.SizeSanity (Failed)
	2039 - constexpr_math_test.ConstexprMathTest.constexpr_exp_floating (Failed)
```

After, works:
```
...
3067/3067 Test facebook#2213: fbstring_test.FBString.testFixedBugsD4355440 .........................................................***Skipped   0.03 sec

100% tests passed, 0 tests failed out of 3066

Total Test time (real) =  36.02 sec

The following tests did not run:
	1934 - small_locks_test.SmallLocks.PicoSpinLockThreadSanitizer (Skipped)
	1946 - small_locks_test.SmallLocksk.MicroSpinLockThreadSanitizer (Skipped)
	1993 - atomic_unordered_map_test.AtomicUnorderedInsertMap.MegaMap (Disabled)
	2213 - fbstring_test.FBString.testFixedBugsD4355440 (Skipped)
```

Reviewed By: ndmitchell

Differential Revision: D59733599

Pulled By: ahornby

fbshipit-source-id: e7f00184e867a5bf296836ea8c4a4f2430d9635a