winlin

refine the profiler

@@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 set the pprof path if not set: 24 set the pprof path if not set:
25 export PPROF_PATH=`pwd`/../../../objs/pprof 25 export PPROF_PATH=`pwd`/../../../objs/pprof
26 to do mem profile: 26 to do mem profile:
27 - make && rm -f srs.*.heap && env ./heap_profiler 27 + make && rm -f srs.*.heap && env HEAPPROFILE=./srs ./heap_profiler
28 $PPROF_PATH --text heap_profiler ./*.heap 28 $PPROF_PATH --text heap_profiler ./*.heap
29 */ 29 */
30 #include <stdio.h> 30 #include <stdio.h>
@@ -56,7 +56,7 @@ int main(int argc, char** argv) { @@ -56,7 +56,7 @@ int main(int argc, char** argv) {
56 signal(SIGINT, handler); 56 signal(SIGINT, handler);
57 57
58 // must start profiler manually. 58 // must start profiler manually.
59 - HeapProfilerStart("srs"); 59 + HeapProfilerStart(NULL);
60 60
61 memory_alloc_profile(); 61 memory_alloc_profile();
62 // not neccessary to call stop. 62 // not neccessary to call stop.