Merge lp:~ignacio-nin/percona-server/5.5-jemalloc into lp:percona-server/5.5

Proposed by Ignacio Nin
Status: Merged
Approved by: Vadim Tkachenko
Approved revision: 451
Merged at revision: 477
Proposed branch: lp:~ignacio-nin/percona-server/5.5-jemalloc
Merge into: lp:percona-server/5.5
Diff against target: 77 lines (+38/-1)
1 file modified
build/build-binary.sh (+38/-1)
To merge this branch: bzr merge lp:~ignacio-nin/percona-server/5.5-jemalloc
Reviewer Review Type Date Requested Status
Vadim Tkachenko Approve
Review via email: mp+149661@code.launchpad.net

Description of the change

Include a --with-jemalloc option in the binary builder so it includes libjemalloc.so.1 when specified. --with-jemalloc should point to the directory with the source.

To post a comment you must log in.
Vadim Tkachenko (vadim-tk) wrote :

ok to include as an option

review: Approve

Why this has been merged without a 5.6 MP?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'build/build-binary.sh'
2--- build/build-binary.sh 2013-02-06 10:45:19 +0000
3+++ build/build-binary.sh 2013-02-20 18:59:47 +0000
4@@ -18,6 +18,7 @@
5 QUIET='VERBOSE=1'
6 CMAKE_BUILD_TYPE='RelWithDebInfo'
7 DEBUG_COMMENT=''
8+WITH_JEMALLOC=''
9
10 # Some programs that may be overriden
11 TAR=${TAR:-tar}
12@@ -25,7 +26,8 @@
13 # Check if we have a functional getopt(1)
14 if ! getopt --test
15 then
16- go_out="$(getopt --options="iqdv" --longoptions=i686,quiet,debug,valgrind \
17+ go_out="$(getopt --options=iqdvj: \
18+ --longoptions=i686,quiet,debug,valgrind,with-jemalloc: \
19 --name="$(basename "$0")" -- "$@")"
20 test $? -eq 0 || exit 1
21 eval set -- $go_out
22@@ -54,6 +56,11 @@
23 shift
24 QUIET=''
25 ;;
26+ -j | --with-jemalloc )
27+ shift
28+ WITH_JEMALLOC="$1"
29+ shift
30+ ;;
31 esac
32 done
33
34@@ -117,6 +124,19 @@
35 INSTALLDIR="$(cd "$WORKDIR" && TMPDIR="$WORKDIR_ABS" mktemp -d percona-build.XXXXXX)"
36 INSTALLDIR="$WORKDIR_ABS/$INSTALLDIR" # Make it absolute
37
38+# Test jemalloc directory
39+if test "x$WITH_JEMALLOC" != "x"
40+then
41+ if ! test -d "$WITH_JEMALLOC"
42+ then
43+ echo >&2 "Jemalloc dir $WITH_JEMALLOC does not exist"
44+ exit 1
45+ fi
46+
47+ JEMALLOCDIR="$(cd "$WITH_JEMALLOC"; pwd)"
48+
49+fi
50+
51 # Build
52 (
53 cd "$SOURCEDIR"
54@@ -162,6 +182,23 @@
55
56 )
57
58+ # Build jemalloc
59+ if test "x$WITH_JEMALLOC" != x
60+ then
61+ (
62+ cd "$JEMALLOCDIR"
63+
64+ ./configure --prefix="/usr/local/$PRODUCT_FULL/" \
65+ --libdir="/usr/local/$PRODUCT_FULL/lib/mysql/"
66+ make
67+ make DESTDIR="$INSTALLDIR" install_lib_shared
68+
69+ # Copy COPYING file
70+ cp COPYING "$INSTALLDIR/usr/local/$PRODUCT_FULL/COPYING-jemalloc"
71+
72+ )
73+ fi
74+
75 )
76
77 # Package the archive

Subscribers

People subscribed via source and target branches