mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
build gperftools
This commit is contained in:
parent
34e913c58f
commit
0b17b2a481
4 changed files with 36 additions and 0 deletions
1
trunk/3rdparty/readme.txt
vendored
1
trunk/3rdparty/readme.txt
vendored
|
@ -33,6 +33,7 @@ gtest-1.6.0.zip
|
|||
|
||||
gperftools-2.1.zip
|
||||
google性能分析和测试工具。
|
||||
编译和使用参考压缩文件中的README和doc目录。
|
||||
|
||||
links:
|
||||
ffmpeg:
|
||||
|
|
|
@ -427,3 +427,23 @@ if [ $SRS_UTEST = YES ]; then
|
|||
ret=$?; if [[ $ret -ne 0 ]]; then echo "build gtest-1.6.0 failed, ret=$ret"; exit $ret; fi
|
||||
if [ ! -f ${SRS_OBJS}/gtest/include/gtest/gtest.h ]; then echo "build gtest-1.6.0 failed."; exit -1; fi
|
||||
fi
|
||||
|
||||
#####################################################################################
|
||||
# build gperf code
|
||||
#####################################################################################
|
||||
if [ $SRS_GPERF = YES ]; then
|
||||
if [[ -f ${SRS_OBJS}/gperf/bin/pprof ]]; then
|
||||
echo "gperftools-2.1 is ok.";
|
||||
else
|
||||
echo "build gperftools-2.1";
|
||||
(
|
||||
rm -rf ${SRS_OBJS}/gperftools-2.1 && cd ${SRS_OBJS} &&
|
||||
unzip -q ../3rdparty/gperftools-2.1.zip && cd gperftools-2.1 &&
|
||||
./configure --prefix=`pwd`/_release --enable-frame-pointers && make ${SRS_JOBS} && make install &&
|
||||
cd .. && rm -f gperf && ln -sf gperftools-2.1/_release gperf
|
||||
)
|
||||
fi
|
||||
# check status
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "build gperftools-2.1 failed, ret=$ret"; exit $ret; fi
|
||||
if [ ! -f ${SRS_OBJS}/gperf/bin/pprof ]; then echo "build gperftools-2.1 failed."; exit -1; fi
|
||||
fi
|
||||
|
|
|
@ -17,6 +17,7 @@ SRS_FFMPEG=RESERVED
|
|||
SRS_HTTP=RESERVED
|
||||
SRS_RESEARCH=RESERVED
|
||||
SRS_UTEST=RESERVED
|
||||
SRS_GPERF=RESERVED
|
||||
# arguments
|
||||
SRS_JOBS=1
|
||||
|
||||
|
@ -27,6 +28,7 @@ SRS_FFMPEG=YES
|
|||
SRS_HTTP=YES
|
||||
SRS_RESEARCH=NO
|
||||
SRS_UTEST=YES
|
||||
SRS_GPERF=YES
|
||||
|
||||
#####################################################################################
|
||||
# parse options
|
||||
|
@ -54,6 +56,7 @@ do
|
|||
--with-http) SRS_HTTP=YES ;;
|
||||
--with-research) SRS_RESEARCH=YES ;;
|
||||
--with-utest) SRS_UTEST=YES ;;
|
||||
--with-gperf) SRS_GPERF=YES ;;
|
||||
|
||||
--without-ssl) SRS_SSL=NO ;;
|
||||
--without-hls) SRS_HLS=NO ;;
|
||||
|
@ -61,6 +64,7 @@ do
|
|||
--without-http) SRS_HTTP=NO ;;
|
||||
--without-research) SRS_RESEARCH=NO ;;
|
||||
--without-utest) SRS_UTEST=NO ;;
|
||||
--without-gperf) SRS_GPERF=NO ;;
|
||||
|
||||
--jobs) SRS_JOBS=${value} ;;
|
||||
|
||||
|
@ -97,6 +101,7 @@ if [ $help = yes ]; then
|
|||
--with-ffmpeg enable transcoding with ffmpeg.
|
||||
--with-research build the research tools.
|
||||
--with-utest build the utest for srs.
|
||||
--with-gperf build srs with gperf tools.
|
||||
|
||||
--without-ssl disable rtmp complex handshake.
|
||||
--without-hls disable hls, rtmp streaming only.
|
||||
|
@ -104,6 +109,7 @@ if [ $help = yes ]; then
|
|||
--without-ffmpeg disable the ffmpeg transcoding feature.
|
||||
--without-research do not build the research tools.
|
||||
--without-utest do not build the utest for srs.
|
||||
--without-gperf do not build srs with gperf tools.
|
||||
|
||||
--jobs[=N] Allow N jobs at once; infinite jobs with no arg.
|
||||
used for make in the configure, for example, to make ffmpeg.
|
||||
|
@ -140,6 +146,10 @@ if [ $SRS_UTEST = RESERVED ]; then
|
|||
echo "you must specifies the utest, see: ./configure --help";
|
||||
__check_ok=NO
|
||||
fi
|
||||
if [ $SRS_GPERF = RESERVED ]; then
|
||||
echo "you must specifies the gperf, see: ./configure --help";
|
||||
__check_ok=NO
|
||||
fi
|
||||
if [ $__check_ok = NO ]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
|
5
trunk/configure
vendored
5
trunk/configure
vendored
|
@ -311,6 +311,11 @@ if [ $SRS_UTEST = YES ]; then
|
|||
else
|
||||
echo -e "${YELLOW}note: utest for srs are not builded${BLACK}"
|
||||
fi
|
||||
if [ $SRS_GPERF = YES ]; then
|
||||
echo -e "${GREEN}gperf(mem leak detect, mem/cpu perf) for srs are builded${BLACK}"
|
||||
else
|
||||
echo -e "${YELLOW}note: gperf(mem leak detect, mem/cpu perf) for srs are not builded${BLACK}"
|
||||
fi
|
||||
|
||||
#####################################################################################
|
||||
# next step
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue