Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MOB-3320] Update RocksDB 8.3.2 #9

Merged
merged 2 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 27 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@

# `COERCE_CONTEXT_SWITCH=1` will inject spurious wakeup and
# random length of sleep or context switch at critical
# points (e.g, before acquring db mutex) in RocksDB.

Check notice on line 182 in Makefile

View check run for this annotation

SafetyCulture Bot / Spelling

Identified potential misspelling

"acquring" should be "acquiring"
# In this way, it coerces as many excution orders as possible in the hope of

Check notice on line 183 in Makefile

View check run for this annotation

SafetyCulture Bot / Spelling

Identified potential misspelling

"excution" should be "execution"
# exposing the problematic excution order

Check notice on line 184 in Makefile

View check run for this annotation

SafetyCulture Bot / Spelling

Identified potential misspelling

"excution" should be "execution"
COERCE_CONTEXT_SWITCH ?= 0
ifeq ($(COERCE_CONTEXT_SWITCH), 1)
OPT += -DCOERCE_CONTEXT_SWITCH
Expand Down Expand Up @@ -280,13 +280,13 @@

CXXFLAGS += $(ARCHFLAG)

ifeq (,$(shell $(CXX) -fsyntax-only -march=armv8-a+crc+crypto -xc /dev/null 2>&1))
ifneq ($(PLATFORM),OS_MACOSX)
CXXFLAGS += -march=armv8-a+crc+crypto
CFLAGS += -march=armv8-a+crc+crypto
ARMCRC_SOURCE=1
endif
endif
# ifeq (,$(shell $(CXX) -fsyntax-only -march=armv8-a+crc+crypto -xc /dev/null 2>&1))
# ifneq ($(PLATFORM),OS_MACOSX)
# CXXFLAGS += -march=armv8-a+crc+crypto
# CFLAGS += -march=armv8-a+crc+crypto
# ARMCRC_SOURCE=1
# endif
# endif

export JAVAC_ARGS
CLEAN_FILES += make_config.mk rocksdb.pc
Expand Down Expand Up @@ -734,13 +734,13 @@
ROCKSDBTESTS_SUBSET := $(filter-out $(TESTS_PLATFORM_DEPENDENT), $(ROCKSDBTESTS_SUBSET))
endif

# bench_tool_analyer main is in bench_tool_analyzer_tool, or this would be simpler...

Check notice on line 737 in Makefile

View check run for this annotation

SafetyCulture Bot / Spelling

Identified potential misspelling

"analyer" should be "analyser, analyzer"
TOOLS = $(patsubst %.cc, %, $(notdir $(patsubst %_tool.cc, %.cc, $(TOOLS_MAIN_SOURCES))))

TEST_LIBS = \
librocksdb_env_basic_test.a

# TODO: add back forward_iterator_bench, after making it build in all environemnts.

Check notice on line 743 in Makefile

View check run for this annotation

SafetyCulture Bot / Spelling

Identified potential misspelling

"environemnts" should be "environments"
BENCHMARKS = $(patsubst %.cc, %, $(notdir $(BENCH_MAIN_SOURCES)))

MICROBENCHS = $(patsubst %.cc, %, $(notdir $(MICROBENCH_SOURCES)))
Expand Down Expand Up @@ -2485,20 +2485,29 @@
SIMULATORROOT=$(PLATFORMSROOT)/iPhoneSimulator.platform/Developer
DEVICEROOT=$(PLATFORMSROOT)/iPhoneOS.platform/Developer
IOSVERSION=$(shell defaults read $(PLATFORMSROOT)/iPhoneOS.platform/version CFBundleShortVersionString)
DEPLOYMENT_TARGET=14.0

