mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
add gperf to heap check, use reload signal to terminate program normally
This commit is contained in:
parent
03a14e2e1a
commit
dcd568a0d7
6 changed files with 55 additions and 11 deletions
2
trunk/research/gperftools/cpu-profiler/Makefile
Executable file → Normal file
2
trunk/research/gperftools/cpu-profiler/Makefile
Executable file → Normal file
|
@ -7,4 +7,4 @@ cpu_profiler: cpu_profiler.cc Makefile
|
|||
-fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free \
|
||||
-I../../../objs/gperf/include ../../../objs/gperf/lib/libtcmalloc_and_profiler.a -lpthread
|
||||
clean:
|
||||
rm -f cpu_profiler ./srs.conf*
|
||||
rm -f cpu_profiler ./srs.prof*
|
||||
|
|
|
@ -26,11 +26,11 @@ config srs with gperf(to make gperftools):
|
|||
set the pprof path if not set:
|
||||
export PPROF_PATH=`pwd`/../../../objs/pprof
|
||||
to do cpu profile:
|
||||
make && rm -f ./srs.conf* && env CPUPROFILE=./srs.conf ./cpu_profiler
|
||||
$PPROF_PATH --text cpu_profiler ./srs.conf*
|
||||
make && rm -f ./srs.prof* && env CPUPROFILE=./srs.prof ./cpu_profiler
|
||||
$PPROF_PATH --text cpu_profiler ./srs.prof*
|
||||
to do cpu profile by signal:
|
||||
make && rm -f ./srs.conf* && env CPUPROFILE=./srs.conf CPUPROFILESIGNAL=12 ./cpu_profiler
|
||||
$PPROF_PATH --text cpu_profiler ./srs.conf*
|
||||
make && rm -f ./srs.prof* && env CPUPROFILE=./srs.prof CPUPROFILESIGNAL=12 ./cpu_profiler
|
||||
$PPROF_PATH --text cpu_profiler ./srs.prof*
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue