build: Add --enable-pointer-packing option.

Pointer packing is now disabled by default for x86_64 targets.
Jeffrey M. Birnbaum <jmbny.@...> told me that according to his
discussions with Intel engineers, Haswell will be bumping up
VMA bits to 56 bits from 48.

If you control the hardware that CK is deployed to and don't
envision a migration to 48-bits anytime soon, then you may
enable old behavior (resulting in significant memory savings
for some data structures, namely ck_ht) by passing the
--enable-pointer-packing flag to configure.
ck_pring
Samy Al Bahra 13 years ago
parent 2b2e44203b
commit f38cc85ac9

52
configure vendored

@ -77,20 +77,21 @@ assert()
generate() generate()
{ {
sed -e "s#@PROFILE@#$PROFILE#g" \ sed -e "s#@PROFILE@#$PROFILE#g" \
-e "s#@VERSION@#$VERSION#g" \ -e "s#@VERSION@#$VERSION#g" \
-e "s#@VERSION_MAJOR@#$VERSION_MAJOR#g" \ -e "s#@VERSION_MAJOR@#$VERSION_MAJOR#g" \
-e "s#@CC@#$CC#g" \ -e "s#@CC@#$CC#g" \
-e "s#@CFLAGS@#$CFLAGS#g" \ -e "s#@CFLAGS@#$CFLAGS#g" \
-e "s#@HEADERS@#$HEADERS#g" \ -e "s#@HEADERS@#$HEADERS#g" \
-e "s#@LIBRARY@#$LIBRARY#g" \ -e "s#@LIBRARY@#$LIBRARY#g" \
-e "s#@PREFIX@#$PREFIX#g" \ -e "s#@PREFIX@#$PREFIX#g" \
-e "s#@LD@#$LD#g" \ -e "s#@LD@#$LD#g" \
-e "s#@LDFLAGS@#$LDFLAGS#g" \ -e "s#@LDFLAGS@#$LDFLAGS#g" \
-e "s#@PTHREAD_CFLAGS@#$PTHREAD_CFLAGS#g" \ -e "s#@PTHREAD_CFLAGS@#$PTHREAD_CFLAGS#g" \
-e "s#@MANDIR@#$MANDIR#g" \ -e "s#@MANDIR@#$MANDIR#g" \
-e "s#@GZIP@#$GZIP#g" \ -e "s#@GZIP@#$GZIP#g" \
-e "s#@GZIP_SUFFIX@#$GZIP_SUFFIX#g" \ -e "s#@GZIP_SUFFIX@#$GZIP_SUFFIX#g" \
-e "s#@POINTER_PACK_ENABLE@#$POINTER_PACK_ENABLE#g" \
$1 > $2 $1 > $2
} }
@ -106,6 +107,7 @@ generate_stdout()
echo " LD = $LD" echo " LD = $LD"
echo " LDFLAGS = $LDFLAGS" echo " LDFLAGS = $LDFLAGS"
echo " GZIP = $GZIP" echo " GZIP = $GZIP"
echo " POINTER_PACK = $POINTER_PACK_ENABLE"
echo echo
echo "Headers will be installed in $HEADERS" echo "Headers will be installed in $HEADERS"
echo "Libraries will be installed in $LIBRARY" echo "Libraries will be installed in $LIBRARY"
@ -120,13 +122,14 @@ for option in $*; do
echo "Usage: ./configure [OPTIONS]" echo "Usage: ./configure [OPTIONS]"
echo echo
echo "The following options may be used for cross-building." echo "The following options may be used for cross-building."
echo " --profile=N Use custom build profile (use in conjunction with \$CC)" echo " --profile=N Use custom build profile (use in conjunction with \$CC)"
echo echo
echo "The following options may be used to modify installation behavior." echo "The following options may be used to modify installation behavior."
echo " --includedir=N Headers directory (default is ${PREFIX}/include)" echo " --includedir=N Headers directory (default is ${PREFIX}/include)"
echo " --libdir=N Libraries directory (default is ${PREFIX}/lib)" echo " --libdir=N Libraries directory (default is ${PREFIX}/lib)"
echo " --mandir=N Manual pages directory (default is ${PREFIX}/man)" echo " --mandir=N Manual pages directory (default is ${PREFIX}/man)"
echo " --prefix=N Installs library files in N (default is $PREFIX)" echo " --prefix=N Installs library files in N (default is $PREFIX)"
echo " --enable-pointer-packing Assumes 48-bit address encoding"
echo echo
echo "The following environment variables may be used:" echo "The following environment variables may be used:"
echo " CC C compiler command" echo " CC C compiler command"
@ -137,6 +140,9 @@ for option in $*; do
echo "Report bugs to ${MAINTAINER}." echo "Report bugs to ${MAINTAINER}."
exit $EXIT_SUCCESS exit $EXIT_SUCCESS
;; ;;
--enable-pointer-packing)
POINTER_PACK_ENABLE="CK_MD_POINTER_PACK_ENABLE"
;;
--profile=*) --profile=*)
PROFILE=$value PROFILE=$value
;; ;;
@ -163,6 +169,7 @@ HEADERS=${HEADERS:-"${PREFIX}/include"}
LIBRARY=${LIBRARY:-"${PREFIX}/lib"} LIBRARY=${LIBRARY:-"${PREFIX}/lib"}
MANDIR=${MANDIR:-"${PREFIX}/share/man"} MANDIR=${MANDIR:-"${PREFIX}/share/man"}
GZIP=${GZIP:-"gzip -c"} GZIP=${GZIP:-"gzip -c"}
POINTER_PACK_ENABLE=${POINTER_PACK_ENABLE:-"CK_MD_POINTER_PACK_DISABLE"}
if test "$PROFILE"; then if test "$PROFILE"; then
printf "Using user-specified profile....." printf "Using user-specified profile....."
@ -178,6 +185,9 @@ if test "$PROFILE"; then
fi fi
echo "success [$PROFILE]" echo "success [$PROFILE]"
printf "Generating header files.........."
generate include/ck_md.h.in include/ck_md.h
echo "success"
printf "Generating build files..........." printf "Generating build files..........."
generate doc/Makefile.in doc/Makefile generate doc/Makefile.in doc/Makefile
generate build/ck.build.in build/ck.build generate build/ck.build.in build/ck.build
@ -418,6 +428,10 @@ EOF
fi fi
done done
printf "Generating header files.........."
generate include/ck_md.h.in include/ck_md.h
echo "success"
printf "Generating build files..........." printf "Generating build files..........."
generate doc/Makefile.in doc/Makefile generate doc/Makefile.in doc/Makefile

@ -35,4 +35,8 @@
#define CK_MD_PAGESIZE (4096) #define CK_MD_PAGESIZE (4096)
#endif #endif
#ifndef @POINTER_PACK_ENABLE@
#define @POINTER_PACK_ENABLE@
#endif
#endif /* _CK_MD_H */ #endif /* _CK_MD_H */
Loading…
Cancel
Save