From 3ac116f1cb48acdb396e0d0df496db80bffdc169 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Tue, 30 Jun 2020 21:59:49 -0700 Subject: [PATCH] Enabled GPR_ABSEIL_SYNC --- BUILD | 2 ++ BUILD.gn | 2 ++ CMakeLists.txt | 15 ++++++++++----- Makefile | 8 ++++++++ build_autogenerated.yaml | 2 ++ config.m4 | 10 ++++++++++ config.w32 | 10 ++++++++++ gRPC-C++.podspec | 2 ++ gRPC-Core.podspec | 2 ++ grpc.gemspec | 18 ++++++++++++++++++ grpc.gyp | 2 ++ include/grpc/impl/codegen/port_platform.h | 2 +- package.xml | 18 ++++++++++++++++++ src/python/grpcio/grpc_core_dependencies.py | 8 ++++++++ 14 files changed, 95 insertions(+), 6 deletions(-) diff --git a/BUILD b/BUILD index 036c782ac30..d3f1b3b8258 100644 --- a/BUILD +++ b/BUILD @@ -553,9 +553,11 @@ grpc_cc_library( "src/core/lib/profiling/timers.h", ], external_deps = [ + "absl/base", "absl/memory", "absl/strings", "absl/strings:str_format", + "absl/synchronization", "absl/time:time", ], language = "c++", diff --git a/BUILD.gn b/BUILD.gn index 59835609c50..c9da5876e09 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -170,9 +170,11 @@ config("grpc_config") { ] deps = [ ":absl/time:time", + ":absl/synchronization:synchronization", ":absl/strings:strings", ":absl/strings:str_format", ":absl/memory:memory", + ":absl/base:base", ] public_configs = [ diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ec8476491a..ce52595111b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,9 +120,11 @@ set(gRPC_ABSL_USED_TARGETS absl_errno_saver absl_fixed_array absl_function_ref + absl_graphcycles_internal absl_inlined_vector absl_inlined_vector_internal absl_int128 + absl_kernel_timeout_internal absl_log_severity absl_malloc_internal absl_memory @@ -137,6 +139,7 @@ set(gRPC_ABSL_USED_TARGETS absl_strings absl_strings_internal absl_symbolize + absl_synchronization absl_throw_delegate absl_time absl_time_zone @@ -1313,9 +1316,11 @@ target_include_directories(gpr target_link_libraries(gpr ${_gRPC_ALLTARGETS_LIBRARIES} absl::time + absl::synchronization absl::strings absl::str_format absl::memory + absl::base ) if(_gRPC_PLATFORM_ANDROID) target_link_libraries(gpr @@ -15650,7 +15655,7 @@ generate_pkgconfig( "gRPC platform support library" "${gRPC_CORE_VERSION}" "" - "-lgpr -labsl_str_format_internal -labsl_time -labsl_time_zone -labsl_civil_time -labsl_strings -labsl_strings_internal -labsl_throw_delegate -labsl_int128 -labsl_base -labsl_spinlock_wait -labsl_raw_logging_internal -labsl_log_severity -labsl_dynamic_annotations" + "-lgpr -labsl_str_format_internal -labsl_synchronization -labsl_graphcycles_internal -labsl_symbolize -labsl_demangle_internal -labsl_stacktrace -labsl_debugging_internal -labsl_malloc_internal -labsl_time -labsl_time_zone -labsl_civil_time -labsl_strings -labsl_strings_internal -labsl_throw_delegate -labsl_int128 -labsl_base -labsl_spinlock_wait -labsl_raw_logging_internal -labsl_log_severity -labsl_dynamic_annotations" "" "gpr.pc") @@ -15660,7 +15665,7 @@ generate_pkgconfig( "high performance general RPC framework" "${gRPC_CORE_VERSION}" "gpr openssl" - "-lgrpc -laddress_sorting -lre2 -lupb -lcares -lz -labsl_status -labsl_cord -labsl_symbolize -labsl_demangle_internal -labsl_malloc_internal -labsl_stacktrace -labsl_debugging_internal -labsl_bad_optional_access -labsl_str_format_internal -labsl_time -labsl_time_zone -labsl_civil_time -labsl_strings -labsl_strings_internal -labsl_throw_delegate -labsl_int128 -labsl_base -labsl_spinlock_wait -labsl_raw_logging_internal -labsl_log_severity -labsl_dynamic_annotations" + "-lgrpc -laddress_sorting -lre2 -lupb -lcares -lz -labsl_status -labsl_cord -labsl_bad_optional_access -labsl_str_format_internal -labsl_synchronization -labsl_graphcycles_internal -labsl_symbolize -labsl_demangle_internal -labsl_stacktrace -labsl_debugging_internal -labsl_malloc_internal -labsl_time -labsl_time_zone -labsl_civil_time -labsl_strings -labsl_strings_internal -labsl_throw_delegate -labsl_int128 -labsl_base -labsl_spinlock_wait -labsl_raw_logging_internal -labsl_log_severity -labsl_dynamic_annotations" "" "grpc.pc") @@ -15670,7 +15675,7 @@ generate_pkgconfig( "high performance general RPC framework without SSL" "${gRPC_CORE_VERSION}" "gpr" - "-lgrpc_unsecure -labsl_status -labsl_cord -labsl_symbolize -labsl_demangle_internal -labsl_malloc_internal -labsl_stacktrace -labsl_debugging_internal -labsl_bad_optional_access -labsl_str_format_internal -labsl_time -labsl_time_zone -labsl_civil_time -labsl_strings -labsl_strings_internal -labsl_throw_delegate -labsl_int128 -labsl_base -labsl_spinlock_wait -labsl_raw_logging_internal -labsl_log_severity -labsl_dynamic_annotations" + "-lgrpc_unsecure -labsl_status -labsl_cord -labsl_bad_optional_access -labsl_str_format_internal -labsl_synchronization -labsl_graphcycles_internal -labsl_symbolize -labsl_demangle_internal -labsl_stacktrace -labsl_debugging_internal -labsl_malloc_internal -labsl_time -labsl_time_zone -labsl_civil_time -labsl_strings -labsl_strings_internal -labsl_throw_delegate -labsl_int128 -labsl_base -labsl_spinlock_wait -labsl_raw_logging_internal -labsl_log_severity -labsl_dynamic_annotations" "" "grpc_unsecure.pc") @@ -15680,7 +15685,7 @@ generate_pkgconfig( "C++ wrapper for gRPC" "${gRPC_CPP_VERSION}" "grpc" - "-lgrpc++ -labsl_status -labsl_cord -labsl_symbolize -labsl_demangle_internal -labsl_malloc_internal -labsl_stacktrace -labsl_debugging_internal -labsl_bad_optional_access -labsl_str_format_internal -labsl_time -labsl_time_zone -labsl_civil_time -labsl_strings -labsl_strings_internal -labsl_throw_delegate -labsl_int128 -labsl_base -labsl_spinlock_wait -labsl_raw_logging_internal -labsl_log_severity -labsl_dynamic_annotations" + "-lgrpc++ -labsl_status -labsl_cord -labsl_bad_optional_access -labsl_str_format_internal -labsl_synchronization -labsl_graphcycles_internal -labsl_symbolize -labsl_demangle_internal -labsl_stacktrace -labsl_debugging_internal -labsl_malloc_internal -labsl_time -labsl_time_zone -labsl_civil_time -labsl_strings -labsl_strings_internal -labsl_throw_delegate -labsl_int128 -labsl_base -labsl_spinlock_wait -labsl_raw_logging_internal -labsl_log_severity -labsl_dynamic_annotations" "" "grpc++.pc") @@ -15690,6 +15695,6 @@ generate_pkgconfig( "C++ wrapper for gRPC without SSL" "${gRPC_CPP_VERSION}" "grpc_unsecure" - "-lgrpc++_unsecure -labsl_status -labsl_cord -labsl_symbolize -labsl_demangle_internal -labsl_malloc_internal -labsl_stacktrace -labsl_debugging_internal -labsl_bad_optional_access -labsl_str_format_internal -labsl_time -labsl_time_zone -labsl_civil_time -labsl_strings -labsl_strings_internal -labsl_throw_delegate -labsl_int128 -labsl_base -labsl_spinlock_wait -labsl_raw_logging_internal -labsl_log_severity -labsl_dynamic_annotations" + "-lgrpc++_unsecure -labsl_status -labsl_cord -labsl_bad_optional_access -labsl_str_format_internal -labsl_synchronization -labsl_graphcycles_internal -labsl_symbolize -labsl_demangle_internal -labsl_stacktrace -labsl_debugging_internal -labsl_malloc_internal -labsl_time -labsl_time_zone -labsl_civil_time -labsl_strings -labsl_strings_internal -labsl_throw_delegate -labsl_int128 -labsl_base -labsl_spinlock_wait -labsl_raw_logging_internal -labsl_log_severity -labsl_dynamic_annotations" "" "grpc++_unsecure.pc") diff --git a/Makefile b/Makefile index 91248fc8755..02fbccaf1d9 100644 --- a/Makefile +++ b/Makefile @@ -6515,6 +6515,14 @@ LIBGRPC_ABSEIL_SRC = \ third_party/abseil-cpp/absl/strings/str_split.cc \ third_party/abseil-cpp/absl/strings/string_view.cc \ third_party/abseil-cpp/absl/strings/substitute.cc \ + third_party/abseil-cpp/absl/synchronization/barrier.cc \ + third_party/abseil-cpp/absl/synchronization/blocking_counter.cc \ + third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc \ + third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc \ + third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.cc \ + third_party/abseil-cpp/absl/synchronization/internal/waiter.cc \ + third_party/abseil-cpp/absl/synchronization/mutex.cc \ + third_party/abseil-cpp/absl/synchronization/notification.cc \ third_party/abseil-cpp/absl/time/civil_time.cc \ third_party/abseil-cpp/absl/time/clock.cc \ third_party/abseil-cpp/absl/time/duration.cc \ diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index f5688a0cf32..6ec6783c45f 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -349,9 +349,11 @@ libs: - src/core/lib/profiling/stap_timers.cc deps: - absl/time:time + - absl/synchronization:synchronization - absl/strings:strings - absl/strings:str_format - absl/memory:memory + - absl/base:base secure: false - name: grpc build: all diff --git a/config.m4 b/config.m4 index d7383e49b81..98cdfae80c8 100644 --- a/config.m4 +++ b/config.m4 @@ -549,6 +549,14 @@ if test "$PHP_GRPC" != "no"; then third_party/abseil-cpp/absl/strings/str_split.cc \ third_party/abseil-cpp/absl/strings/string_view.cc \ third_party/abseil-cpp/absl/strings/substitute.cc \ + third_party/abseil-cpp/absl/synchronization/barrier.cc \ + third_party/abseil-cpp/absl/synchronization/blocking_counter.cc \ + third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc \ + third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc \ + third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.cc \ + third_party/abseil-cpp/absl/synchronization/internal/waiter.cc \ + third_party/abseil-cpp/absl/synchronization/mutex.cc \ + third_party/abseil-cpp/absl/synchronization/notification.cc \ third_party/abseil-cpp/absl/time/civil_time.cc \ third_party/abseil-cpp/absl/time/clock.cc \ third_party/abseil-cpp/absl/time/duration.cc \ @@ -989,6 +997,8 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/third_party/abseil-cpp/absl/strings) PHP_ADD_BUILD_DIR($ext_builddir/third_party/abseil-cpp/absl/strings/internal) PHP_ADD_BUILD_DIR($ext_builddir/third_party/abseil-cpp/absl/strings/internal/str_format) + PHP_ADD_BUILD_DIR($ext_builddir/third_party/abseil-cpp/absl/synchronization) + PHP_ADD_BUILD_DIR($ext_builddir/third_party/abseil-cpp/absl/synchronization/internal) PHP_ADD_BUILD_DIR($ext_builddir/third_party/abseil-cpp/absl/time) PHP_ADD_BUILD_DIR($ext_builddir/third_party/abseil-cpp/absl/time/internal/cctz/src) PHP_ADD_BUILD_DIR($ext_builddir/third_party/abseil-cpp/absl/types) diff --git a/config.w32 b/config.w32 index f59f2618f7d..56758ed4162 100644 --- a/config.w32 +++ b/config.w32 @@ -517,6 +517,14 @@ if (PHP_GRPC != "no") { "third_party\\abseil-cpp\\absl\\strings\\str_split.cc " + "third_party\\abseil-cpp\\absl\\strings\\string_view.cc " + "third_party\\abseil-cpp\\absl\\strings\\substitute.cc " + + "third_party\\abseil-cpp\\absl\\synchronization\\barrier.cc " + + "third_party\\abseil-cpp\\absl\\synchronization\\blocking_counter.cc " + + "third_party\\abseil-cpp\\absl\\synchronization\\internal\\create_thread_identity.cc " + + "third_party\\abseil-cpp\\absl\\synchronization\\internal\\graphcycles.cc " + + "third_party\\abseil-cpp\\absl\\synchronization\\internal\\per_thread_sem.cc " + + "third_party\\abseil-cpp\\absl\\synchronization\\internal\\waiter.cc " + + "third_party\\abseil-cpp\\absl\\synchronization\\mutex.cc " + + "third_party\\abseil-cpp\\absl\\synchronization\\notification.cc " + "third_party\\abseil-cpp\\absl\\time\\civil_time.cc " + "third_party\\abseil-cpp\\absl\\time\\clock.cc " + "third_party\\abseil-cpp\\absl\\time\\duration.cc " + @@ -1037,6 +1045,8 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\abseil-cpp\\absl\\strings"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\abseil-cpp\\absl\\strings\\internal"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\abseil-cpp\\absl\\strings\\internal\\str_format"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\abseil-cpp\\absl\\synchronization"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\abseil-cpp\\absl\\synchronization\\internal"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\abseil-cpp\\absl\\time"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\abseil-cpp\\absl\\time\\internal"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\abseil-cpp\\absl\\time\\internal\\cctz"); diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index c1f21867f5e..176b2094394 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -208,11 +208,13 @@ Pod::Spec.new do |s| ss.dependency "#{s.name}/Interface", version ss.dependency 'gRPC-Core', version abseil_version = '1.20200225.0' + ss.dependency 'abseil/base/base', abseil_version ss.dependency 'abseil/container/inlined_vector', abseil_version ss.dependency 'abseil/memory/memory', abseil_version ss.dependency 'abseil/status/status', abseil_version ss.dependency 'abseil/strings/str_format', abseil_version ss.dependency 'abseil/strings/strings', abseil_version + ss.dependency 'abseil/synchronization/synchronization', abseil_version ss.dependency 'abseil/time/time', abseil_version ss.dependency 'abseil/types/optional', abseil_version diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index fb351f7db61..63fbd793d29 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -174,11 +174,13 @@ Pod::Spec.new do |s| ss.dependency "#{s.name}/Interface", version ss.dependency 'BoringSSL-GRPC', '0.0.11' abseil_version = '1.20200225.0' + ss.dependency 'abseil/base/base', abseil_version ss.dependency 'abseil/container/inlined_vector', abseil_version ss.dependency 'abseil/memory/memory', abseil_version ss.dependency 'abseil/status/status', abseil_version ss.dependency 'abseil/strings/str_format', abseil_version ss.dependency 'abseil/strings/strings', abseil_version + ss.dependency 'abseil/synchronization/synchronization', abseil_version ss.dependency 'abseil/time/time', abseil_version ss.dependency 'abseil/types/optional', abseil_version ss.compiler_flags = '-DBORINGSSL_PREFIX=GRPC -Wno-unreachable-code -Wno-shorten-64-to-32' diff --git a/grpc.gemspec b/grpc.gemspec index 430651f443c..0a533cd8a42 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -1104,6 +1104,24 @@ Gem::Specification.new do |s| s.files += %w( third_party/abseil-cpp/absl/strings/strip.h ) s.files += %w( third_party/abseil-cpp/absl/strings/substitute.cc ) s.files += %w( third_party/abseil-cpp/absl/strings/substitute.h ) + s.files += %w( third_party/abseil-cpp/absl/synchronization/barrier.cc ) + s.files += %w( third_party/abseil-cpp/absl/synchronization/barrier.h ) + s.files += %w( third_party/abseil-cpp/absl/synchronization/blocking_counter.cc ) + s.files += %w( third_party/abseil-cpp/absl/synchronization/blocking_counter.h ) + s.files += %w( third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc ) + s.files += %w( third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.h ) + s.files += %w( third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc ) + s.files += %w( third_party/abseil-cpp/absl/synchronization/internal/graphcycles.h ) + s.files += %w( third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.h ) + s.files += %w( third_party/abseil-cpp/absl/synchronization/internal/mutex_nonprod.inc ) + s.files += %w( third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.cc ) + s.files += %w( third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.h ) + s.files += %w( third_party/abseil-cpp/absl/synchronization/internal/waiter.cc ) + s.files += %w( third_party/abseil-cpp/absl/synchronization/internal/waiter.h ) + s.files += %w( third_party/abseil-cpp/absl/synchronization/mutex.cc ) + s.files += %w( third_party/abseil-cpp/absl/synchronization/mutex.h ) + s.files += %w( third_party/abseil-cpp/absl/synchronization/notification.cc ) + s.files += %w( third_party/abseil-cpp/absl/synchronization/notification.h ) s.files += %w( third_party/abseil-cpp/absl/time/civil_time.cc ) s.files += %w( third_party/abseil-cpp/absl/time/civil_time.h ) s.files += %w( third_party/abseil-cpp/absl/time/clock.cc ) diff --git a/grpc.gyp b/grpc.gyp index c7f9922bcd8..753c7b8211c 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -375,9 +375,11 @@ 'type': 'static_library', 'dependencies': [ 'absl/time:time', + 'absl/synchronization:synchronization', 'absl/strings:strings', 'absl/strings:str_format', 'absl/memory:memory', + 'absl/base:base', ], 'sources': [ 'src/core/lib/gpr/alloc.cc', diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index 185e4481d0e..a3d3bb27b5a 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -31,7 +31,7 @@ * Defines GPR_ABSEIL_SYNC to use synchronization features from Abseil */ #ifndef GPR_ABSEIL_SYNC -/* #define GPR_ABSEIL_SYNC 1 */ +#define GPR_ABSEIL_SYNC 1 #endif /* Get windows.h included everywhere (we need it) */ diff --git a/package.xml b/package.xml index aa948d58f24..0d991d4d5c8 100644 --- a/package.xml +++ b/package.xml @@ -1106,6 +1106,24 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 28573461179..ef4d1aba717 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -516,6 +516,14 @@ CORE_SOURCE_FILES = [ 'third_party/abseil-cpp/absl/strings/str_split.cc', 'third_party/abseil-cpp/absl/strings/string_view.cc', 'third_party/abseil-cpp/absl/strings/substitute.cc', + 'third_party/abseil-cpp/absl/synchronization/barrier.cc', + 'third_party/abseil-cpp/absl/synchronization/blocking_counter.cc', + 'third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc', + 'third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc', + 'third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.cc', + 'third_party/abseil-cpp/absl/synchronization/internal/waiter.cc', + 'third_party/abseil-cpp/absl/synchronization/mutex.cc', + 'third_party/abseil-cpp/absl/synchronization/notification.cc', 'third_party/abseil-cpp/absl/time/civil_time.cc', 'third_party/abseil-cpp/absl/time/clock.cc', 'third_party/abseil-cpp/absl/time/duration.cc',