Revert "Reland "Roll src/buildtools/third_party/libc++/trunk/ b1269813e..1a637088a (287 commits)""

This reverts commit 27fe5a3eb669235bbc66c7ebc09bff0cf4fff5a3.

Reason for revert: The first revert should not be the reason for the windows bot failure. We need to investigate more.

Original change's description:
> Reland "Roll src/buildtools/third_party/libc++/trunk/ b1269813e..1a637088a (287 commits)"
>
> This reverts commit 67e5cfc8a6bf41b3d39a52f1fe5a10625a1babf5.
>
> Reason for revert: Suspected culprit for
>
> https://ci.chromium.org/p/chromium/builders/ci/Win%20Builder%20%28dbg%29
> https://ci.chromium.org/p/chromium/builders/ci/Win%20x64%20Builder%20%28dbg%29
>
> Original change's description:
> > Revert "Roll src/buildtools/third_party/libc++/trunk/ b1269813e..1a637088a (287 commits)"
> >
> > This reverts commit 49792f173a1be0abefae749285e8590e84889fb2.
> >
> > Reason for revert: Create revert as part of the procedure to update libassistant per wutao's instructions in https://crrev.com/c/3702740.
> >
> > Original change's description:
> > > Roll src/buildtools/third_party/libc++/trunk/ b1269813e..1a637088a (287 commits)
> > >
> > > In order to get the chromeos buidls to pass (broken by this CL due to
> > > libassistant), we need to first submit this CL so libassistant can pick
> > > up buildtools, revert this CL, and then resubmit once libassistant has
> > > been updated.
> > >
> > > Additionally, reenable libc++ debug mode with ThinLTO since this is
> > > resolved by https://reviews.llvm.org/D122941.
> > >
> > > Additional changes to get this to build:
> > > * Regenerate absl
> > > * Regenerate gvr shims
> > > * Update #pragma clang_max_tokens as necessary
> > >
> > > https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxx.git/+log/b1269813eaf5..1a637088a36d
> > >
> > > $ git log b1269813e..1a637088a --date=short --no-merges --format='%ad %ae %s'
> > > 2022-06-12 koraq [libc++][NFC] Use concepts in <bit>.
> > > 2022-06-12 koraq [libc++] Removes unneeded includes.
> > > 2022-06-12 koraq [libc++] Removes a GCC bug work-around.
> > > 2022-06-12 koraq [libc++][test] Remove support old compiler support.
> > > 2022-05-26 ldionne.2 [libc++] Do not yield from __sp_mut::lock()
> > > 2022-06-13 nikolasklauser [libc++] Fix std::lower_bound with C++20-hostile iterators
> > > 2022-03-28 phosek [CMake][libcxx] Use target_include_directories for libc++ headers
> > > 2022-06-11 nikolasklauser [libc++] Use unsigned char in basic_string::__short again
> > > 2022-06-11 joeloser93 [libc++][test] Add tuple trivial destructor test
> > > 2022-05-28 joeloser93 [libc++][test] Refactor SmallBasicString uses in range.lazy.split tests
> > > 2022-06-11 nikolasklauser [libc++][NFC] Update ranges algorithms status page
> > > 2021-10-02 koraq [libc++][format] Implement format-string.
> > > 2022-06-10 nikolasklauser [libc++] Use the same implementation of invoke for C++03 and C++11
> > > 2022-06-10 nikolasklauser [libc++] Granularize <iterator> includes
> > > 2022-06-10 nikolasklauser [libc++] Simplify type_traits and use more builtins
> > > 2022-06-10 ldionne.2 [libc++] Make sure we install the modulemap file with install-cxx-headers
> > > 2022-06-10 nikolasklauser [libc++] Remove uses of __two in type_traits
> > > 2022-06-10 ldionne.2 [libc++][NFC] Fix indentation of some #if directives
> > > 2022-06-10 nikolasklauser [libc++] Granularize even more of type_traits
> > > 2022-06-07 nikolasklauser [libc++] Implement ranges::replace{, _if}
> > > 2022-06-09 koraq [libc++] Fixes CI after Jammy update.
> > > 2022-06-09 ldionne.2 [libc++] Mark GDB pretty printers as unsupported on GCC 11.2 to make CI green
> > > 2022-06-06 martin [libcxx] [doc] Add a release note for distributors about MinGW builds and dllimport
> > > 2022-06-06 nikolasklauser [libc++] Granularize __string
> > > 2022-06-09 fmayer [NFC] change error message wording.
> > > 2022-06-07 fmayer [libcxx] improve LIBCXX_ABI_NAMESPACE error message
> > > 2022-05-30 koraq [libc++][CI] Updates Docker image.
> > > 2021-06-08 ldionne.2 [libc++] Towards a simpler extern template story in libc++
> > > 2022-05-23 ldionne.2 [libc++] Fix modules builds when features are removed
> > > 2022-06-08 koraq Revert "[libc++][CI] Updates Docker image."
> > > 2022-06-08 ldionne.2 [libc++][NFC] Add missing 'return 0'
> > > 2022-06-07 ldionne.2 [libc++][NFC] Simplify enable_if for std::copy optimization
> > > 2022-06-08 ldionne.2 [libc++] Make sure we add /llvm to the list of safe directories
> > > 2022-06-08 nikolasklauser [libc++] Implement ranges::adjacent_find
> > > 2022-06-07 joeloser93 Revert "[libc++][test] Mark ranges.transform.pass.cpp UNSUPPORTED for AIX"
> > > 2022-04-01 ldionne.2 [libc++] Make the Debug mode a configuration-time only option
> > > 2022-05-31 koraq [libc++] Removes _LIBCPP_AVAILABILITY_TO_CHARS.
> > > 2022-05-30 koraq [libc++][CI] Updates Docker image.
> > > 2022-06-02 koraq [libc++] Don't use static constexpr in headers.
> > > 2022-06-07 ldionne.2 [libc++] Forgot to bump the CI timeout everywhere
> > > 2022-06-07 ldionne.2 [libc++] Bump timeout to avoid spurious failures on AIX
> > > 2022-06-06 nikolasklauser [libc++] Implement ranges::find_first_of
> > > 2022-04-10 martin [libcxx] Omit dllimport in public headers in MinGW mode
> > > 2022-04-11 martin [libcxx] [test] Don't use header defines for detecting linking against a DLL
> > > 2022-06-06 ldionne.2 [libc++][NFC] Move span tests under views.span
> > > 2022-06-06 ldionne.2 [libc++][NFC] Fix outdated comment in span test
> > > 2022-06-06 ldionne.2 [libc++][NFC] Add missing includes
> > > 2022-05-05 ldionne.2 [libc++] Avoid creating temporaries in unary expressions involving valarray
> > > 2022-06-03 ldionne.2 [libc++] Remove a bunch of conditionals on _LIBCPP_DEBUG_LEVEL
> > > 2022-06-05 nikolasklauser [libc++][ranges] Implement ranges::binary_search and ranges::{lower, upper}_bound
> > > (...)
> > > 2022-04-05 aeubanks [libcxx] Add flag to disable __builtin_assume in _LIBCPP_ASSERT
> > > 2022-04-04 ldionne.2 [libc++] Add back-deployment testing on arm64 macs
> > > 2022-04-07 nikolasklauser [libc++][ranges] Implement ranges::count{, _if}
> > > 2022-04-06 nikolasklauser [libc++] Remove redundant __invoke_constexpr functions
> > > 2022-04-07 nikolasklauser [libc++][ranges] Add implicit conversion to bool test for ranges::find{, if, if_not}
> > > 2022-02-25 martin [libcxx] [test] Stop defining LIBCXX-WINDOWS-FIXME
> > > 2022-04-05 koraq [libc++] Use cpp20_output_iterator in tests.
> > > 2022-04-03 koraq [NFC][libc++] Modularize chrono's calendar.
> > > 2021-10-26 ldionne.2 [libc++] Support arrays in make_shared and allocate_shared (P0674R1)
> > > 2022-03-10 martin [libcxx] [test] Remove UNSUPPORTED markings for mingw issues that no longer are present in CI
> > > 2022-04-05 ldionne.2 [libc++] Remove error about _LIBCPP_ALTERNATE_STRING_LAYOUT not being supported anymore
> > > 2022-04-05 ldionne.2 [libc++][NFC] Remove stray whitespace in comment
> > > 2022-01-20 martin [libcxx] [test] Fix the locale ctype widen tests on Windows
> > > 2022-04-05 hui.xie1990 [libc++] add global variable template std::views::empty
> > > 2022-03-19 koraq [libc++][test] Adds an cpp20_output_iterator.
> > > 2022-04-04 ldionne.2 [libc++] Tidy up tests for deduction guides and other compile-time failing properties in std::string
> > > 2022-04-05 ldionne.2 [libc++] Silence new deprecation warnings for C functions in tests
> > > 2022-04-05 nikolasklauser [libc++][ranges] Implement ranges::transform
> > > 2022-03-25 ldionne.2 [libc++] Implement tests for private headers using the new generator
> > > 2022-03-23 martin [libcxx] Stop recommending setting LIBCXX_HAS_WIN32_THREAD_API in the MinGW builds
> > > 2022-03-31 ldionne.2 [libc++] Fix std::is_array<T[0]> and add tests
> > > 2022-04-04 ldionne.2 [libc++][NFC] Rename generate_assertion_tests.py to generate_header_tests.py
> > > 2022-03-25 ldionne.2 [libc++] Implement all public header tests using the new generator
> > > 2022-04-03 ldionne.2 [libc++] Remove unused <iosfwd> include from <__debug>
> > > 2022-04-03 ldionne.2 [libc++][NFC] Fix weird indentation in test
> > > 2022-04-03 nikolasklauser [libc++][ranges] Implement ranges::max
> > > 2022-03-31 nikolasklauser [libc++] Canonicalize the ranges results and their tests
> > > 2022-03-30 martin [libcxx] [test] Avoid spurious test breakage in clang-cl-dll configs with newer CMake
> > > 2022-03-31 martin [libcxx] [ci] Enable -Werror for libcxxabi and libunwind too
> > > 2022-03-31 koraq [libc++] Fixes calendar function visibility.
> > > 2022-03-30 koraq [libc++][ci] Installs Japanese locale in Docker.
> > > 2022-03-27 koraq [libc++][doc] Update formatting status.
> > > 2022-03-31 ldionne.2 [libc++] Install psutil on the macOS nodes
> > > 2022-03-23 ldionne.2 [libc++] Remove the __libcpp_version file
> > > 2022-03-02 ldionne.2 [libc++] Add a CI job running MSAN
> > > 2022-03-30 martin [libcxx] [doc] Update Windows build instructions after deprecating the legacy standalone builds
> > > 2022-03-25 ldionne.2 [libc++] Ensure that all public C++ headers include <__assert>
> > > 2022-03-04 ldionne.2 [libunwind] Add a _LIBUNWIND_VERSION macro
> > > 2022-03-24 ldionne.2 [libc++] Use __builtin_expect and __builtin_assume in _LIBCPP_ASSERT
> > > 2022-03-29 ldionne.2 [libc++][NFC] Fix typo in comment
> > > 2022-03-28 ldionne.2 [libc++][libc++abi] Serialize the enable_assertions Lit parameter in the generated config
> > > 2022-03-28 brad [libcxx] random_device, specify optimal entropy properties for all OS's using arc4random()
> > > 2022-03-27 koraq [libc++][doc] Update format implementation status.
> > > 2021-09-04 koraq [libc++][format][2/6] Adds a __output_iterator.
> > > 2022-03-23 ldionne.2 [libc++] Remove the _LIBCPP_BOOL_CONSTANT macro
> > > 2022-03-18 nikolasklauser [libc++] Rename __identity to __type_identity
> > > 2022-03-24 ldionne.2 [libc++] Audit all uses of _LIBCPP_ASSERT and _LIBCPP_DEBUG_ASSERT
> > > 2022-03-24 ldionne.2 [libc++][NFC] Refactor the ABI changelog
> > > 2022-03-24 ldionne.2 [libc++][NFC] Update ABI changelog to account for new assertion handler
> > > 2022-03-03 ldionne.2 [libc++] Add a lightweight overridable assertion handler
> > >
> > > Created with:
> > >   roll-dep src/buildtools/third_party/libc++/trunk
> > >
> > > Bug: 1273285
> > > Change-Id: I46b3a6b4b1263bcd9ed4b7ef443a7388e1d52cc3
> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3702740
> > > Commit-Queue: Alan Zhao <ayzhao@google.com>
> > > Owners-Override: Nico Weber <thakis@chromium.org>
> > > Reviewed-by: Nico Weber <thakis@chromium.org>
> > > Cr-Commit-Position: refs/heads/main@{#1014777}
> >
> > Bug: 1273285
> > Change-Id: I2dabf7eb995fd94837729de03e654edeab424b95
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3708965
> > Reviewed-by: Tao Wu <wutao@chromium.org>
> > Owners-Override: Zain Afzal <zafzal@google.com>
> > Auto-Submit: Alan Zhao <ayzhao@google.com>
> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > Commit-Queue: Zain Afzal <zafzal@google.com>
> > Reviewed-by: Zain Afzal <zafzal@google.com>
> > Cr-Commit-Position: refs/heads/main@{#1014801}
>
> Bug: 1273285
> Change-Id: Id3c15c748b16693fdc40869470eb8ddd42fd1365
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3708297
> Reviewed-by: Zain Afzal <zafzal@google.com>
> Owners-Override: Zain Afzal <zafzal@google.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Callistus Tan <callistus@google.com>
> Cr-Commit-Position: refs/heads/main@{#1014809}

Bug: 1273285
Change-Id: Id5c979c5d0b6f3731d0b27d5ebcf25e10b8dc178
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3710730
Commit-Queue: Tao Wu <wutao@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Owners-Override: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1015100}
NOKEYCHECK=True
GitOrigin-RevId: c88460b202e6d25636dd7bfbbf0fc1531b6a0ac1
1 file changed
tree: a11e97105605d015ed87a422b44fe621bc5f5fca
  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_add_feature_flags.cc
  244. scoped_add_feature_flags.h
  245. scoped_add_feature_flags_unittest.cc
  246. scoped_clear_last_error.h
  247. scoped_clear_last_error_unittest.cc
  248. scoped_clear_last_error_win.cc
  249. scoped_environment_variable_override.cc
  250. scoped_environment_variable_override.h
  251. scoped_generic.h
  252. scoped_generic_unittest.cc
  253. scoped_multi_source_observation.h
  254. scoped_multi_source_observation_unittest.cc
  255. scoped_native_library.cc
  256. scoped_native_library.h
  257. scoped_native_library_unittest.cc
  258. scoped_observation.h
  259. scoped_observation_unittest.cc
  260. SECURITY_OWNERS
  261. security_unittest.cc
  262. sequence_checker.cc
  263. sequence_checker.h
  264. sequence_checker_impl.cc
  265. sequence_checker_impl.h
  266. sequence_checker_unittest.cc
  267. sequence_checker_unittest.nc
  268. sequence_token.cc
  269. sequence_token.h
  270. sequence_token_unittest.cc
  271. stack_canary_linux.cc
  272. stack_canary_linux.h
  273. stack_canary_linux_unittest.cc
  274. stl_util.h
  275. stl_util_unittest.cc
  276. supports_user_data.cc
  277. supports_user_data.h
  278. supports_user_data_unittest.cc
  279. sync_socket.cc
  280. sync_socket.h
  281. sync_socket_nacl.cc
  282. sync_socket_posix.cc
  283. sync_socket_unittest.cc
  284. sync_socket_win.cc
  285. sys_byteorder.h
  286. sys_byteorder_unittest.cc
  287. syslog_logging.cc
  288. syslog_logging.h
  289. template_util.h
  290. template_util_unittest.cc
  291. thread_annotations.h
  292. thread_annotations_unittest.cc
  293. thread_annotations_unittest.nc
  294. token.cc
  295. token.h
  296. token_unittest.cc
  297. tools_sanity_unittest.cc
  298. traits_bag.h
  299. traits_bag_unittest.cc
  300. traits_bag_unittest.nc
  301. tuple.h
  302. tuple_unittest.cc
  303. unguessable_token.cc
  304. unguessable_token.h
  305. unguessable_token_unittest.cc
  306. value_iterators.cc
  307. value_iterators.h
  308. value_iterators_unittest.cc
  309. values.cc
  310. values.h
  311. values.rs
  312. values_deserialization.rs
  313. values_unittest.cc
  314. values_unittest.nc
  315. values_unittest.rs
  316. version.cc
  317. version.h
  318. version_unittest.cc
  319. vlog.cc
  320. vlog.h
  321. 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.