Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tags: leikahing/folly

Tags

v2022.06.13.00

Toggle v2022.06.13.00's commit message
tweaks to importing cython-generated modules

Summary:
* Address data-race on `static bool` local variable.
* Add comments describing why optimistic concurrency is necessary and why the cxxabi mutex is to be avoided.

Reviewed By: pranavtbhat

Differential Revision: D36921157

fbshipit-source-id: 519034db0b0db10f0b0dbf0620729b271443ebfa

v2022.06.06.00

Toggle v2022.06.06.00's commit message
Back out "Clamp small_vector capacity at maximum size."

Summary: The diff D36818796 (facebook@6695e49) cause some SL regressions in multifeed_aggregator

Differential Revision: D36928263

fbshipit-source-id: 57dee7b316e257e82d4f4eafb62bb853a0805763

v2022.05.30.00

Toggle v2022.05.30.00's commit message
add missing sanitizer suppression in MicroLock

Summary:
`MicroLock` has 1 byte of state but operates on the containing aligned 4-byte word, principally because the linux `futex` syscall which backs it operates on the containing aligned 4-byte word.

This means that every operation which loads or stores this word must be done in a context with sanitizers suppressed.

Differential Revision: D36738948

fbshipit-source-id: 755d9557068d2efa9a74a9dd767a9fa5b3662d0c

v2022.05.23.00

Toggle v2022.05.23.00's commit message
work around gcc-12 + CWG 903 in FOLLY_SAFE_CHECK (facebook#1777)

Summary:
- it is workaround CWG 903 in gcc-12, which is considering `int{}`  as null pointer constant, and so can't choose between `safe_assert_msg_types_one(uint64_t)` and `safe_assert_msg_types_one(char const *)`
- see https://godbolt.org/z/fov5xPjEe

previously landed in {D36458136 (facebook@68ea0c2)}, which triggered some unknown bug and was reverted

closes facebook#1772

Pull Request resolved: facebook#1777

Test Plan:
Imported from GitHub, without a `Test Plan:` line.

  buck2 test folly/lang/test:safe_assert_test
  buck build fbsource//fbandroid/mode/server fbsource//fbandroid/mode/opt fbsource//fbandroid/apps/assistantplayground:assistantplayground_release

Reviewed By: Orvid

Differential Revision: D36552302

Pulled By: yfeldblum

fbshipit-source-id: 2bc00d2e6b893c2192c7071bbc859df73924c6f5

v2022.05.16.00

Toggle v2022.05.16.00's commit message
Define small_heap_vector_map

Summary:
small_heap_vector_map provides a fast find for very small  maps from 0 to 200 elements. We recorded on map_bench between 40% to 70% speed up comparing to sorted_vector_map. The speedup is achieved through specializations of heap_vector_map:

1. key_type can only be of integral type
2. compare type is std::less
3. default container is small_vector

This map does not rely on std::lower_bound to find elements. The custom find function is
 optimized to load and compare only once, the compiler generates a 3-way branching to return if equal, or continue heap map binary search, see below 3-way branching:

  28a461: cmpq  %rsi, (%rax,%rcx)
  28a465: jl    0x28a450
  28a467: je    0x28a47a

(Note: this ignores all push blocking failures!)

Reviewed By: Gownta

Differential Revision: D35403549

fbshipit-source-id: 9cef4651beba25b79b8552c44e76e28845e00126

v2022.05.09.00

Toggle v2022.05.09.00's commit message
FOLLY_EXPORT to ConversionError (facebook#1758)

Summary:
There are test failures because the `ConversionError` cannot be caught

This diff should hopefully make the exception be catchable.

Pull Request resolved: facebook#1758

Test Plan:
Back out D35438317 and the `hhvm_mac` Sandcastle job should not fail. See D35768155

Note that D35438317 fixed T113333796 by not trying to catch the `ConversionError`. This diff fixes T113333796 in another way by making `ConversionError` catchable.

Reviewed By: yfeldblum

Differential Revision: D35666236

Pulled By: Atry

fbshipit-source-id: 1746fce1c3653c511f17d80a4d638672e8e43540

v2022.05.02.00

Toggle v2022.05.02.00's commit message
check functions for Function ctor

Summary: Examples, so that we may observe what native code the compiler emits for the `Function` constructor.

Reviewed By: luciang

Differential Revision: D35624590

fbshipit-source-id: 034c7b7cd86cf69bc22968bdd7e58da6c7b8e650

v2022.04.25.00

Toggle v2022.04.25.00's commit message
implicit conversion from Indestructible to reference

Summary:
For the common case of:
```lang=c++
static some_type get_singleton() {
  static folly::Indestructible<some_type> instance{/*...*/};
  return *instance; // before
  return instance; // after
}
```

Reviewed By: Mizuchi

Differential Revision: D34395028

fbshipit-source-id: fff43075f84dfe3a3fd0e71fd3eda76787cb1444

v2022.04.18.00

Toggle v2022.04.18.00's commit message
Remove recursion from heap containers getOffsets helper function

Summary:
Avoid stack overflow and speed up getOffsets function, needed for performing heap container insertion.

(Note: this ignores all push blocking failures!)

Reviewed By: Gownta

Differential Revision: D35652300

fbshipit-source-id: 8cd98f294dcfb6be8baed726083e99e2652d63ad

v2022.04.11.00

Toggle v2022.04.11.00's commit message
Add annotations to `opensource/fbcode_builder`

Reviewed By: shannonzhu

Differential Revision: D35512626

fbshipit-source-id: db449b0f2dadcbb1ea8917adfde65f2f890ee988