ifdef BUILD_FOR_SIMULATOR
ifdef APPLE_SILICON
$(info Build for simulator arm64)
.cc.o:
mkdir -p ios-x86/$(dir $@)
$(CXX) $(CXXFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -arch i686 -arch x86_64 -c $< -o ios-x86/$@
mkdir -p ios-arm/$(dir $@)
xcrun -sdk iphoneos $(CXX) $(CXXFLAGS) -isysroot $(DEVICEROOT)/SDKs/iPhoneOS$(IOSVERSION).sdk -arch armv6 -arch armv7 -arch armv7s -arch arm64 -c $< -o ios-arm/$@
lipo ios-x86/$@ ios-arm/$@ -create -output $@

xcrun -sdk iphonesimulator $(CXX) $(CXXFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -mios-simulator-version-min=$(DEPLOYMENT_TARGET) -arch arm64 -target aarch64-apple-ios${DEPLOYMENT_TARGET}-simulator -c $< -o $@
.c.o:
xcrun -sdk iphonesimulator $(CXX) $(CXXFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -mios-simulator-version-min=$(DEPLOYMENT_TARGET) -arch arm64 -target aarch64-apple-ios${DEPLOYMENT_TARGET}-simulator -c $< -o $@
else
$(info Build for simulator x86_64)
.cc.o:
xcrun -sdk iphonesimulator $(CXX) $(CXXFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -mios-simulator-version-min=$(DEPLOYMENT_TARGET) -arch x86_64 -target x86_64-apple-ios${DEPLOYMENT_TARGET}-simulator -c $< -o $@
.c.o:
mkdir -p ios-x86/$(dir $@)
$(CC) $(CFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -arch i686 -arch x86_64 -c $< -o ios-x86/$@
mkdir -p ios-arm/$(dir $@)
xcrun -sdk iphoneos $(CC) $(CFLAGS) -isysroot $(DEVICEROOT)/SDKs/iPhoneOS$(IOSVERSION).sdk -arch armv6 -arch armv7 -arch armv7s -arch arm64 -c $< -o ios-arm/$@
lipo ios-x86/$@ ios-arm/$@ -create -output $@
xcrun -sdk iphonesimulator $(CXX) $(CXXFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -mios-simulator-version-min=$(DEPLOYMENT_TARGET) -arch x86_64 -target x86_64-apple-ios${DEPLOYMENT_TARGET}-simulator -c $< -o $@
endif
else
$(info Build for device)
.cc.o:
xcrun -sdk iphoneos $(CXX) $(CXXFLAGS) -isysroot $(DEVICEROOT)/SDKs/iPhoneOS$(IOSVERSION).sdk -fembed-bitcode -miphoneos-version-min=$(DEPLOYMENT_TARGET) -arch arm64 -c $< -o $@
.c.o:
xcrun -sdk iphoneos $(CXX) $(CXXFLAGS) -isysroot $(DEVICEROOT)/SDKs/iPhoneOS$(IOSVERSION).sdk -fembed-bitcode -miphoneos-version-min=$(DEPLOYMENT_TARGET) -arch arm64 -c $< -o $@
endif

else
ifeq ($(HAVE_POWER8),1)
Expand Down
4 changes: 2 additions & 2 deletions build_tools/build_detect_platform
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
;;
IOS)
PLATFORM=IOS
COMMON_FLAGS="$COMMON_FLAGS -DOS_MACOSX -DIOS_CROSS_COMPILE "
COMMON_FLAGS="$COMMON_FLAGS -DOS_MACOSX -DIOS_CROSS_COMPILE -DNPERF_CONTEXT -DNIOSTATS_CONTEXT"
PLATFORM_SHARED_EXT=dylib
PLATFORM_SHARED_LDFLAGS="-dynamiclib -install_name "
CROSS_COMPILE=true
Expand Down Expand Up @@ -627,7 +627,7 @@
POWER=`LD_SHOW_AUXV=1 /bin/true | grep AT_PLATFORM | grep -E -o power[0-9]+`
COMMON_FLAGS="$COMMON_FLAGS -mcpu=$POWER -mtune=$POWER "
elif test -n "`echo $TARGET_ARCHITECTURE | grep -e^arm -e^aarch64`"; then
# TODO: Handle this with approprite options.

Check notice on line 630 in build_tools/build_detect_platform

View check run for this annotation

SafetyCulture Bot / Spelling

Identified potential misspelling

"approprite" should be "appropriate"
COMMON_FLAGS="$COMMON_FLAGS"
elif test -n "`echo $TARGET_ARCHITECTURE | grep ^aarch64`"; then
COMMON_FLAGS="$COMMON_FLAGS"
Expand Down Expand Up @@ -707,7 +707,7 @@
}
EOF
if [ "$?" = 0 ]; then
COMMON_FLAGS="$COMMON_FLAGS -DHAVE_UINT128_EXTENSION"
COMMON_FLAGS="$COMMON_FLAGS"
fi

if [ "$FBCODE_BUILD" != "true" -a "$PLATFORM" = OS_LINUX ]; then
Expand Down Expand Up @@ -790,7 +790,7 @@
echo "JEMALLOC=1" >> "$OUTPUT"
fi
# Indicates that jemalloc should be enabled using -ljemalloc flag
# The alternative is to porvide a direct link to the library via JEMALLOC_LIB

Check notice on line 793 in build_tools/build_detect_platform

View check run for this annotation

SafetyCulture Bot / Spelling

Identified potential misspelling

"porvide" should be "provide"
# and JEMALLOC_INCLUDE
if test -n "$WITH_JEMALLOC_FLAG"; then
echo "WITH_JEMALLOC_FLAG=$WITH_JEMALLOC_FLAG" >> "$OUTPUT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
// Recent machines have constant_tsc in which case we get property (4).
// Recent OSs on recent machines (that have RDTSCP) fix the per-processor clock
// skew, so we get property (3). We get property 2 with RDTSC (as long as
// there's not any skew). We don't even try to get propety 1, since we don't

Check notice on line 98 in utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h

View check run for this annotation

SafetyCulture Bot / Spelling

Identified potential misspelling

"propety" should be "property"
// need it. The decision here is that these times are really accurate only on
// modern machines with modern OSs.
typedef uint64_t tokutime_t; // Time type used in by tokutek timers.
Expand Down Expand Up @@ -131,6 +131,10 @@
uint64_t result;
__asm __volatile__("mrs %[rt], cntvct_el0" : [rt] "=r"(result));
return result;
#elif defined(__arm__)
uint32_t lo, hi;
__asm __volatile__("mrrc p15, 1, %[lo], %[hi], c14" : [ lo ] "=r" (lo), [hi] "=r" (hi));
return (uint64_t)hi << 32 | lo;
#elif defined(__powerpc__)
return __ppc_get_timebase();
#elif defined(__s390x__)
Expand Down
Loading