正在显示
2 个修改的文件
包含
7 行增加
和
2 行删除
@@ -37,11 +37,11 @@ echo -e "\${GREEN}build summary:\${BLACK}" | @@ -37,11 +37,11 @@ echo -e "\${GREEN}build summary:\${BLACK}" | ||
37 | echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}" | 37 | echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}" |
38 | echo -e " |${SrsGperfSummaryColor}gperf @see: https://github.com/simple-rtmp-server/srs/wiki/v1_CN_GPERF\${BLACK}" | 38 | echo -e " |${SrsGperfSummaryColor}gperf @see: https://github.com/simple-rtmp-server/srs/wiki/v1_CN_GPERF\${BLACK}" |
39 | echo -e " | ${SrsGperfMCSummaryColor}gmc @see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html\${BLACK}" | 39 | echo -e " | ${SrsGperfMCSummaryColor}gmc @see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html\${BLACK}" |
40 | -echo -e " | ${SrsGperfMCSummaryColor}gmc: gperf memory check\${BLACK}" | 40 | +echo -e " | ${SrsGperfMCSummaryColor}gmc: gperf memory check, or memory leak detect\${BLACK}" |
41 | echo -e " | ${SrsGperfMCSummaryColor}env PPROF_PATH=./objs/pprof HEAPCHECK=normal ./objs/srs -c conf/console.conf # start gmc\${BLACK}" | 41 | echo -e " | ${SrsGperfMCSummaryColor}env PPROF_PATH=./objs/pprof HEAPCHECK=normal ./objs/srs -c conf/console.conf # start gmc\${BLACK}" |
42 | echo -e " | ${SrsGperfMCSummaryColor}killall -2 srs # or CTRL+C to stop gmc\${BLACK}" | 42 | echo -e " | ${SrsGperfMCSummaryColor}killall -2 srs # or CTRL+C to stop gmc\${BLACK}" |
43 | echo -e " | ${SrsGperfMPSummaryColor}gmp @see: http://google-perftools.googlecode.com/svn/trunk/doc/heapprofile.html\${BLACK}" | 43 | echo -e " | ${SrsGperfMPSummaryColor}gmp @see: http://google-perftools.googlecode.com/svn/trunk/doc/heapprofile.html\${BLACK}" |
44 | -echo -e " | ${SrsGperfMPSummaryColor}gmp: gperf memory profile\${BLACK}" | 44 | +echo -e " | ${SrsGperfMPSummaryColor}gmp: gperf memory profile, similar to gcp\${BLACK}" |
45 | echo -e " | ${SrsGperfMPSummaryColor}rm -f gperf.srs.gmp*; ./objs/srs -c conf/console.conf # start gmp\${BLACK}" | 45 | echo -e " | ${SrsGperfMPSummaryColor}rm -f gperf.srs.gmp*; ./objs/srs -c conf/console.conf # start gmp\${BLACK}" |
46 | echo -e " | ${SrsGperfMPSummaryColor}killall -2 srs # or CTRL+C to stop gmp\${BLACK}" | 46 | echo -e " | ${SrsGperfMPSummaryColor}killall -2 srs # or CTRL+C to stop gmp\${BLACK}" |
47 | echo -e " | ${SrsGperfMPSummaryColor}./objs/pprof --text objs/srs gperf.srs.gmp* # to analysis memory profile\${BLACK}" | 47 | echo -e " | ${SrsGperfMPSummaryColor}./objs/pprof --text objs/srs gperf.srs.gmp* # to analysis memory profile\${BLACK}" |
@@ -254,6 +254,11 @@ int main(int argc, char** argv) | @@ -254,6 +254,11 @@ int main(int argc, char** argv) | ||
254 | "it is not possible to run both the heap-checker and heap profiler at the same time"); | 254 | "it is not possible to run both the heap-checker and heap profiler at the same time"); |
255 | #endif | 255 | #endif |
256 | 256 | ||
257 | + // never use gmp to check memory leak. | ||
258 | +#ifdef SRS_AUTO_GPERF_MP | ||
259 | + #warning "gmp is not used for memory leak, please use gmc instead." | ||
260 | +#endif | ||
261 | + | ||
257 | // never use srs log(srs_trace, srs_error, etc) before config parse the option, | 262 | // never use srs log(srs_trace, srs_error, etc) before config parse the option, |
258 | // which will load the log config and apply it. | 263 | // which will load the log config and apply it. |
259 | if ((ret = _srs_config->parse_options(argc, argv)) != ERROR_SUCCESS) { | 264 | if ((ret = _srs_config->parse_options(argc, argv)) != ERROR_SUCCESS) { |
-
请 注册 或 登录 后发表评论