diff --git a/BUILD b/BUILD index aaa38184cfd..182fa9d54ed 100644 --- a/BUILD +++ b/BUILD @@ -74,7 +74,7 @@ python_config_settings() # This should be updated along with build.yaml g_stands_for = "gon" -core_version = "7.0.0" +core_version = "9.0.0" version = "1.26.0-dev" diff --git a/CMakeLists.txt b/CMakeLists.txt index eb222ee7b27..8e188a4daf7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,8 +26,8 @@ cmake_minimum_required(VERSION 3.5.1) set(PACKAGE_NAME "grpc") set(PACKAGE_VERSION "1.26.0-dev") -set(gRPC_CORE_VERSION "8.0.0") -set(gRPC_CORE_SOVERSION "8") +set(gRPC_CORE_VERSION "9.0.0") +set(gRPC_CORE_SOVERSION "9") set(gRPC_CPP_VERSION "1.26.0-dev") set(gRPC_CPP_SOVERSION "1") set(gRPC_CSHARP_VERSION "2.26.0-dev") @@ -453,11 +453,6 @@ if(gRPC_BUILD_TESTS) add_dependencies(buildtests_c json_test) add_dependencies(buildtests_c lame_client_test) add_dependencies(buildtests_c load_file_test) - add_dependencies(buildtests_c memory_usage_client) - add_dependencies(buildtests_c memory_usage_server) - if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) - add_dependencies(buildtests_c memory_usage_test) - endif() add_dependencies(buildtests_c message_compress_test) add_dependencies(buildtests_c minimal_stack_is_minimal_test) add_dependencies(buildtests_c mpmcqueue_test) @@ -8180,89 +8175,6 @@ target_link_libraries(load_file_test endif() if(gRPC_BUILD_TESTS) -add_executable(memory_usage_client - test/core/memory_usage/client.cc -) - -target_include_directories(memory_usage_client - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include - ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} - ${_gRPC_SSL_INCLUDE_DIR} - ${_gRPC_UPB_GENERATED_DIR} - ${_gRPC_UPB_GRPC_GENERATED_DIR} - ${_gRPC_UPB_INCLUDE_DIR} - ${_gRPC_ZLIB_INCLUDE_DIR} -) - -target_link_libraries(memory_usage_client - ${_gRPC_ALLTARGETS_LIBRARIES} - grpc_test_util - grpc - gpr -) - - -endif() -if(gRPC_BUILD_TESTS) - -add_executable(memory_usage_server - test/core/memory_usage/server.cc -) - -target_include_directories(memory_usage_server - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include - ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} - ${_gRPC_SSL_INCLUDE_DIR} - ${_gRPC_UPB_GENERATED_DIR} - ${_gRPC_UPB_GRPC_GENERATED_DIR} - ${_gRPC_UPB_INCLUDE_DIR} - ${_gRPC_ZLIB_INCLUDE_DIR} -) - -target_link_libraries(memory_usage_server - ${_gRPC_ALLTARGETS_LIBRARIES} - grpc_test_util - grpc - gpr -) - - -endif() -if(gRPC_BUILD_TESTS) -if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) - - add_executable(memory_usage_test - test/core/memory_usage/memory_usage_test.cc - ) - - target_include_directories(memory_usage_test - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include - ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} - ${_gRPC_SSL_INCLUDE_DIR} - ${_gRPC_UPB_GENERATED_DIR} - ${_gRPC_UPB_GRPC_GENERATED_DIR} - ${_gRPC_UPB_INCLUDE_DIR} - ${_gRPC_ZLIB_INCLUDE_DIR} - ) - - target_link_libraries(memory_usage_test - ${_gRPC_ALLTARGETS_LIBRARIES} - grpc_test_util - grpc - gpr - ) - - -endif() -endif() -if(gRPC_BUILD_TESTS) - add_executable(message_compress_test test/core/compression/message_compress_test.cc ) diff --git a/Makefile b/Makefile index ffde7c586db..a809f63cdc4 100644 --- a/Makefile +++ b/Makefile @@ -171,6 +171,15 @@ CPPFLAGS_tsan = -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-comman LDFLAGS_tsan = -fsanitize=thread DEFINES_tsan = GRPC_TSAN +VALID_CONFIG_counters_with_memory_counter = 1 +CC_counters_with_memory_counter = $(DEFAULT_CC) +CXX_counters_with_memory_counter = $(DEFAULT_CXX) +LD_counters_with_memory_counter = $(DEFAULT_CC) +LDXX_counters_with_memory_counter = $(DEFAULT_CXX) +CPPFLAGS_counters_with_memory_counter = -O2 -DGPR_LOW_LEVEL_COUNTERS -DGPR_WRAP_MEMORY_COUNTER +LDFLAGS_counters_with_memory_counter = -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=realloc -Wl,--wrap=free +DEFINES_counters_with_memory_counter = NDEBUG + VALID_CONFIG_stapprof = 1 CC_stapprof = $(DEFAULT_CC) CXX_stapprof = $(DEFAULT_CXX) @@ -460,7 +469,7 @@ E = @echo Q = @ endif -CORE_VERSION = 8.0.0 +CORE_VERSION = 9.0.0 CPP_VERSION = 1.26.0-dev CSHARP_VERSION = 2.26.0-dev @@ -510,7 +519,7 @@ SHARED_EXT_CORE = dll SHARED_EXT_CPP = dll SHARED_EXT_CSHARP = dll SHARED_PREFIX = -SHARED_VERSION_CORE = -8 +SHARED_VERSION_CORE = -9 SHARED_VERSION_CPP = -1 SHARED_VERSION_CSHARP = -2 else ifeq ($(SYSTEM),Darwin) @@ -1088,9 +1097,6 @@ json_test: $(BINDIR)/$(CONFIG)/json_test lame_client_test: $(BINDIR)/$(CONFIG)/lame_client_test load_file_test: $(BINDIR)/$(CONFIG)/load_file_test low_level_ping_pong_benchmark: $(BINDIR)/$(CONFIG)/low_level_ping_pong_benchmark -memory_usage_client: $(BINDIR)/$(CONFIG)/memory_usage_client -memory_usage_server: $(BINDIR)/$(CONFIG)/memory_usage_server -memory_usage_test: $(BINDIR)/$(CONFIG)/memory_usage_test message_compress_test: $(BINDIR)/$(CONFIG)/message_compress_test minimal_stack_is_minimal_test: $(BINDIR)/$(CONFIG)/minimal_stack_is_minimal_test mpmcqueue_test: $(BINDIR)/$(CONFIG)/mpmcqueue_test @@ -1521,9 +1527,6 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/json_test \ $(BINDIR)/$(CONFIG)/lame_client_test \ $(BINDIR)/$(CONFIG)/load_file_test \ - $(BINDIR)/$(CONFIG)/memory_usage_client \ - $(BINDIR)/$(CONFIG)/memory_usage_server \ - $(BINDIR)/$(CONFIG)/memory_usage_test \ $(BINDIR)/$(CONFIG)/message_compress_test \ $(BINDIR)/$(CONFIG)/minimal_stack_is_minimal_test \ $(BINDIR)/$(CONFIG)/mpmcqueue_test \ @@ -2135,8 +2138,6 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/lame_client_test || ( echo test lame_client_test failed ; exit 1 ) $(E) "[RUN] Testing load_file_test" $(Q) $(BINDIR)/$(CONFIG)/load_file_test || ( echo test load_file_test failed ; exit 1 ) - $(E) "[RUN] Testing memory_usage_test" - $(Q) $(BINDIR)/$(CONFIG)/memory_usage_test || ( echo test memory_usage_test failed ; exit 1 ) $(E) "[RUN] Testing message_compress_test" $(Q) $(BINDIR)/$(CONFIG)/message_compress_test || ( echo test message_compress_test failed ; exit 1 ) $(E) "[RUN] Testing minimal_stack_is_minimal_test" @@ -3205,7 +3206,7 @@ install-shared_c: shared_c strip-shared_c install-pkg-config_c ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE)-dll.a $(prefix)/lib/libaddress_sorting.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libaddress_sorting.so.8 + $(Q) ln -sf $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libaddress_sorting.so.9 $(Q) ln -sf $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libaddress_sorting.so endif $(E) "[INSTALL] Installing $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)" @@ -3214,7 +3215,7 @@ endif ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE)-dll.a $(prefix)/lib/libgpr.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgpr.so.8 + $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgpr.so.9 $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgpr.so endif $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)" @@ -3223,7 +3224,7 @@ endif ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE)-dll.a $(prefix)/lib/libgrpc.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc.so.8 + $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc.so.9 $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc.so endif $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)" @@ -3232,7 +3233,7 @@ endif ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE)-dll.a $(prefix)/lib/libgrpc_cronet.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc_cronet.so.8 + $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc_cronet.so.9 $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc_cronet.so endif $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)" @@ -3241,7 +3242,7 @@ endif ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE)-dll.a $(prefix)/lib/libgrpc_unsecure.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc_unsecure.so.8 + $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc_unsecure.so.9 $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc_unsecure.so endif ifneq ($(SYSTEM),MINGW32) @@ -3402,8 +3403,8 @@ $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): ifeq ($(SYSTEM),Darwin) $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBADDRESS_SORTING_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libaddress_sorting.so.8 -o $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBADDRESS_SORTING_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) - $(Q) ln -sf $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).so.8 + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libaddress_sorting.so.9 -o $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBADDRESS_SORTING_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(Q) ln -sf $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).so.9 $(Q) ln -sf $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).so endif endif @@ -3554,8 +3555,8 @@ $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGPR_OB ifeq ($(SYSTEM),Darwin) $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGPR_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgpr.so.8 -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGPR_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) - $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).so.8 + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgpr.so.9 -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGPR_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).so.9 $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).so endif endif @@ -4021,8 +4022,8 @@ $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_ ifeq ($(SYSTEM),Darwin) $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.8 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) - $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so.8 + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.9 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so.9 $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so endif endif @@ -4420,8 +4421,8 @@ $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(L ifeq ($(SYSTEM),Darwin) $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CRONET_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_cronet.so.8 -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CRONET_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) - $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).so.8 + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_cronet.so.9 -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CRONET_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).so.9 $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).so endif endif @@ -5467,8 +5468,8 @@ $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $ ifeq ($(SYSTEM),Darwin) $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.8 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) - $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).so.8 + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.9 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).so.9 $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).so endif endif @@ -11638,102 +11639,6 @@ endif endif -MEMORY_USAGE_CLIENT_SRC = \ - test/core/memory_usage/client.cc \ - -MEMORY_USAGE_CLIENT_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(MEMORY_USAGE_CLIENT_SRC)))) -ifeq ($(NO_SECURE),true) - -# You can't build secure targets if you don't have OpenSSL. - -$(BINDIR)/$(CONFIG)/memory_usage_client: openssl_dep_error - -else - - - -$(BINDIR)/$(CONFIG)/memory_usage_client: $(MEMORY_USAGE_CLIENT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a - $(E) "[LD] Linking $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(MEMORY_USAGE_CLIENT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/memory_usage_client - -endif - -$(OBJDIR)/$(CONFIG)/test/core/memory_usage/client.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a - -deps_memory_usage_client: $(MEMORY_USAGE_CLIENT_OBJS:.o=.dep) - -ifneq ($(NO_SECURE),true) -ifneq ($(NO_DEPS),true) --include $(MEMORY_USAGE_CLIENT_OBJS:.o=.dep) -endif -endif - - -MEMORY_USAGE_SERVER_SRC = \ - test/core/memory_usage/server.cc \ - -MEMORY_USAGE_SERVER_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(MEMORY_USAGE_SERVER_SRC)))) -ifeq ($(NO_SECURE),true) - -# You can't build secure targets if you don't have OpenSSL. - -$(BINDIR)/$(CONFIG)/memory_usage_server: openssl_dep_error - -else - - - -$(BINDIR)/$(CONFIG)/memory_usage_server: $(MEMORY_USAGE_SERVER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a - $(E) "[LD] Linking $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(MEMORY_USAGE_SERVER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/memory_usage_server - -endif - -$(OBJDIR)/$(CONFIG)/test/core/memory_usage/server.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a - -deps_memory_usage_server: $(MEMORY_USAGE_SERVER_OBJS:.o=.dep) - -ifneq ($(NO_SECURE),true) -ifneq ($(NO_DEPS),true) --include $(MEMORY_USAGE_SERVER_OBJS:.o=.dep) -endif -endif - - -MEMORY_USAGE_TEST_SRC = \ - test/core/memory_usage/memory_usage_test.cc \ - -MEMORY_USAGE_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(MEMORY_USAGE_TEST_SRC)))) -ifeq ($(NO_SECURE),true) - -# You can't build secure targets if you don't have OpenSSL. - -$(BINDIR)/$(CONFIG)/memory_usage_test: openssl_dep_error - -else - - - -$(BINDIR)/$(CONFIG)/memory_usage_test: $(MEMORY_USAGE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a - $(E) "[LD] Linking $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(MEMORY_USAGE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/memory_usage_test - -endif - -$(OBJDIR)/$(CONFIG)/test/core/memory_usage/memory_usage_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a - -deps_memory_usage_test: $(MEMORY_USAGE_TEST_OBJS:.o=.dep) - -ifneq ($(NO_SECURE),true) -ifneq ($(NO_DEPS),true) --include $(MEMORY_USAGE_TEST_OBJS:.o=.dep) -endif -endif - - MESSAGE_COMPRESS_TEST_SRC = \ test/core/compression/message_compress_test.cc \ diff --git a/build.yaml b/build.yaml index a341bc18450..a8c4bfe4e87 100644 --- a/build.yaml +++ b/build.yaml @@ -12,7 +12,7 @@ settings: '#08': Use "-preN" suffixes to identify pre-release versions '#09': Per-language overrides are possible with (eg) ruby_version tag here '#10': See the expand_version.py for all the quirks here - core_version: 8.0.0 + core_version: 9.0.0 csharp_major_version: 2 g_stands_for: gon version: 1.26.0-dev @@ -3317,41 +3317,6 @@ targets: - mac - linux - posix -- name: memory_usage_client - build: test - run: false - language: c - src: - - test/core/memory_usage/client.cc - deps: - - grpc_test_util - - grpc - - gpr - uses_polling: false -- name: memory_usage_server - build: test - run: false - language: c - src: - - test/core/memory_usage/server.cc - deps: - - grpc_test_util - - grpc - - gpr -- name: memory_usage_test - cpu_cost: 1.5 - build: test - language: c - src: - - test/core/memory_usage/memory_usage_test.cc - deps: - - grpc_test_util - - grpc - - gpr - platforms: - - mac - - linux - - posix - name: message_compress_test build: test language: c @@ -6165,6 +6130,10 @@ configs: counters: CPPFLAGS: -O2 -DGPR_LOW_LEVEL_COUNTERS DEFINES: NDEBUG + counters_with_memory_counter: + CPPFLAGS: -O2 -DGPR_LOW_LEVEL_COUNTERS -DGPR_WRAP_MEMORY_COUNTER + DEFINES: NDEBUG + LDFLAGS: -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=realloc -Wl,--wrap=free dbg: CPPFLAGS: -O0 DEFINES: _DEBUG DEBUG diff --git a/build_config.rb b/build_config.rb index 7bd312cd2b6..46cb53f4516 100644 --- a/build_config.rb +++ b/build_config.rb @@ -13,5 +13,5 @@ # limitations under the License. module GrpcBuildConfig - CORE_WINDOWS_DLL = '/tmp/libs/opt/grpc-8.dll' + CORE_WINDOWS_DLL = '/tmp/libs/opt/grpc-9.dll' end diff --git a/grpc.def b/grpc.def index fa4d73c9252..ff68b965eb2 100644 --- a/grpc.def +++ b/grpc.def @@ -217,8 +217,6 @@ EXPORTS gpr_realloc gpr_malloc_aligned gpr_free_aligned - gpr_set_allocation_functions - gpr_get_allocation_functions gpr_cpu_num_cores gpr_cpu_current_cpu gpr_format_message diff --git a/include/grpc/support/alloc.h b/include/grpc/support/alloc.h index 8bd940bec47..d440e4be8c2 100644 --- a/include/grpc/support/alloc.h +++ b/include/grpc/support/alloc.h @@ -27,13 +27,6 @@ extern "C" { #endif -typedef struct gpr_allocation_functions { - void* (*malloc_fn)(size_t size); - void* (*zalloc_fn)(size_t size); /** if NULL, uses malloc_fn then memset */ - void* (*realloc_fn)(void* ptr, size_t size); - void (*free_fn)(void* ptr); -} gpr_allocation_functions; - /** malloc. * If size==0, always returns NULL. Otherwise this function never returns NULL. * The pointer returned is suitably aligned for any kind of variable it could @@ -52,15 +45,6 @@ GPRAPI void* gpr_malloc_aligned(size_t size, size_t alignment); /** free memory allocated by gpr_malloc_aligned */ GPRAPI void gpr_free_aligned(void* ptr); -/** Request the family of allocation functions in \a functions be used. NOTE - * that this request will be honored in a *best effort* basis and that no - * guarantees are made about the default functions (eg, malloc) being called. - * The functions.free_fn implementation must be a no-op for NULL input. */ -GPRAPI void gpr_set_allocation_functions(gpr_allocation_functions functions); - -/** Return the family of allocation functions currently in effect. */ -GPRAPI gpr_allocation_functions gpr_get_allocation_functions(void); - #ifdef __cplusplus } #endif diff --git a/src/core/lib/gpr/alloc.cc b/src/core/lib/gpr/alloc.cc index 611e4cceee4..8c7345b7db5 100644 --- a/src/core/lib/gpr/alloc.cc +++ b/src/core/lib/gpr/alloc.cc @@ -25,36 +25,11 @@ #include #include "src/core/lib/profiling/timers.h" -static void* zalloc_with_calloc(size_t sz) { return calloc(sz, 1); } - -static void* zalloc_with_gpr_malloc(size_t sz) { - void* p = gpr_malloc(sz); - memset(p, 0, sz); - return p; -} - -static gpr_allocation_functions g_alloc_functions = {malloc, zalloc_with_calloc, - realloc, free}; - -gpr_allocation_functions gpr_get_allocation_functions() { - return g_alloc_functions; -} - -void gpr_set_allocation_functions(gpr_allocation_functions functions) { - GPR_ASSERT(functions.malloc_fn != nullptr); - GPR_ASSERT(functions.realloc_fn != nullptr); - GPR_ASSERT(functions.free_fn != nullptr); - if (functions.zalloc_fn == nullptr) { - functions.zalloc_fn = zalloc_with_gpr_malloc; - } - g_alloc_functions = functions; -} - void* gpr_malloc(size_t size) { GPR_TIMER_SCOPE("gpr_malloc", 0); void* p; if (size == 0) return nullptr; - p = g_alloc_functions.malloc_fn(size); + p = malloc(size); if (!p) { abort(); } @@ -65,7 +40,7 @@ void* gpr_zalloc(size_t size) { GPR_TIMER_SCOPE("gpr_zalloc", 0); void* p; if (size == 0) return nullptr; - p = g_alloc_functions.zalloc_fn(size); + p = calloc(size, 1); if (!p) { abort(); } @@ -74,13 +49,13 @@ void* gpr_zalloc(size_t size) { void gpr_free(void* p) { GPR_TIMER_SCOPE("gpr_free", 0); - g_alloc_functions.free_fn(p); + free(p); } void* gpr_realloc(void* p, size_t size) { GPR_TIMER_SCOPE("gpr_realloc", 0); if ((size == 0) && (p == nullptr)) return nullptr; - p = g_alloc_functions.realloc_fn(p, size); + p = realloc(p, size); if (!p) { abort(); } diff --git a/src/core/lib/surface/version.cc b/src/core/lib/surface/version.cc index fde716acd3b..8f3fab19775 100644 --- a/src/core/lib/surface/version.cc +++ b/src/core/lib/surface/version.cc @@ -23,6 +23,6 @@ #include -const char* grpc_version_string(void) { return "8.0.0"; } +const char* grpc_version_string(void) { return "9.0.0"; } const char* grpc_g_stands_for(void) { return "gon"; } diff --git a/src/objective-c/tests/version.h b/src/objective-c/tests/version.h index 2e7f5f5216c..20a36e0f6bd 100644 --- a/src/objective-c/tests/version.h +++ b/src/objective-c/tests/version.h @@ -23,4 +23,4 @@ // `tools/buildgen/generate_projects.sh`. #define GRPC_OBJC_VERSION_STRING @"1.26.0-dev" -#define GRPC_C_VERSION_STRING @"8.0.0" +#define GRPC_C_VERSION_STRING @"9.0.0" diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index 6cb10c9126c..e75b83ba17e 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -240,8 +240,6 @@ gpr_free_type gpr_free_import; gpr_realloc_type gpr_realloc_import; gpr_malloc_aligned_type gpr_malloc_aligned_import; gpr_free_aligned_type gpr_free_aligned_import; -gpr_set_allocation_functions_type gpr_set_allocation_functions_import; -gpr_get_allocation_functions_type gpr_get_allocation_functions_import; gpr_cpu_num_cores_type gpr_cpu_num_cores_import; gpr_cpu_current_cpu_type gpr_cpu_current_cpu_import; gpr_format_message_type gpr_format_message_import; @@ -513,8 +511,6 @@ void grpc_rb_load_imports(HMODULE library) { gpr_realloc_import = (gpr_realloc_type) GetProcAddress(library, "gpr_realloc"); gpr_malloc_aligned_import = (gpr_malloc_aligned_type) GetProcAddress(library, "gpr_malloc_aligned"); gpr_free_aligned_import = (gpr_free_aligned_type) GetProcAddress(library, "gpr_free_aligned"); - gpr_set_allocation_functions_import = (gpr_set_allocation_functions_type) GetProcAddress(library, "gpr_set_allocation_functions"); - gpr_get_allocation_functions_import = (gpr_get_allocation_functions_type) GetProcAddress(library, "gpr_get_allocation_functions"); gpr_cpu_num_cores_import = (gpr_cpu_num_cores_type) GetProcAddress(library, "gpr_cpu_num_cores"); gpr_cpu_current_cpu_import = (gpr_cpu_current_cpu_type) GetProcAddress(library, "gpr_cpu_current_cpu"); gpr_format_message_import = (gpr_format_message_type) GetProcAddress(library, "gpr_format_message"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index 46912af5f5a..0205f60d06f 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -695,12 +695,6 @@ extern gpr_malloc_aligned_type gpr_malloc_aligned_import; typedef void(*gpr_free_aligned_type)(void* ptr); extern gpr_free_aligned_type gpr_free_aligned_import; #define gpr_free_aligned gpr_free_aligned_import -typedef void(*gpr_set_allocation_functions_type)(gpr_allocation_functions functions); -extern gpr_set_allocation_functions_type gpr_set_allocation_functions_import; -#define gpr_set_allocation_functions gpr_set_allocation_functions_import -typedef gpr_allocation_functions(*gpr_get_allocation_functions_type)(void); -extern gpr_get_allocation_functions_type gpr_get_allocation_functions_import; -#define gpr_get_allocation_functions gpr_get_allocation_functions_import typedef unsigned(*gpr_cpu_num_cores_type)(void); extern gpr_cpu_num_cores_type gpr_cpu_num_cores_import; #define gpr_cpu_num_cores gpr_cpu_num_cores_import diff --git a/test/core/end2end/fuzzers/client_fuzzer.cc b/test/core/end2end/fuzzers/client_fuzzer.cc index bb97cc0b1cf..420479d3f28 100644 --- a/test/core/end2end/fuzzers/client_fuzzer.cc +++ b/test/core/end2end/fuzzers/client_fuzzer.cc @@ -27,7 +27,6 @@ #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/surface/channel.h" -#include "test/core/util/memory_counters.h" #include "test/core/util/mock_endpoint.h" bool squelch = true; @@ -42,7 +41,6 @@ static void dont_log(gpr_log_func_args* /*args*/) {} extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { grpc_test_only_set_slice_hash_seed(0); if (squelch) gpr_set_log_function(dont_log); - grpc_core::testing::LeakDetector leak_detector(leak_check); grpc_init(); grpc_test_only_control_plane_credentials_force_init(); { diff --git a/test/core/end2end/fuzzers/server_fuzzer.cc b/test/core/end2end/fuzzers/server_fuzzer.cc index 7664000dae8..61cbc7d45af 100644 --- a/test/core/end2end/fuzzers/server_fuzzer.cc +++ b/test/core/end2end/fuzzers/server_fuzzer.cc @@ -23,7 +23,6 @@ #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/surface/server.h" -#include "test/core/util/memory_counters.h" #include "test/core/util/mock_endpoint.h" bool squelch = true; @@ -39,7 +38,6 @@ static void dont_log(gpr_log_func_args* /*args*/) {} extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { grpc_test_only_set_slice_hash_seed(0); if (squelch) gpr_set_log_function(dont_log); - grpc_core::testing::LeakDetector leak_detector(leak_check); grpc_init(); grpc_test_only_control_plane_credentials_force_init(); { diff --git a/test/core/gpr/alloc_test.cc b/test/core/gpr/alloc_test.cc index 55fe6d95a8f..afa4dccda38 100644 --- a/test/core/gpr/alloc_test.cc +++ b/test/core/gpr/alloc_test.cc @@ -23,36 +23,6 @@ #include "test/core/util/test_config.h" -static void* fake_malloc(size_t size) { return (void*)size; } - -static void* fake_realloc(void* /*addr*/, size_t size) { return (void*)size; } - -static void fake_free(void* addr) { - *(static_cast(addr)) = static_cast(0xdeadd00d); -} - -static void test_custom_allocs() { - const gpr_allocation_functions default_fns = gpr_get_allocation_functions(); - intptr_t addr_to_free = 0; - char* i; - gpr_allocation_functions fns = {fake_malloc, nullptr, fake_realloc, - fake_free}; - - gpr_set_allocation_functions(fns); - GPR_ASSERT((void*)(size_t)0xdeadbeef == gpr_malloc(0xdeadbeef)); - GPR_ASSERT((void*)(size_t)0xcafed00d == gpr_realloc(nullptr, 0xcafed00d)); - - gpr_free(&addr_to_free); - GPR_ASSERT(addr_to_free == (intptr_t)0xdeadd00d); - - /* Restore and check we don't get funky values and that we don't leak */ - gpr_set_allocation_functions(default_fns); - GPR_ASSERT((void*)sizeof(*i) != - (i = static_cast(gpr_malloc(sizeof(*i))))); - GPR_ASSERT((void*)2 != (i = static_cast(gpr_realloc(i, 2)))); - gpr_free(i); -} - static void test_malloc_aligned() { for (size_t size = 1; size <= 256; ++size) { void* ptr = gpr_malloc_aligned(size, 16); @@ -65,7 +35,6 @@ static void test_malloc_aligned() { int main(int argc, char** argv) { grpc::testing::TestEnvironment env(argc, argv); - test_custom_allocs(); test_malloc_aligned(); return 0; } diff --git a/test/core/json/fuzzer.cc b/test/core/json/fuzzer.cc index 8b3e9792d15..974988ef277 100644 --- a/test/core/json/fuzzer.cc +++ b/test/core/json/fuzzer.cc @@ -24,14 +24,12 @@ #include #include "src/core/lib/json/json.h" -#include "test/core/util/memory_counters.h" bool squelch = true; bool leak_check = true; extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { char* s; - grpc_core::testing::LeakDetector leak_detector(true); s = static_cast(gpr_malloc(size)); memcpy(s, data, size); grpc_json* x; diff --git a/test/core/memory_usage/BUILD b/test/core/memory_usage/BUILD deleted file mode 100644 index 0949c89ed9e..00000000000 --- a/test/core/memory_usage/BUILD +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 2017 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_package") - -grpc_package(name = "test/core/memory_usage") - -licenses(["notice"]) # Apache v2 - -grpc_cc_library( - name = "memory_usage_client", - testonly = 1, - srcs = ["client.cc"], - deps = [ - "//:gpr", - "//:grpc", - "//test/core/util:grpc_test_util", - ], -) - -grpc_cc_library( - name = "memory_usage_server", - testonly = 1, - srcs = ["server.cc"], - deps = [ - "//:gpr", - "//:grpc", - "//test/core/end2end:ssl_test_data", - "//test/core/util:grpc_test_util", - ], -) - -grpc_cc_test( - name = "memory_usage_test", - srcs = ["memory_usage_test.cc"], - data = [ - ":memory_usage_client", - ":memory_usage_server", - ], - language = "C++", - tags = ["no_windows"], # TODO(jtattermusch): breaks windows RBE build if enabled - deps = [ - "//:gpr", - "//:grpc", - "//test/core/util:grpc_test_util", - ], - uses_polling = False, -) diff --git a/test/core/memory_usage/client.cc b/test/core/memory_usage/client.cc deleted file mode 100644 index 0d7c85009c4..00000000000 --- a/test/core/memory_usage/client.cc +++ /dev/null @@ -1,340 +0,0 @@ -/* - * - * Copyright 2016 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include "src/core/lib/gpr/env.h" -#include "src/core/lib/gpr/string.h" -#include "src/core/lib/gpr/useful.h" - -#include "test/core/util/cmdline.h" -#include "test/core/util/memory_counters.h" -#include "test/core/util/test_config.h" - -static grpc_channel* channel; -static grpc_completion_queue* cq; -static grpc_op metadata_ops[2]; -static grpc_op status_ops[2]; -static grpc_op snapshot_ops[6]; -static grpc_op* op; - -typedef struct { - grpc_call* call; - grpc_metadata_array initial_metadata_recv; - grpc_status_code status; - grpc_slice details; - grpc_metadata_array trailing_metadata_recv; -} fling_call; - -// Statically allocate call data structs. Enough to accommodate 10000 ping-pong -// calls and 1 extra for the snapshot calls. -static fling_call calls[10001]; - -static void* tag(intptr_t t) { return (void*)t; } - -// A call is intentionally divided into two steps. First step is to initiate a -// call (i.e send and recv metadata). A call is outstanding after we initated, -// so we can measure the call memory usage. -static void init_ping_pong_request(int call_idx) { - grpc_metadata_array_init(&calls[call_idx].initial_metadata_recv); - - memset(metadata_ops, 0, sizeof(metadata_ops)); - op = metadata_ops; - op->op = GRPC_OP_SEND_INITIAL_METADATA; - op->data.send_initial_metadata.count = 0; - op->flags = GRPC_INITIAL_METADATA_WAIT_FOR_READY; - op++; - op->op = GRPC_OP_RECV_INITIAL_METADATA; - op->data.recv_initial_metadata.recv_initial_metadata = - &calls[call_idx].initial_metadata_recv; - op++; - - grpc_slice hostname = grpc_slice_from_static_string("localhost"); - calls[call_idx].call = grpc_channel_create_call( - channel, nullptr, GRPC_PROPAGATE_DEFAULTS, cq, - grpc_slice_from_static_string("/Reflector/reflectUnary"), &hostname, - gpr_inf_future(GPR_CLOCK_REALTIME), nullptr); - - GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(calls[call_idx].call, - metadata_ops, - (size_t)(op - metadata_ops), - tag(call_idx), nullptr)); - grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME), nullptr); -} - -// Second step is to finish the call (i.e recv status) and destroy the call. -static void finish_ping_pong_request(int call_idx) { - grpc_metadata_array_init(&calls[call_idx].trailing_metadata_recv); - - memset(status_ops, 0, sizeof(status_ops)); - op = status_ops; - op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; - op->data.recv_status_on_client.trailing_metadata = - &calls[call_idx].trailing_metadata_recv; - op->data.recv_status_on_client.status = &calls[call_idx].status; - op->data.recv_status_on_client.status_details = &calls[call_idx].details; - op++; - - GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(calls[call_idx].call, - status_ops, - (size_t)(op - status_ops), - tag(call_idx), nullptr)); - grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME), nullptr); - grpc_metadata_array_destroy(&calls[call_idx].initial_metadata_recv); - grpc_metadata_array_destroy(&calls[call_idx].trailing_metadata_recv); - grpc_slice_unref(calls[call_idx].details); - grpc_call_unref(calls[call_idx].call); - calls[call_idx].call = nullptr; -} - -static struct grpc_memory_counters send_snapshot_request(int call_idx, - grpc_slice call_type) { - grpc_metadata_array_init(&calls[call_idx].initial_metadata_recv); - grpc_metadata_array_init(&calls[call_idx].trailing_metadata_recv); - - grpc_byte_buffer* response_payload_recv = nullptr; - memset(snapshot_ops, 0, sizeof(snapshot_ops)); - op = snapshot_ops; - - op->op = GRPC_OP_SEND_INITIAL_METADATA; - op->data.send_initial_metadata.count = 0; - op->flags = GRPC_INITIAL_METADATA_WAIT_FOR_READY; - op++; - op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; - op++; - op->op = GRPC_OP_RECV_INITIAL_METADATA; - op->data.recv_initial_metadata.recv_initial_metadata = - &calls[call_idx].initial_metadata_recv; - op++; - op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message.recv_message = &response_payload_recv; - op++; - op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; - op->data.recv_status_on_client.trailing_metadata = - &calls[call_idx].trailing_metadata_recv; - op->data.recv_status_on_client.status = &calls[call_idx].status; - op->data.recv_status_on_client.status_details = &calls[call_idx].details; - op++; - - grpc_slice hostname = grpc_slice_from_static_string("localhost"); - calls[call_idx].call = grpc_channel_create_call( - channel, nullptr, GRPC_PROPAGATE_DEFAULTS, cq, call_type, &hostname, - gpr_inf_future(GPR_CLOCK_REALTIME), nullptr); - GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(calls[call_idx].call, - snapshot_ops, - (size_t)(op - snapshot_ops), - (void*)nullptr, nullptr)); - grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME), nullptr); - - grpc_byte_buffer_reader reader; - grpc_byte_buffer_reader_init(&reader, response_payload_recv); - grpc_slice response = grpc_byte_buffer_reader_readall(&reader); - - struct grpc_memory_counters snapshot; - snapshot.total_size_absolute = - (reinterpret_cast GRPC_SLICE_START_PTR( - response)) - ->total_size_absolute; - snapshot.total_allocs_absolute = - (reinterpret_cast GRPC_SLICE_START_PTR( - response)) - ->total_allocs_absolute; - snapshot.total_size_relative = - (reinterpret_cast GRPC_SLICE_START_PTR( - response)) - ->total_size_relative; - snapshot.total_allocs_relative = - (reinterpret_cast GRPC_SLICE_START_PTR( - response)) - ->total_allocs_relative; - - grpc_metadata_array_destroy(&calls[call_idx].initial_metadata_recv); - grpc_metadata_array_destroy(&calls[call_idx].trailing_metadata_recv); - grpc_slice_unref(response); - grpc_byte_buffer_reader_destroy(&reader); - grpc_byte_buffer_destroy(response_payload_recv); - grpc_slice_unref(calls[call_idx].details); - calls[call_idx].details = grpc_empty_slice(); - grpc_call_unref(calls[call_idx].call); - calls[call_idx].call = nullptr; - - return snapshot; -} - -int main(int argc, char** argv) { - grpc_memory_counters_init(); - grpc_slice slice = grpc_slice_from_copied_string("x"); - char* fake_argv[1]; - - const char* target = "localhost:443"; - gpr_cmdline* cl; - grpc_event event; - - GPR_ASSERT(argc >= 1); - fake_argv[0] = argv[0]; - grpc::testing::TestEnvironment env(1, fake_argv); - - grpc_init(); - - int warmup_iterations = 100; - int benchmark_iterations = 1000; - - cl = gpr_cmdline_create("memory profiling client"); - gpr_cmdline_add_string(cl, "target", "Target host:port", &target); - gpr_cmdline_add_int(cl, "warmup", "Warmup iterations", &warmup_iterations); - gpr_cmdline_add_int(cl, "benchmark", "Benchmark iterations", - &benchmark_iterations); - gpr_cmdline_parse(cl, argc, argv); - gpr_cmdline_destroy(cl); - - for (size_t k = 0; k < GPR_ARRAY_SIZE(calls); k++) { - calls[k].details = grpc_empty_slice(); - } - - cq = grpc_completion_queue_create_for_next(nullptr); - - struct grpc_memory_counters client_channel_start = - grpc_memory_counters_snapshot(); - channel = grpc_insecure_channel_create(target, nullptr, nullptr); - - int call_idx = 0; - - struct grpc_memory_counters before_server_create = send_snapshot_request( - 0, grpc_slice_from_static_string("Reflector/GetBeforeSvrCreation")); - struct grpc_memory_counters after_server_create = send_snapshot_request( - 0, grpc_slice_from_static_string("Reflector/GetAfterSvrCreation")); - - // warmup period - for (int i = 0; i < warmup_iterations; i++) { - send_snapshot_request( - 0, grpc_slice_from_static_string("Reflector/SimpleSnapshot")); - } - - for (call_idx = 0; call_idx < warmup_iterations; ++call_idx) { - init_ping_pong_request(call_idx + 1); - } - - struct grpc_memory_counters server_benchmark_calls_start = - send_snapshot_request( - 0, grpc_slice_from_static_string("Reflector/SimpleSnapshot")); - - struct grpc_memory_counters client_benchmark_calls_start = - grpc_memory_counters_snapshot(); - - // benchmark period - for (; call_idx < warmup_iterations + benchmark_iterations; ++call_idx) { - init_ping_pong_request(call_idx + 1); - } - - struct grpc_memory_counters client_calls_inflight = - grpc_memory_counters_snapshot(); - - struct grpc_memory_counters server_calls_inflight = send_snapshot_request( - 0, grpc_slice_from_static_string("Reflector/DestroyCalls")); - - do { - event = grpc_completion_queue_next( - cq, - gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), - gpr_time_from_micros(10000, GPR_TIMESPAN)), - nullptr); - } while (event.type != GRPC_QUEUE_TIMEOUT); - - // second step - recv status and destroy call - for (call_idx = 0; call_idx < warmup_iterations + benchmark_iterations; - ++call_idx) { - finish_ping_pong_request(call_idx + 1); - } - - struct grpc_memory_counters server_calls_end = send_snapshot_request( - 0, grpc_slice_from_static_string("Reflector/SimpleSnapshot")); - - struct grpc_memory_counters client_channel_end = - grpc_memory_counters_snapshot(); - - grpc_channel_destroy(channel); - grpc_completion_queue_shutdown(cq); - - do { - event = grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME), - nullptr); - } while (event.type != GRPC_QUEUE_SHUTDOWN); - grpc_slice_unref(slice); - - grpc_completion_queue_destroy(cq); - grpc_shutdown_blocking(); - - gpr_log(GPR_INFO, "---------client stats--------"); - gpr_log( - GPR_INFO, "client call memory usage: %f bytes per call", - static_cast(client_calls_inflight.total_size_relative - - client_benchmark_calls_start.total_size_relative) / - benchmark_iterations); - gpr_log(GPR_INFO, "client channel memory usage %zi bytes", - client_channel_end.total_size_relative - - client_channel_start.total_size_relative); - - gpr_log(GPR_INFO, "---------server stats--------"); - gpr_log(GPR_INFO, "server create: %zi bytes", - after_server_create.total_size_relative - - before_server_create.total_size_relative); - gpr_log( - GPR_INFO, "server call memory usage: %f bytes per call", - static_cast(server_calls_inflight.total_size_relative - - server_benchmark_calls_start.total_size_relative) / - benchmark_iterations); - gpr_log(GPR_INFO, "server channel memory usage %zi bytes", - server_calls_end.total_size_relative - - after_server_create.total_size_relative); - - const char* csv_file = "memory_usage.csv"; - FILE* csv = fopen(csv_file, "w"); - if (csv) { - char* env_build = gpr_getenv("BUILD_NUMBER"); - char* env_job = gpr_getenv("JOB_NAME"); - fprintf( - csv, "%f,%zi,%zi,%f,%zi,%s,%s\n", - static_cast(client_calls_inflight.total_size_relative - - client_benchmark_calls_start.total_size_relative) / - benchmark_iterations, - client_channel_end.total_size_relative - - client_channel_start.total_size_relative, - after_server_create.total_size_relative - - before_server_create.total_size_relative, - static_cast(server_calls_inflight.total_size_relative - - server_benchmark_calls_start.total_size_relative) / - benchmark_iterations, - server_calls_end.total_size_relative - - after_server_create.total_size_relative, - env_build == nullptr ? "" : env_build, - env_job == nullptr ? "" : env_job); - fclose(csv); - gpr_log(GPR_INFO, "Summary written to %s", csv_file); - } - - grpc_memory_counters_destroy(); - return 0; -} diff --git a/test/core/memory_usage/memory_usage_test.cc b/test/core/memory_usage/memory_usage_test.cc deleted file mode 100644 index d971b5bf6ad..00000000000 --- a/test/core/memory_usage/memory_usage_test.cc +++ /dev/null @@ -1,80 +0,0 @@ -/* - * - * Copyright 2015 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include -#include - -#include -#include - -#include "src/core/lib/gpr/string.h" -#include "src/core/lib/gprpp/host_port.h" -#include "test/core/util/port.h" -#include "test/core/util/subprocess.h" - -int main(int /*argc*/, char** argv) { - char* me = argv[0]; - char* lslash = strrchr(me, '/'); - char root[1024]; - int port = grpc_pick_unused_port_or_die(); - char* args[10]; - int status; - gpr_subprocess *svr, *cli; - /* figure out where we are */ - if (lslash) { - memcpy(root, me, static_cast(lslash - me)); - root[lslash - me] = 0; - } else { - strcpy(root, "."); - } - /* start the server */ - gpr_asprintf(&args[0], "%s/memory_usage_server%s", root, - gpr_subprocess_binary_extension()); - args[1] = const_cast("--bind"); - grpc_core::UniquePtr joined; - grpc_core::JoinHostPort(&joined, "::", port); - args[2] = joined.get(); - args[3] = const_cast("--no-secure"); - svr = gpr_subprocess_create(4, (const char**)args); - gpr_free(args[0]); - - /* start the client */ - gpr_asprintf(&args[0], "%s/memory_usage_client%s", root, - gpr_subprocess_binary_extension()); - args[1] = const_cast("--target"); - grpc_core::JoinHostPort(&joined, "127.0.0.1", port); - args[2] = joined.get(); - args[3] = const_cast("--warmup=1000"); - args[4] = const_cast("--benchmark=9000"); - cli = gpr_subprocess_create(5, (const char**)args); - gpr_free(args[0]); - - /* wait for completion */ - printf("waiting for client\n"); - if ((status = gpr_subprocess_join(cli))) { - gpr_subprocess_destroy(cli); - gpr_subprocess_destroy(svr); - return status; - } - gpr_subprocess_destroy(cli); - - gpr_subprocess_interrupt(svr); - status = gpr_subprocess_join(svr); - gpr_subprocess_destroy(svr); - return status; -} diff --git a/test/core/memory_usage/server.cc b/test/core/memory_usage/server.cc deleted file mode 100644 index 3c69f648ab9..00000000000 --- a/test/core/memory_usage/server.cc +++ /dev/null @@ -1,324 +0,0 @@ -/* - * - * Copyright 2016 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include -#include - -#include -#include -#include -#include -#include -#ifndef _WIN32 -/* This is for _exit() below, which is temporary. */ -#include -#endif - -#include -#include -#include - -#include "src/core/lib/gprpp/host_port.h" -#include "test/core/end2end/data/ssl_test_data.h" -#include "test/core/util/cmdline.h" -#include "test/core/util/memory_counters.h" -#include "test/core/util/port.h" -#include "test/core/util/test_config.h" - -static grpc_completion_queue* cq; -static grpc_server* server; -static grpc_op metadata_ops[2]; -static grpc_op snapshot_ops[5]; -static grpc_op status_op; -static int got_sigint = 0; -static grpc_byte_buffer* payload_buffer = nullptr; -static grpc_byte_buffer* terminal_buffer = nullptr; -static int was_cancelled = 2; - -static void* tag(intptr_t t) { return (void*)t; } - -typedef enum { - FLING_SERVER_NEW_REQUEST = 1, - FLING_SERVER_SEND_INIT_METADATA, - FLING_SERVER_WAIT_FOR_DESTROY, - FLING_SERVER_SEND_STATUS_FLING_CALL, - FLING_SERVER_SEND_STATUS_SNAPSHOT, - FLING_SERVER_BATCH_SEND_STATUS_FLING_CALL -} fling_server_tags; - -typedef struct { - fling_server_tags state; - grpc_call* call; - grpc_call_details call_details; - grpc_metadata_array request_metadata_recv; - grpc_metadata_array initial_metadata_send; -} fling_call; - -// hold up to 10000 calls and 6 snaphost calls -static fling_call calls[100006]; - -static void request_call_unary(int call_idx) { - if (call_idx == static_cast(sizeof(calls) / sizeof(fling_call))) { - gpr_log(GPR_INFO, "Used all call slots (10000) on server. Server exit."); - _exit(0); - } - grpc_metadata_array_init(&calls[call_idx].request_metadata_recv); - grpc_server_request_call( - server, &calls[call_idx].call, &calls[call_idx].call_details, - &calls[call_idx].request_metadata_recv, cq, cq, &calls[call_idx]); -} - -static void send_initial_metadata_unary(void* tag) { - grpc_metadata_array_init( - &(*static_cast(tag)).initial_metadata_send); - metadata_ops[0].op = GRPC_OP_SEND_INITIAL_METADATA; - metadata_ops[0].data.send_initial_metadata.count = 0; - - GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch((*(fling_call*)tag).call, - metadata_ops, 1, tag, - nullptr)); -} - -static void send_status(void* tag) { - status_op.op = GRPC_OP_SEND_STATUS_FROM_SERVER; - status_op.data.send_status_from_server.status = GRPC_STATUS_OK; - status_op.data.send_status_from_server.trailing_metadata_count = 0; - grpc_slice details = grpc_slice_from_static_string(""); - status_op.data.send_status_from_server.status_details = &details; - - GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch((*(fling_call*)tag).call, - &status_op, 1, tag, - nullptr)); -} - -static void send_snapshot(void* tag, struct grpc_memory_counters* snapshot) { - grpc_op* op; - - grpc_slice snapshot_slice = - grpc_slice_new(snapshot, sizeof(*snapshot), gpr_free); - payload_buffer = grpc_raw_byte_buffer_create(&snapshot_slice, 1); - grpc_metadata_array_init( - &(*static_cast(tag)).initial_metadata_send); - - op = snapshot_ops; - op->op = GRPC_OP_SEND_INITIAL_METADATA; - op->data.send_initial_metadata.count = 0; - op++; - op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message.recv_message = &terminal_buffer; - op++; - op->op = GRPC_OP_SEND_MESSAGE; - if (payload_buffer == nullptr) { - gpr_log(GPR_INFO, "NULL payload buffer !!!"); - } - op->data.send_message.send_message = payload_buffer; - op++; - op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; - op->data.send_status_from_server.status = GRPC_STATUS_OK; - op->data.send_status_from_server.trailing_metadata_count = 0; - grpc_slice details = grpc_slice_from_static_string(""); - op->data.send_status_from_server.status_details = &details; - op++; - op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; - op->data.recv_close_on_server.cancelled = &was_cancelled; - op++; - - GPR_ASSERT(GRPC_CALL_OK == - grpc_call_start_batch((*(fling_call*)tag).call, snapshot_ops, - (size_t)(op - snapshot_ops), tag, nullptr)); -} -/* We have some sort of deadlock, so let's not exit gracefully for now. - When that is resolved, please remove the #include above. */ -static void sigint_handler(int /*x*/) { _exit(0); } - -int main(int argc, char** argv) { - grpc_memory_counters_init(); - grpc_event ev; - grpc_core::UniquePtr addr_buf; - gpr_cmdline* cl; - grpc_completion_queue* shutdown_cq; - int shutdown_started = 0; - int shutdown_finished = 0; - - int secure = 0; - const char* addr = nullptr; - - char* fake_argv[1]; - - GPR_ASSERT(argc >= 1); - fake_argv[0] = argv[0]; - grpc::testing::TestEnvironment env(1, fake_argv); - - grpc_init(); - srand(static_cast(clock())); - - cl = gpr_cmdline_create("fling server"); - gpr_cmdline_add_string(cl, "bind", "Bind host:port", &addr); - gpr_cmdline_add_flag(cl, "secure", "Run with security?", &secure); - gpr_cmdline_parse(cl, argc, argv); - gpr_cmdline_destroy(cl); - - if (addr == nullptr) { - grpc_core::JoinHostPort(&addr_buf, "::", grpc_pick_unused_port_or_die()); - addr = addr_buf.get(); - } - gpr_log(GPR_INFO, "creating server on: %s", addr); - - cq = grpc_completion_queue_create_for_next(nullptr); - - struct grpc_memory_counters before_server_create = - grpc_memory_counters_snapshot(); - if (secure) { - grpc_ssl_pem_key_cert_pair pem_key_cert_pair = {test_server1_key, - test_server1_cert}; - grpc_server_credentials* ssl_creds = grpc_ssl_server_credentials_create( - nullptr, &pem_key_cert_pair, 1, 0, nullptr); - server = grpc_server_create(nullptr, nullptr); - GPR_ASSERT(grpc_server_add_secure_http2_port(server, addr, ssl_creds)); - grpc_server_credentials_release(ssl_creds); - } else { - server = grpc_server_create(nullptr, nullptr); - GPR_ASSERT(grpc_server_add_insecure_http2_port(server, addr)); - } - - grpc_server_register_completion_queue(server, cq, nullptr); - grpc_server_start(server); - - struct grpc_memory_counters after_server_create = - grpc_memory_counters_snapshot(); - - addr = nullptr; - addr_buf.reset(); - - // initialize call instances - for (int i = 0; i < static_cast(sizeof(calls) / sizeof(fling_call)); - i++) { - grpc_call_details_init(&calls[i].call_details); - calls[i].state = FLING_SERVER_NEW_REQUEST; - } - - int next_call_idx = 0; - struct grpc_memory_counters current_snapshot; - - request_call_unary(next_call_idx); - - signal(SIGINT, sigint_handler); - - while (!shutdown_finished) { - if (got_sigint && !shutdown_started) { - gpr_log(GPR_INFO, "Shutting down due to SIGINT"); - - shutdown_cq = grpc_completion_queue_create_for_pluck(nullptr); - grpc_server_shutdown_and_notify(server, shutdown_cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck( - shutdown_cq, tag(1000), - grpc_timeout_seconds_to_deadline(5), nullptr) - .type == GRPC_OP_COMPLETE); - grpc_completion_queue_destroy(shutdown_cq); - grpc_completion_queue_shutdown(cq); - shutdown_started = 1; - } - ev = grpc_completion_queue_next( - cq, - gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), - gpr_time_from_micros(1000000, GPR_TIMESPAN)), - nullptr); - fling_call* s = static_cast(ev.tag); - switch (ev.type) { - case GRPC_OP_COMPLETE: - switch (s->state) { - case FLING_SERVER_NEW_REQUEST: - request_call_unary(++next_call_idx); - if (0 == grpc_slice_str_cmp(s->call_details.method, - "/Reflector/reflectUnary")) { - s->state = FLING_SERVER_SEND_INIT_METADATA; - send_initial_metadata_unary(s); - } else if (0 == - grpc_slice_str_cmp(s->call_details.method, - "Reflector/GetBeforeSvrCreation")) { - s->state = FLING_SERVER_SEND_STATUS_SNAPSHOT; - send_snapshot(s, &before_server_create); - } else if (0 == - grpc_slice_str_cmp(s->call_details.method, - "Reflector/GetAfterSvrCreation")) { - s->state = FLING_SERVER_SEND_STATUS_SNAPSHOT; - send_snapshot(s, &after_server_create); - } else if (0 == grpc_slice_str_cmp(s->call_details.method, - "Reflector/SimpleSnapshot")) { - s->state = FLING_SERVER_SEND_STATUS_SNAPSHOT; - current_snapshot = grpc_memory_counters_snapshot(); - send_snapshot(s, ¤t_snapshot); - } else if (0 == grpc_slice_str_cmp(s->call_details.method, - "Reflector/DestroyCalls")) { - s->state = FLING_SERVER_BATCH_SEND_STATUS_FLING_CALL; - current_snapshot = grpc_memory_counters_snapshot(); - send_snapshot(s, ¤t_snapshot); - } else { - gpr_log(GPR_ERROR, "Wrong call method"); - } - break; - case FLING_SERVER_SEND_INIT_METADATA: - s->state = FLING_SERVER_WAIT_FOR_DESTROY; - break; - case FLING_SERVER_WAIT_FOR_DESTROY: - break; - case FLING_SERVER_SEND_STATUS_FLING_CALL: - grpc_call_unref(s->call); - grpc_call_details_destroy(&s->call_details); - grpc_metadata_array_destroy(&s->initial_metadata_send); - grpc_metadata_array_destroy(&s->request_metadata_recv); - break; - case FLING_SERVER_BATCH_SEND_STATUS_FLING_CALL: - for (int k = 0; - k < static_cast(sizeof(calls) / sizeof(fling_call)); - ++k) { - if (calls[k].state == FLING_SERVER_WAIT_FOR_DESTROY) { - calls[k].state = FLING_SERVER_SEND_STATUS_FLING_CALL; - send_status(&calls[k]); - } - } - /* fallthrough */ - // no break here since we want to continue to case - // FLING_SERVER_SEND_STATUS_SNAPSHOT to destroy the snapshot call - case FLING_SERVER_SEND_STATUS_SNAPSHOT: - grpc_byte_buffer_destroy(payload_buffer); - grpc_byte_buffer_destroy(terminal_buffer); - grpc_call_unref(s->call); - grpc_call_details_destroy(&s->call_details); - grpc_metadata_array_destroy(&s->initial_metadata_send); - grpc_metadata_array_destroy(&s->request_metadata_recv); - terminal_buffer = nullptr; - payload_buffer = nullptr; - break; - } - break; - case GRPC_QUEUE_SHUTDOWN: - GPR_ASSERT(shutdown_started); - shutdown_finished = 1; - break; - case GRPC_QUEUE_TIMEOUT: - break; - } - } - - grpc_server_destroy(server); - grpc_completion_queue_destroy(cq); - grpc_shutdown_blocking(); - grpc_memory_counters_destroy(); - return 0; -} diff --git a/test/core/security/alts_credentials_fuzzer.cc b/test/core/security/alts_credentials_fuzzer.cc index e739c2e337c..c772495f63b 100644 --- a/test/core/security/alts_credentials_fuzzer.cc +++ b/test/core/security/alts_credentials_fuzzer.cc @@ -24,7 +24,6 @@ #include #include #include "test/core/util/fuzzer_util.h" -#include "test/core/util/memory_counters.h" #include "src/core/lib/gpr/env.h" #include "src/core/lib/security/credentials/alts/alts_credentials.h" @@ -67,7 +66,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { gpr_set_log_function(dont_log); } gpr_free(grpc_trace_fuzzer); - grpc_core::testing::LeakDetector leak_detector(leak_check); input_stream inp = {data, data + size}; grpc_init(); grpc_test_only_control_plane_credentials_force_init(); diff --git a/test/core/security/ssl_server_fuzzer.cc b/test/core/security/ssl_server_fuzzer.cc index 2dbf894b409..18f1dd7814b 100644 --- a/test/core/security/ssl_server_fuzzer.cc +++ b/test/core/security/ssl_server_fuzzer.cc @@ -24,7 +24,6 @@ #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/security_connector/security_connector.h" #include "test/core/end2end/data/ssl_test_data.h" -#include "test/core/util/memory_counters.h" #include "test/core/util/mock_endpoint.h" bool squelch = true; @@ -53,7 +52,6 @@ static void on_handshake_done(void* arg, grpc_error* error) { extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { if (squelch) gpr_set_log_function(dont_log); - grpc_core::testing::LeakDetector leak_detector(leak_check); grpc_init(); { grpc_core::ExecCtx exec_ctx; diff --git a/test/core/slice/percent_decode_fuzzer.cc b/test/core/slice/percent_decode_fuzzer.cc index bf4ae00be77..5f0de7293fe 100644 --- a/test/core/slice/percent_decode_fuzzer.cc +++ b/test/core/slice/percent_decode_fuzzer.cc @@ -26,13 +26,11 @@ #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/slice/percent_encoding.h" -#include "test/core/util/memory_counters.h" bool squelch = true; bool leak_check = true; extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { - grpc_core::testing::LeakDetector leak_detector(true); grpc_init(); grpc_test_only_control_plane_credentials_force_init(); grpc_slice input = grpc_slice_from_copied_buffer((const char*)data, size); diff --git a/test/core/slice/percent_encode_fuzzer.cc b/test/core/slice/percent_encode_fuzzer.cc index 0fed4b7cce5..a028013f064 100644 --- a/test/core/slice/percent_encode_fuzzer.cc +++ b/test/core/slice/percent_encode_fuzzer.cc @@ -26,13 +26,11 @@ #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/slice/percent_encoding.h" -#include "test/core/util/memory_counters.h" bool squelch = true; bool leak_check = true; static void test(const uint8_t* data, size_t size, const uint8_t* dict) { - grpc_core::testing::LeakDetector leak_detector(true); grpc_init(); grpc_test_only_control_plane_credentials_force_init(); grpc_slice input = diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c index c7656d083d2..58a2d7a4d9f 100644 --- a/test/core/surface/public_headers_must_be_c89.c +++ b/test/core/surface/public_headers_must_be_c89.c @@ -282,8 +282,6 @@ int main(int argc, char **argv) { printf("%lx", (unsigned long) gpr_realloc); printf("%lx", (unsigned long) gpr_malloc_aligned); printf("%lx", (unsigned long) gpr_free_aligned); - printf("%lx", (unsigned long) gpr_set_allocation_functions); - printf("%lx", (unsigned long) gpr_get_allocation_functions); printf("%lx", (unsigned long) gpr_cpu_num_cores); printf("%lx", (unsigned long) gpr_cpu_current_cpu); printf("%lx", (unsigned long) gpr_strdup); diff --git a/test/core/util/memory_counters.cc b/test/core/util/memory_counters.cc index 787fb76e48b..ddd8d2f283f 100644 --- a/test/core/util/memory_counters.cc +++ b/test/core/util/memory_counters.cc @@ -30,12 +30,10 @@ #include "src/core/lib/surface/init.h" #include "test/core/util/memory_counters.h" -static struct grpc_memory_counters g_memory_counters; -static gpr_allocation_functions g_old_allocs; +#include -static void* guard_malloc(size_t size); -static void* guard_realloc(void* vptr, size_t size); -static void guard_free(void* vptr); +static struct grpc_memory_counters g_memory_counters; +static bool g_memory_counter_enabled; #ifdef GPR_LOW_LEVEL_COUNTERS /* hide these from the microbenchmark atomic stats */ @@ -47,61 +45,89 @@ static void guard_free(void* vptr); #define NO_BARRIER_LOAD(x) gpr_atm_no_barrier_load(x) #endif -static void* guard_malloc(size_t size) { +// Memory counter uses --wrap=symbol feature from ld. To use this, +// `GPR_WRAP_MEMORY_COUNTER` needs to be defined. following options should be +// passed to the compiler. +// -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=realloc -Wl,--wrap=free +// * Reference: https://linux.die.net/man/1/ld) +#if GPR_WRAP_MEMORY_COUNTER + +extern "C" { +void* __real_malloc(size_t size); +void* __real_calloc(size_t size); +void* __real_realloc(void* ptr, size_t size); +void __real_free(void* ptr); + +void* __wrap_malloc(size_t size); +void* __wrap_calloc(size_t size); +void* __wrap_realloc(void* ptr, size_t size); +void __wrap_free(void* ptr); +} + +void* __wrap_malloc(size_t size) { + if (!size) return nullptr; + NO_BARRIER_FETCH_ADD(&g_memory_counters.total_size_absolute, (gpr_atm)size); + NO_BARRIER_FETCH_ADD(&g_memory_counters.total_size_relative, (gpr_atm)size); + NO_BARRIER_FETCH_ADD(&g_memory_counters.total_allocs_absolute, (gpr_atm)1); + NO_BARRIER_FETCH_ADD(&g_memory_counters.total_allocs_relative, (gpr_atm)1); + void* ptr = + __real_malloc(GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(size)) + size); + *static_cast(ptr) = size; + return static_cast(ptr) + GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(size)); +} + +void* __wrap_calloc(size_t size) { if (!size) return nullptr; NO_BARRIER_FETCH_ADD(&g_memory_counters.total_size_absolute, (gpr_atm)size); NO_BARRIER_FETCH_ADD(&g_memory_counters.total_size_relative, (gpr_atm)size); NO_BARRIER_FETCH_ADD(&g_memory_counters.total_allocs_absolute, (gpr_atm)1); NO_BARRIER_FETCH_ADD(&g_memory_counters.total_allocs_relative, (gpr_atm)1); - void* ptr = g_old_allocs.malloc_fn( - GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(size)) + size); + void* ptr = + __real_calloc(GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(size)) + size); *static_cast(ptr) = size; return static_cast(ptr) + GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(size)); } -static void* guard_realloc(void* vptr, size_t size) { - if (vptr == nullptr) { - return guard_malloc(size); +void* __wrap_realloc(void* ptr, size_t size) { + if (ptr == nullptr) { + return __wrap_malloc(size); } if (size == 0) { - guard_free(vptr); + __wrap_free(ptr); return nullptr; } - void* ptr = - static_cast(vptr) - GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(size)); + void* rptr = + static_cast(ptr) - GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(size)); NO_BARRIER_FETCH_ADD(&g_memory_counters.total_size_absolute, (gpr_atm)size); NO_BARRIER_FETCH_ADD(&g_memory_counters.total_size_relative, - -*static_cast(ptr)); + -*static_cast(rptr)); NO_BARRIER_FETCH_ADD(&g_memory_counters.total_size_relative, (gpr_atm)size); NO_BARRIER_FETCH_ADD(&g_memory_counters.total_allocs_absolute, (gpr_atm)1); - ptr = g_old_allocs.realloc_fn( - ptr, GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(size)) + size); - *static_cast(ptr) = size; - return static_cast(ptr) + GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(size)); + void* new_ptr = + __real_realloc(rptr, GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(size)) + size); + *static_cast(new_ptr) = size; + return static_cast(new_ptr) + + GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(size)); } -static void guard_free(void* vptr) { - if (vptr == nullptr) return; - void* ptr = - static_cast(vptr) - GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(size_t)); +void __wrap_free(void* ptr) { + if (ptr == nullptr) return; + void* rptr = + static_cast(ptr) - GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(size_t)); NO_BARRIER_FETCH_ADD(&g_memory_counters.total_size_relative, - -*static_cast(ptr)); + -*static_cast(rptr)); NO_BARRIER_FETCH_ADD(&g_memory_counters.total_allocs_relative, -(gpr_atm)1); - g_old_allocs.free_fn(ptr); + __real_free(rptr); } -struct gpr_allocation_functions g_guard_allocs = {guard_malloc, nullptr, - guard_realloc, guard_free}; +#endif // GPR_WRAP_MEMORY_COUNTER void grpc_memory_counters_init() { memset(&g_memory_counters, 0, sizeof(g_memory_counters)); - g_old_allocs = gpr_get_allocation_functions(); - gpr_set_allocation_functions(g_guard_allocs); + g_memory_counter_enabled = true; } -void grpc_memory_counters_destroy() { - gpr_set_allocation_functions(g_old_allocs); -} +void grpc_memory_counters_destroy() { g_memory_counter_enabled = false; } struct grpc_memory_counters grpc_memory_counters_snapshot() { struct grpc_memory_counters counters; diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index 26a9e925e22..df67542e6f2 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 8.0.0 +PROJECT_NUMBER = 9.0.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index feeffaad1d5..d6d9964f8d3 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 8.0.0 +PROJECT_NUMBER = 9.0.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/run_tests/generated/configs.json b/tools/run_tests/generated/configs.json index 74c62862408..3ef9cdb7c78 100644 --- a/tools/run_tests/generated/configs.json +++ b/tools/run_tests/generated/configs.json @@ -56,6 +56,9 @@ "TSAN_OPTIONS": "suppressions=test/core/util/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1" } }, + { + "config": "counters_with_memory_counter" + }, { "config": "stapprof" }, diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index b504ebbd08e..263a382bbc8 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -1917,28 +1917,6 @@ ], "uses_polling": false }, - { - "args": [], - "benchmark": false, - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.5, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "gtest": false, - "language": "c", - "name": "memory_usage_test", - "platforms": [ - "linux", - "mac", - "posix" - ], - "uses_polling": true - }, { "args": [], "benchmark": false, @@ -65521,6 +65499,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -65561,6 +65540,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -65601,6 +65581,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -65641,6 +65622,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -65681,6 +65663,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -65721,6 +65704,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -65761,6 +65745,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -65801,6 +65786,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -65841,6 +65827,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -65881,6 +65868,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -65921,6 +65909,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -65961,6 +65950,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66001,6 +65991,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66041,6 +66032,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66081,6 +66073,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66121,6 +66114,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66161,6 +66155,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66201,6 +66196,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66241,6 +66237,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66281,6 +66278,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66321,6 +66319,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66361,6 +66360,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66401,6 +66401,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66441,6 +66442,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66481,6 +66483,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66521,6 +66524,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66561,6 +66565,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66601,6 +66606,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66641,6 +66647,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66681,6 +66688,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66721,6 +66729,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66761,6 +66770,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66801,6 +66811,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66841,6 +66852,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66881,6 +66893,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66921,6 +66934,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -66961,6 +66975,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67001,6 +67016,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67041,6 +67057,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67081,6 +67098,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67121,6 +67139,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67161,6 +67180,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67201,6 +67221,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67241,6 +67262,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67281,6 +67303,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67321,6 +67344,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67361,6 +67385,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67401,6 +67426,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67441,6 +67467,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67481,6 +67508,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67521,6 +67549,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67561,6 +67590,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67601,6 +67631,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67641,6 +67672,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67681,6 +67713,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67721,6 +67754,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67761,6 +67795,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67801,6 +67836,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67841,6 +67877,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67881,6 +67918,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67921,6 +67959,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -67961,6 +68000,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -68001,6 +68041,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -68041,6 +68082,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -68081,6 +68123,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -68121,6 +68164,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -68161,6 +68205,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -68201,6 +68246,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -68241,6 +68287,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -68281,6 +68328,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -68321,6 +68369,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -68361,6 +68410,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -68401,6 +68451,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -68441,6 +68492,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -68481,6 +68533,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -68521,6 +68574,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind", @@ -68561,6 +68615,7 @@ "basicprof", "c++-compat", "counters", + "counters_with_memory_counter", "dbg", "gcov", "helgrind",