Reland "Roll src/buildtools/third_party/libc++/trunk/ 79a2e924d..b1269813e (1399 commits)"

This is a reland of 3a28cd7fbcbf1e58c88c3ac756eaef69d0676eda

Changes:
* Add some additional tryjobs
* Disable debug mode when using LTO as it seems to break with
  https://reviews.llvm.org/D103964 (https://crbug.com/1327706)
* Define _LIBCPP_ABI_NAMESPACE for Windows to resolve a PDB size issue
  (http://crbug.com/1327710).

Original change's description:
> Revert "Roll src/buildtools/third_party/libc++/trunk/
> 79a2e924d..b1269813e (1399 commits)"
>
> This reverts commit 3a28cd7fbcbf1e58c88c3ac756eaef69d0676eda.
>
> Reason for revert:
> Findit (https://goo.gl/kROfz5) identified this CL at revision
> 3a28cd7fbcbf1e58c88c3ac756eaef69d0676eda as
> the culprit for failures in the continuous build including:
>
> Sample Failed Build: https://ci.chromium.org/b/8813722331991050449
> Sample Failed Step: compile
>
> If it is a false positive, please report it at
> https://bugs.chromium.org/p/chromium/issues/entry?status=Available&comment=Datastore+key+for+the+culprit+entity%3A+chromium.googlesource.com%2Fchromium%2Fsrc%2Frefs%2Fheads%2Fmain%2F3a28cd7fbcbf1e58c88c3ac756eaef69d0676eda&labels=Test-Findit-Wrong&components=Tools%3ETest%3EFindIt&summary=Wrongly+blame+3a28cd7fbcbf1e58c88c3ac756eaef69d0676eda
>
> Original change's description:
> > Roll src/buildtools/third_party/libc++/trunk/ 79a2e924d..b1269813e
> (1399 commits)
> >
> > Notes:
> >
> > We deliberately roll libc++ to b1269813eaf5 (~1.5 months old at the
> time
> > of this commit) rather than the latest version of libc++ in order to
> > deliberately avoid https://reviews.llvm.org/D122982, which causes a
> > potentially disruptive performance regression in Chrome
> > (https://crbug.com/1322961). https://reviews.llvm.org/D124328 is
> > supposed to fix this issue, so once that lands in libc++, we'll roll
> > past it again.
> >
> > Additional changes made to get this CL to pass presubmits:
> >
> > * Set _LIBCPP_ABI_VERSION=2 and _LIBCPP_ABI_NAMESPACE due to
> >   _LIBCPP_ABI_UNSTABLE being removed in
> >   https://reviews.llvm.org/D119173.
> > * Regenerate gvr-android-sdk prebuilts.
> > * Updates to libc++'s BUILD.gn to handle new files in libc++.
> > * Update check_static_initializers.py test since init_priority was
> >   changed from 101 to 100 in https://reviews.llvm.org/D95972.
> > * Miscellaneous increments to #pragma clang_max_tokens_here.
> >
> >
> https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxx.git/+log/79a2e924d96e..b1269813eaf5
> >
> > $ git log 79a2e924d..b1269813e --date=short --no-merges --format='%ad
> %ae %s'
> > 2022-03-23 ldionne.2 [libc++] Correct outdated documentation about
> __config_site
> > 2022-03-23 ldionne.2 [libc++][NFC] Change availability macro from
> macosx to macos
> > 2022-03-23 ldionne.2 [libc++][NFC] Fix include guards and add a
> missing license header
> > 2022-03-23 danny.moesch Replace links to archived mailing lists by
> links to Discourse forums
> > 2022-03-22 ldionne.2 [libc++][NFC] Slight improvement to
> __availability documentation
> > 2022-03-22 ldionne.2 [libc++][NFC] Use struct instead of class for
> ranges::end
> > 2022-03-21 phosek Revert "[bootstrap] Allow passing options to
> sub-builds for all targets"
> > 2022-03-21 ldionne.2 [libc++] Re-enable workaround for pre-ranges CTAD
> in std::span
> > 2022-03-16 ldionne.2 [bootstrap] Allow passing options to sub-builds
> for all targets
> > 2022-03-21 zarko [libc++][AIX] AIX allows for changing permissions of
> symlinks
> > 2022-03-21 ldionne.2 [libc++] Trigger CI when cmake/ is modified
> > 2022-03-18 ldionne.2 [libunwind] Add libunwind to the bootstrapping
> build CI
> > 2022-03-21 ldionne.2 [libc++] Disable modules with the bootstrapping
> build
> > 2022-03-07 martin [libcxx] [ci] Check that Windows static libraries
> don't contain dllexports
> > 2022-03-20 koraq [libc++][test][NFC] Remove libcpp-no-concepts.
> > 2022-03-10 nikolasklauser [libc++] Prepare string tests for constexpr
> > 2022-03-03 koraq [libc++][test] Improves handle formatter.
> > 2022-03-08 nikolasklauser [libc++] Enable modernize-loop-convert
> > 2022-03-18 ashermancinelli [libc++] Make shared_ptr move unique_ptr's
> deleter
> > 2022-03-18 nikolasklauser [libc++][ranges] Implement ranges::min
> > 2022-03-17 varconst [libc++][ranges] Implement changes to
> reverse_iterator from One Ranges Proposal.
> > 2022-03-17 nikolasklauser [libc++] [test] Add
> ranges_robust_against_copying_*.pass.cpp
> > 2022-03-17 ldionne.2 [libc++] Install psutil on CI builders
> > 2022-03-17 ldionne.2 [libc++] Add missing <cstddef> include
> > 2022-03-14 ldionne.2 [libc++] Switch to the new testing configurations
> by default
> > 2022-03-17 david.spickett Revert "[libcxx][CI] Use temporary clang-13
> bots for Arm/AArch64"
> > 2022-03-07 nikolasklauser [libc++] Remove <utility> includes
> > 2022-03-14 nikolasklauser [libc++] Add warning pragma macros in the
> test suite
> > 2022-03-16 ldionne.2 [libc++][NFC] Reindent release notes bullet
> points
> > 2022-03-16 ldionne.2 [libc++][NFC] Rename member variables to avoid
> shadowing conflict in future patch
> > 2022-03-12 koraq [libc++][NFC] Add TEST_HAS_NO_INCOMPLETE_RANGES.
> > 2022-03-15 ldionne.2 [libc++][tests] Use CMake provided paths for
> includes and libdir instead of hardcoding them
> > 2022-03-15 ldionne.2 [libc++] Fix incorrect availability markup for
> bad_optional_access & friends
> > 2022-03-15 ldionne.2 [libc++] Do not install the C++ ABI library's
> headers as part of libc++'s build
> > 2022-03-03 ldionne.2 [libc++] Define
> _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER whenever we enable warnings in the
> test suite
> > 2022-03-14 ldionne.2 [libc++] Add workaround to avoid breaking users
> of <span> when <ranges> are disabled
> > 2022-03-15 ldionne.2 [libc++] Update URL to old libc++ dylibs
> > 2022-03-14 dimitry [libc++] Make __dir_stream visibility declaration
> consistent
> > 2022-03-07 ldionne.2 [libc++] Overhaul all tests for assertions and
> debug mode
> > 2022-03-14 ldionne.2 [libc++][NFC] Remove several redundant #if
> _LIBCPP_STD_VER > 17 in <span>
> > 2022-03-12 joeloser93 [libc++] Replace _LIBCPP_HAS_NO_CONCEPTS with
> _LIBCPP_STD_VER > 17. NFCI.
> > 2022-03-12 koraq [libc++] Remove unneeded tests.
> > 2022-03-12 koraq [libc++][NFC] Use TEST_HAS_NO_EXCEPTIONS.
> > 2022-03-12 koraq [libc++] Add a missing test case.
> > 2022-03-12 nikolasklauser [libc++][ranges] Implement ranges::find{,
> _if, _if_not}
> > 2021-08-24 ldionne.2 [libc++] Remove workaround for missing
> declarations on Windows store apps
> > 2021-08-18 ldionne.2 [libc++] Remove workaround for C11 features on
> compilers that don't support using_if_exists
> > 2022-03-08 ldionne.2 [libc++] Remove raw call to debug handler from
> __char_traits_length_checked
> > 2022-03-07 ldionne.2 [libc++] Add tests for the content of <cstddef>
> > 2022-01-27 ldionne.2 [libc++] Remove operator-> from iterator
> archetypes that don't need it
> > (...)
> > 2021-06-02 cjdb [libcxx][module-map] creates submodules for private
> headers
> > 2021-06-02 koraq [libc++][nfc] Add more nasty macros.
> > 2021-06-02 ldionne.2 [libc++] Remove unused variable warnings
> > 2021-05-08 ldionne.2 [libc++] Enable tests for the experimental
> library by default
> > 2021-06-02 ldionne.2 Revert "[libc++] NFC: Move unwrap_iter to its own
> header"
> > 2021-06-02 Daniel.McIntosh [libcxx][NFC] Tidy up calculation of __nbuf
> in num_put::do_put, and add comments
> > 2020-12-02 ldionne.2 [libc++] Add a CI job to test libc++ when
> building for 32 bit
> > 2021-05-31 ldionne.2 [libc++] NFC: Move unwrap_iter to its own header
> > 2021-06-01 z.zoelec2 [libcxx][ranges] Add `default_sentinel` and
> `default_sentinel_t`.
> > 2021-06-01 ldionne.2 [libc++] Fix the std_include.sh.cpp test that has
> been failing since c9385297ce
> > 2021-04-30 z.zoelec2 [libcxx] Implement view.interface.
> > 2021-06-01 ldionne.2 [libc++] Temporary hack to unbreak CI
> > 2021-05-28 martin [libcxx] [test] Fix the _supportsVerify check on
> Windows by fixing quoting
> > 2021-05-31 martin [libcxx] [test] Fix the include_as_c.sh.cpp test in
> MSVC configurations
> > 2021-05-31 martin [libcxx] [test] Remove an incorrect
> TEST_HAS_ALIGNED_ALLOC define from test_macros.h
> > 2021-05-31 martin [libcxx] Define LIBCPP_HAS_TIMESPEC_GET for MSVC
> configurations
> > 2021-05-28 martin [libcxx] [test] Don't look for the literal spelling
> __mbstate_t in warnings
> > 2021-05-28 cjdb [libcxx][nfc] moves std `advance`, `next`, and `prev`
> into their headers
> > 2021-05-31 harald [libc++] [test] Fix a few tests for 32-bit x86
> > 2021-05-27 ldionne.2 [libc++] Update all the pre-defined iterator
> types for C++20
> > 2021-05-29 arthur.j.odwyer [libc++] Avoid `result_type` and
> `unary/binary_function` in <valarray>.
> > 2021-05-28 martin [libcxx] [test] Add UNSUPPORTED: msvc in a couple
> verify.cpp tests
> > 2021-05-19 arthur.j.odwyer [libc++] Alphabetize and
> include-what-you-use. NFCI.
> > 2021-05-29 arthur.j.odwyer [libc++] [modules] Add __threading_support
> to the modulemap.
> > 2021-05-29 arthur.j.odwyer [libc++] [test] Update "test_compare.h"
> users to avoid removed-in-C++20 members. NFCI.
> > 2021-05-29 koraq Revert "[libc++] NFC: Move unwrap_iter to its own
> header"
> > 2021-05-28 arthur.j.odwyer [libc++] [test] Constexpr-ify a couple of
> insert-iterator tests.
> > 2021-05-28 ldionne.2 [libc++] NFC: Move unwrap_iter to its own header
> > 2021-04-28 ldionne.2 [libc++] Add all indirect callable concepts and
> projected
> > 2021-05-26 martin [libcxx] [test] Convert an XFAIL
> LIBCXX-WINDOWS-FIXME into UNSUPPORTED with explanation
> > 2021-05-27 ldionne.2 [libc++] NFC: Make it easier for vendors to
> extend the run-buildbot script
> > 2021-05-27 ldionne.2 [libc++] NFC: Refactor raw_storage_iterator test
> to use UNSUPPORTED markup
> > 2021-05-27 ldionne.2 Revert "[libc++] NFC: Parenthesize expression to
> satisfy GCC 11"
> > 2021-05-27 ldionne.2 [libc++] NFC: Parenthesize expression to satisfy
> GCC 11
> > 2021-05-25 ldionne.2 [libc++] Deprecate std::iterator and remove it as
> a base class
> > 2021-05-16 cjdb [libcxx][iterator] adds `std::ranges::prev`
> > 2021-05-08 cjdb [libcxx][iterator] adds `std::ranges::next`
> > 2021-05-26 z.zoelec2 [libcxx][nfc] Fix the ASAN bots: update
> expected.pass.cpp.
> > 2021-05-26 z.zoelec2 [libcxx][docs] Take mutex for common_iterator,
> common_view, and empty_view.
> > 2021-05-25 ldionne.2 [libc++] Add a job testing on GCC 11
> > 2021-05-18 koraq [libc++][format] Adds availability macros for
> std::format.
> > 2021-04-25 koraq [libc++][NFC] Move basic_format_parse_context to its
> own header.
> > 2021-04-25 koraq [libc++][NFC] Move format_error to its own header.
> > 2021-05-26 ldionne.2 [libc++] Fix concepts tests with GCC
> > 2021-05-05 cjdb [libcxx][iterator] adds `std::ranges::advance`
> > 2021-05-25 ldionne.2 [libc++] Install GCC 11 on CI builders
> > 2021-05-24 arthur.j.odwyer [libc++] [P0619] Hide not1 and not2 under
> _LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS.
> > 2020-11-09 martin [libcxx] Fix the function name in exceptions from
> create_directories
> > 2021-05-12 martin [libcxx] [test] Explain an XFAIL
> LIBCXX-WINDOWS-FIXME and convert into UNSUPPORTED
> > 2021-05-18 martin [libcxx] Make the visibility attributes consistent
> for __narrow_to_utf8/__widen_from_utf8
> >
> > Created with:
> >   roll-dep src/buildtools/third_party/libc++/trunk
> >
> > Binary-Size: The increase is caused by
> https://reviews.llvm.org/D113413, which changed the implementation of
> std::sort(...) in libc++. This is a necessary change to keep libc++
> up-to-date.
> > Bug: 1273285
> > Change-Id: I58ced6f881493f055e9a777577cfa2eef9be38da
> > Reviewed-on:
> https://chromium-review.googlesource.com/c/chromium/src/+/3653488
> > Owners-Override: Nico Weber <thakis@chromium.org>
> > Reviewed-by: Nico Weber <thakis@chromium.org>
> > Reviewed-by: Hans Wennborg <hans@chromium.org>
> > Commit-Queue: Nico Weber <thakis@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1005258}
>
>
> Change-Id: I2154b5453f72bc9a9a209fc789750a642996ecdd
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1273285
> Reviewed-on:
> https://chromium-review.googlesource.com/c/chromium/src/+/3655381
> Owners-Override: Ella Ge <eirage@google.com>
> Reviewed-by: Ella Ge <eirage@chromium.org>
> Commit-Queue: Ella Ge <eirage@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1005272}

Binary-Size: The increase is caused by https://reviews.llvm.org/D113413, which changed the implementation of std::sort(...) in libc++. This is a necessary change to keep libc++ up-to-date.
Cq-Include-Trybots: chromium/try:android-asan
Cq-Include-Trybots: chromium/try:chromeos-amd64-generic-cfi-thin-lto-rel
Cq-Include-Trybots: chromium/try:dawn-win10-x86-deps-rel
Cq-Include-Trybots: chromium/try:linux-chromeos-dbg
Cq-Include-Trybots: chromium/try:linux_chromium_cfi_rel_ng
Cq-Include-Trybots: chromium/try:linux_chromium_chromeos_msan_rel_ng
Cq-Include-Trybots: chromium/try:linux_chromium_msan_rel_ng
Cq-Include-Trybots: chromium/try:mac11-arm64-rel,mac_chromium_asan_rel_ng
Cq-Include-Trybots: chromium/try:win-asan,win7-rel
Cq-Include-Trybots: chromium/try:android-official,fuchsia-official
Cq-Include-Trybots: chromium/try:mac-official,linux-official
Cq-Include-Trybots: chromium/try:win-official,win32-official
Cq-Include-Trybots: chromium/try:linux-swangle-try-x64,win-swangle-try-x86
Cq-Include-Trybots: chrome/try:linux-chromeos-chrome
Cq-Include-Trybots: chrome/try:win-chrome,win64-chrome,linux-chrome,mac-chrome
Cq-Include-Trybots: chrome/try:linux-pgo,mac-pgo,win32-pgo,win64-pgo
Bug: 1273285
Change-Id: I9b371d51c0a7baf0107d13cf21fb5cfbe4fb1b0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3655638
Owners-Override: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Alan Zhao <ayzhao@google.com>
Cr-Commit-Position: refs/heads/main@{#1007702}
NOKEYCHECK=True
GitOrigin-RevId: 1558f8d76b6874f2c5159293923b519d8a58d885
1 file changed
tree: 63161cf61d04bb25be1c88b97b77693988c0aff4
  1. allocator/
  2. android/
  3. containers/
  4. debug/
  5. files/
  6. fuchsia/
  7. functional/
  8. hash/
  9. i18n/
  10. ios/
  11. json/
  12. mac/
  13. memory/
  14. message_loop/
  15. metrics/
  16. nix/
  17. numerics/
  18. posix/
  19. power_monitor/
  20. process/
  21. profiler/
  22. ranges/
  23. rs_glue/
  24. sampling_heap_profiler/
  25. strings/
  26. substring_set_matcher/
  27. synchronization/
  28. system/
  29. task/
  30. test/
  31. third_party/
  32. threading/
  33. time/
  34. timer/
  35. trace_event/
  36. tracing/
  37. types/
  38. win/
  39. as_const.h
  40. as_const_unittest.cc
  41. at_exit.cc
  42. at_exit.h
  43. at_exit_unittest.cc
  44. atomic_ref_count.h
  45. atomic_sequence_num.h
  46. atomicops.h
  47. atomicops_internals_atomicword_compat.h
  48. atomicops_internals_portable.h
  49. atomicops_unittest.cc
  50. auto_reset.h
  51. auto_reset_unittest.cc
  52. barrier_callback.h
  53. barrier_callback_unittest.cc
  54. barrier_closure.cc
  55. barrier_closure.h
  56. barrier_closure_unittest.cc
  57. base.rs
  58. base64.cc
  59. base64.h
  60. base64_decode_fuzzer.cc
  61. base64_encode_fuzzer.cc
  62. base64_unittest.cc
  63. base64url.cc
  64. base64url.h
  65. base64url_unittest.cc
  66. base_export.h
  67. base_paths.cc
  68. base_paths.h
  69. base_paths_android.cc
  70. base_paths_android.h
  71. base_paths_fuchsia.cc
  72. base_paths_mac.h
  73. base_paths_mac.mm
  74. base_paths_posix.cc
  75. base_paths_posix.h
  76. base_paths_win.cc
  77. base_paths_win.h
  78. base_switches.cc
  79. base_switches.h
  80. base_unittests.rs
  81. big_endian.cc
  82. big_endian.h
  83. big_endian_unittest.cc
  84. bind.h
  85. bind_internal.h
  86. bind_unittest.cc
  87. bind_unittest.nc
  88. bit_cast.h
  89. bit_cast_unittest.cc
  90. bits.h
  91. bits_unittest.cc
  92. BUILD.gn
  93. build_time.cc
  94. build_time.h
  95. build_time_unittest.cc
  96. callback.h
  97. callback_forward.h
  98. callback_helpers.cc
  99. callback_helpers.h
  100. callback_helpers_unittest.cc
  101. callback_internal.cc
  102. callback_internal.h
  103. callback_list.cc
  104. callback_list.h
  105. callback_list_unittest.cc
  106. callback_list_unittest.nc
  107. callback_unittest.cc
  108. callback_unittest.nc
  109. cancelable_callback.h
  110. cancelable_callback_unittest.cc
  111. check.cc
  112. check.h
  113. check_example.cc
  114. check_op.cc
  115. check_op.h
  116. check_unittest.cc
  117. command_line.cc
  118. command_line.h
  119. command_line_unittest.cc
  120. compiler_specific.h
  121. component_export.h
  122. component_export_unittest.cc
  123. cpu.cc
  124. cpu.h
  125. cpu_reduction_experiment.cc
  126. cpu_reduction_experiment.h
  127. cpu_unittest.cc
  128. critical_closure.h
  129. critical_closure_internal_ios.mm
  130. cxx17_backports.h
  131. cxx17_backports_unittest.cc
  132. cxx20_to_address.h
  133. dcheck_is_on.h
  134. DEPS
  135. DIR_METADATA
  136. enterprise_util.cc
  137. enterprise_util.h
  138. enterprise_util_mac.mm
  139. enterprise_util_mac_unittest.mm
  140. enterprise_util_win.cc
  141. environment.cc
  142. environment.h
  143. environment_unittest.cc
  144. export_template.h
  145. feature_list.cc
  146. feature_list.h
  147. feature_list_unittest.cc
  148. features.cc
  149. features.h
  150. file_descriptor_posix.cc
  151. file_descriptor_posix.h
  152. file_descriptor_store.cc
  153. file_descriptor_store.h
  154. file_version_info.h
  155. file_version_info_mac.h
  156. file_version_info_mac.mm
  157. file_version_info_win.cc
  158. file_version_info_win.h
  159. file_version_info_win_unittest.cc
  160. format_macros.h
  161. gmock_unittest.cc
  162. gtest_prod_util.h
  163. guid.cc
  164. guid.h
  165. guid_unittest.cc
  166. immediate_crash.h
  167. immediate_crash_unittest.cc
  168. lazy_instance.h
  169. lazy_instance_helpers.cc
  170. lazy_instance_helpers.h
  171. lazy_instance_unittest.cc
  172. linux_util.cc
  173. linux_util.h
  174. linux_util_unittest.cc
  175. location.cc
  176. location.h
  177. location_unittest.cc
  178. logging.cc
  179. logging.h
  180. logging_chromeos.cc
  181. logging_unittest.cc
  182. logging_win.cc
  183. logging_win.h
  184. native_library.cc
  185. native_library.h
  186. native_library_fuchsia.cc
  187. native_library_ios.mm
  188. native_library_mac.mm
  189. native_library_posix.cc
  190. native_library_unittest.cc
  191. native_library_win.cc
  192. no_destructor.h
  193. no_destructor_unittest.cc
  194. no_destructor_unittest.nc
  195. notreached.cc
  196. notreached.h
  197. observer_list.h
  198. observer_list_internal.cc
  199. observer_list_internal.h
  200. observer_list_perftest.cc
  201. observer_list_threadsafe.cc
  202. observer_list_threadsafe.h
  203. observer_list_threadsafe_unittest.cc
  204. observer_list_types.cc
  205. observer_list_types.h
  206. observer_list_unittest.cc
  207. observer_list_unittest.nc
  208. one_shot_event.cc
  209. one_shot_event.h
  210. one_shot_event_unittest.cc
  211. optional_unittest.cc
  212. os_compat_android.cc
  213. os_compat_android.h
  214. os_compat_android_unittest.cc
  215. os_compat_nacl.cc
  216. os_compat_nacl.h
  217. OWNERS
  218. parameter_pack.h
  219. parameter_pack_unittest.cc
  220. path_service.cc
  221. path_service.h
  222. path_service_unittest.cc
  223. pending_task.cc
  224. pending_task.h
  225. pickle.cc
  226. pickle.h
  227. pickle_fuzzer.cc
  228. pickle_unittest.cc
  229. PRESUBMIT.py
  230. rand_util.cc
  231. rand_util.h
  232. rand_util_fuchsia.cc
  233. rand_util_nacl.cc
  234. rand_util_perftest.cc
  235. rand_util_posix.cc
  236. rand_util_unittest.cc
  237. rand_util_win.cc
  238. README.md
  239. run_loop.cc
  240. run_loop.h
  241. run_loop_unittest.cc
  242. safe_numerics_unittest.cc
  243. scoped_clear_last_error.h
  244. scoped_clear_last_error_unittest.cc
  245. scoped_clear_last_error_win.cc
  246. scoped_environment_variable_override.cc
  247. scoped_environment_variable_override.h
  248. scoped_generic.h
  249. scoped_generic_unittest.cc
  250. scoped_multi_source_observation.h
  251. scoped_multi_source_observation_unittest.cc
  252. scoped_native_library.cc
  253. scoped_native_library.h
  254. scoped_native_library_unittest.cc
  255. scoped_observation.h
  256. scoped_observation_unittest.cc
  257. SECURITY_OWNERS
  258. security_unittest.cc
  259. sequence_checker.cc
  260. sequence_checker.h
  261. sequence_checker_impl.cc
  262. sequence_checker_impl.h
  263. sequence_checker_unittest.cc
  264. sequence_checker_unittest.nc
  265. sequence_token.cc
  266. sequence_token.h
  267. sequence_token_unittest.cc
  268. stack_canary_linux.cc
  269. stack_canary_linux.h
  270. stack_canary_linux_unittest.cc
  271. stl_util.h
  272. stl_util_unittest.cc
  273. supports_user_data.cc
  274. supports_user_data.h
  275. supports_user_data_unittest.cc
  276. sync_socket.cc
  277. sync_socket.h
  278. sync_socket_nacl.cc
  279. sync_socket_posix.cc
  280. sync_socket_unittest.cc
  281. sync_socket_win.cc
  282. sys_byteorder.h
  283. sys_byteorder_unittest.cc
  284. syslog_logging.cc
  285. syslog_logging.h
  286. template_util.h
  287. template_util_unittest.cc
  288. thread_annotations.h
  289. thread_annotations_unittest.cc
  290. thread_annotations_unittest.nc
  291. token.cc
  292. token.h
  293. token_unittest.cc
  294. tools_sanity_unittest.cc
  295. traits_bag.h
  296. traits_bag_unittest.cc
  297. traits_bag_unittest.nc
  298. tuple.h
  299. tuple_unittest.cc
  300. unguessable_token.cc
  301. unguessable_token.h
  302. unguessable_token_unittest.cc
  303. value_iterators.cc
  304. value_iterators.h
  305. value_iterators_unittest.cc
  306. values.cc
  307. values.h
  308. values.rs
  309. values_deserialization.rs
  310. values_unittest.cc
  311. values_unittest.nc
  312. values_unittest.rs
  313. version.cc
  314. version.h
  315. version_unittest.cc
  316. vlog.cc
  317. vlog.h
  318. vlog_unittest.cc
README.md

What is this

Contains a written down set of principles and other information on //base. Please add to it!

About //base:

Chromium is a very mature project. Most things that are generally useful are already here and things not here aren't generally useful.

The bar for adding stuff to base is that it must have demonstrated wide applicability. Prefer to add things closer to where they're used (i.e. “not base”), and pull into base only when needed. In a project our size, sometimes even duplication is OK and inevitable.

Adding a new logging macro DPVELOG_NE is not more clear than just writing the stuff you want to log in a regular logging statement, even if it makes your calling code longer. Just add it to your own code.

If the code in question does not need to be used inside base, but will have multiple consumers across the codebase, consider placing it in a new directory under components/ instead.

base is written for the Chromium project and is not intended to be used outside it. Using base outside of src.git is explicitly not supported, and base makes no guarantees about API (or even ABI) stability (like all other code in Chromium). New code that depends on base/ must be in src.git. Code that's not in src.git but pulled in through DEPS (for example, v8) cannot use base.

Qualifications for being in //base OWNERS

  • interest and ability to learn low level/high detail/complex c++ stuff
  • inclination to always ask why and understand everything (including external interactions like win32) rather than just hoping the author did it right
  • mentorship/experience
  • demonstrated good judgement (esp with regards to public APIs) over a length of time

Owners are added when a contributor has shown the above qualifications and when they express interest. There isn't an upper bound on the number of OWNERS.

Design and naming

  • Be sure to use the base namespace.
  • STL-like constructs should adhere as closely to STL as possible. Functions and behaviors not present in STL should only be added when they are related to the specific data structure implemented by the container.
  • For STL-like constructs our policy is that they should use STL-like naming even when it may conflict with the style guide. So functions and class names should be lower case with underscores. Non-STL-like classes and functions should use Google naming.

Performance testing

Since the primitives provided by //base are used very widely, it is important to ensure they scale to the necessary workloads and perform well under all supported platforms. The base_perftests target is a suite of synthetic microbenchmarks that measure performance in various scenarios:

  • BasicPostTaskPerfTest: Exercises MessageLoopTaskRunner's multi-threaded queue in isolation.
  • ConditionVariablePerfTest: Measures thread switching cost of condition variables.
  • IntegratedPostTaskPerfTest: Exercises the full MessageLoop/RunLoop machinery.
  • JSONPerfTest: Tests JSONWriter and JSONReader performance.
  • MessageLoopPerfTest: Measures the speed of task posting in various configurations.
  • ObserverListPerfTest: Exercises adding, removing and signalling observers.
  • PthreadEventPerfTest: Establishes the baseline thread switching cost using pthreads.
  • ScheduleWorkTest: Measures the overhead of MessagePump::ScheduleWork.
  • SequenceManagerPerfTest: Benchmarks SequenceManager scheduling with various underlying task runners.
  • TaskObserverPerfTest: Measures the incremental cost of adding task observers.
  • TaskPerfTest: Checks the cost of posting tasks between threads.
  • WaitableEvent{Thread,}PerfTest: Measures waitable events in single and multithreaded scenarios.

Regressions in these benchmarks can generally by caused by 1) operating system changes, 2) compiler version or flag changes or 3) changes in //base code itself.