Deprecate gpr_get/set_allocation_functions
This commit is contained in:
parent
31d3df8123
commit
81df105ac8
2
BUILD
2
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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
@ -447,11 +447,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)
|
||||
|
|
@ -8171,89 +8166,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
|
||||
)
|
||||
|
|
|
|||
147
Makefile
147
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
|
||||
|
|
@ -1520,9 +1526,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 \
|
||||
|
|
@ -2132,8 +2135,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"
|
||||
|
|
@ -3168,7 +3169,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)"
|
||||
|
|
@ -3177,7 +3178,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)"
|
||||
|
|
@ -3186,7 +3187,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)"
|
||||
|
|
@ -3195,7 +3196,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)"
|
||||
|
|
@ -3204,7 +3205,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)
|
||||
|
|
@ -3365,8 +3366,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
|
||||
|
|
@ -3517,8 +3518,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
|
||||
|
|
@ -3984,8 +3985,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
|
||||
|
|
@ -4383,8 +4384,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
|
||||
|
|
@ -5430,8 +5431,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
|
||||
|
|
@ -11601,102 +11602,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 \
|
||||
|
||||
|
|
|
|||
41
build.yaml
41
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
|
||||
|
|
@ -6146,6 +6111,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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
2
grpc.def
2
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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -25,36 +25,11 @@
|
|||
#include <string.h>
|
||||
#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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,6 @@
|
|||
|
||||
#include <grpc/grpc.h>
|
||||
|
||||
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"; }
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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<intptr_t*>(addr)) = static_cast<intptr_t>(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<char*>(gpr_malloc(sizeof(*i)))));
|
||||
GPR_ASSERT((void*)2 != (i = static_cast<char*>(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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,14 +24,12 @@
|
|||
#include <grpc/support/log.h>
|
||||
|
||||
#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<char*>(gpr_malloc(size));
|
||||
memcpy(s, data, size);
|
||||
grpc_json* x;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
)
|
||||
|
|
@ -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 <grpc/grpc.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <grpc/byte_buffer.h>
|
||||
#include <grpc/byte_buffer_reader.h>
|
||||
#include <grpc/support/alloc.h>
|
||||
#include <grpc/support/log.h>
|
||||
#include <grpc/support/time.h>
|
||||
#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<struct grpc_memory_counters*> GRPC_SLICE_START_PTR(
|
||||
response))
|
||||
->total_size_absolute;
|
||||
snapshot.total_allocs_absolute =
|
||||
(reinterpret_cast<struct grpc_memory_counters*> GRPC_SLICE_START_PTR(
|
||||
response))
|
||||
->total_allocs_absolute;
|
||||
snapshot.total_size_relative =
|
||||
(reinterpret_cast<struct grpc_memory_counters*> GRPC_SLICE_START_PTR(
|
||||
response))
|
||||
->total_size_relative;
|
||||
snapshot.total_allocs_relative =
|
||||
(reinterpret_cast<struct grpc_memory_counters*> 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<double>(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<double>(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<double>(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<double>(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;
|
||||
}
|
||||
|
|
@ -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 <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <grpc/support/alloc.h>
|
||||
#include <grpc/support/string_util.h>
|
||||
|
||||
#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<size_t>(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<char*>("--bind");
|
||||
grpc_core::UniquePtr<char> joined;
|
||||
grpc_core::JoinHostPort(&joined, "::", port);
|
||||
args[2] = joined.get();
|
||||
args[3] = const_cast<char*>("--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<char*>("--target");
|
||||
grpc_core::JoinHostPort(&joined, "127.0.0.1", port);
|
||||
args[2] = joined.get();
|
||||
args[3] = const_cast<char*>("--warmup=1000");
|
||||
args[4] = const_cast<char*>("--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;
|
||||
}
|
||||
|
|
@ -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 <grpc/grpc.h>
|
||||
#include <grpc/grpc_security.h>
|
||||
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#ifndef _WIN32
|
||||
/* This is for _exit() below, which is temporary. */
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <grpc/support/alloc.h>
|
||||
#include <grpc/support/log.h>
|
||||
#include <grpc/support/time.h>
|
||||
|
||||
#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<int>(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<fling_call*>(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<fling_call*>(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 <unistd.h> 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<char> 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<unsigned>(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<int>(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<fling_call*>(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<int>(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;
|
||||
}
|
||||
|
|
@ -24,7 +24,6 @@
|
|||
#include <grpc/support/log.h>
|
||||
#include <grpc/support/string_util.h>
|
||||
#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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
|
||||
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 = g_old_allocs.malloc_fn(
|
||||
GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(size)) + size);
|
||||
void* ptr =
|
||||
__real_malloc(GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(size)) + size);
|
||||
*static_cast<size_t*>(ptr) = size;
|
||||
return static_cast<char*>(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);
|
||||
}
|
||||
if (size == 0) {
|
||||
guard_free(vptr);
|
||||
return nullptr;
|
||||
}
|
||||
void* ptr =
|
||||
static_cast<char*>(vptr) - 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,
|
||||
-*static_cast<gpr_atm*>(ptr));
|
||||
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);
|
||||
NO_BARRIER_FETCH_ADD(&g_memory_counters.total_allocs_relative, (gpr_atm)1);
|
||||
void* ptr =
|
||||
__real_calloc(GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(size)) + size);
|
||||
*static_cast<size_t*>(ptr) = size;
|
||||
return static_cast<char*>(ptr) + GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(size));
|
||||
}
|
||||
|
||||
static void guard_free(void* vptr) {
|
||||
if (vptr == nullptr) return;
|
||||
void* ptr =
|
||||
static_cast<char*>(vptr) - GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(size_t));
|
||||
void* __wrap_realloc(void* ptr, size_t size) {
|
||||
if (ptr == nullptr) {
|
||||
return __wrap_malloc(size);
|
||||
}
|
||||
if (size == 0) {
|
||||
__wrap_free(ptr);
|
||||
return nullptr;
|
||||
}
|
||||
void* rptr =
|
||||
static_cast<char*>(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<gpr_atm*>(ptr));
|
||||
NO_BARRIER_FETCH_ADD(&g_memory_counters.total_allocs_relative, -(gpr_atm)1);
|
||||
g_old_allocs.free_fn(ptr);
|
||||
-*static_cast<gpr_atm*>(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);
|
||||
void* new_ptr =
|
||||
__real_realloc(rptr, GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(size)) + size);
|
||||
*static_cast<size_t*>(new_ptr) = size;
|
||||
return static_cast<char*>(new_ptr) +
|
||||
GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(size));
|
||||
}
|
||||
|
||||
struct gpr_allocation_functions g_guard_allocs = {guard_malloc, nullptr,
|
||||
guard_realloc, guard_free};
|
||||
void __wrap_free(void* ptr) {
|
||||
if (ptr == nullptr) return;
|
||||
void* rptr =
|
||||
static_cast<char*>(ptr) - GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(size_t));
|
||||
NO_BARRIER_FETCH_ADD(&g_memory_counters.total_size_relative,
|
||||
-*static_cast<gpr_atm*>(rptr));
|
||||
NO_BARRIER_FETCH_ADD(&g_memory_counters.total_allocs_relative, -(gpr_atm)1);
|
||||
__real_free(rptr);
|
||||
}
|
||||
|
||||
#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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
@ -65503,6 +65481,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -65543,6 +65522,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -65583,6 +65563,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -65623,6 +65604,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -65663,6 +65645,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -65703,6 +65686,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -65743,6 +65727,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -65783,6 +65768,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -65823,6 +65809,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -65863,6 +65850,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -65903,6 +65891,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -65943,6 +65932,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -65983,6 +65973,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66023,6 +66014,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66063,6 +66055,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66103,6 +66096,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66143,6 +66137,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66183,6 +66178,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66223,6 +66219,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66263,6 +66260,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66303,6 +66301,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66343,6 +66342,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66383,6 +66383,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66423,6 +66424,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66463,6 +66465,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66503,6 +66506,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66543,6 +66547,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66583,6 +66588,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66623,6 +66629,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66663,6 +66670,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66703,6 +66711,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66743,6 +66752,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66783,6 +66793,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66823,6 +66834,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66863,6 +66875,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66903,6 +66916,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66943,6 +66957,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -66983,6 +66998,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67023,6 +67039,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67063,6 +67080,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67103,6 +67121,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67143,6 +67162,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67183,6 +67203,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67223,6 +67244,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67263,6 +67285,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67303,6 +67326,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67343,6 +67367,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67383,6 +67408,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67423,6 +67449,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67463,6 +67490,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67503,6 +67531,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67543,6 +67572,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67583,6 +67613,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67623,6 +67654,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67663,6 +67695,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67703,6 +67736,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67743,6 +67777,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67783,6 +67818,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67823,6 +67859,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67863,6 +67900,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67903,6 +67941,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67943,6 +67982,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -67983,6 +68023,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -68023,6 +68064,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -68063,6 +68105,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -68103,6 +68146,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -68143,6 +68187,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -68183,6 +68228,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -68223,6 +68269,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -68263,6 +68310,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -68303,6 +68351,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -68343,6 +68392,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -68383,6 +68433,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -68423,6 +68474,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -68463,6 +68515,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -68503,6 +68556,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
@ -68543,6 +68597,7 @@
|
|||
"basicprof",
|
||||
"c++-compat",
|
||||
"counters",
|
||||
"counters_with_memory_counter",
|
||||
"dbg",
|
||||
"gcov",
|
||||
"helgrind",
|
||||
|
|
|
|||
Loading…
Reference in New Issue