Repository: trafficserver Updated Branches: refs/heads/master 1480e3299 -> 655f3abb6
TS-3879: Update headers for Google Profiler and add support for the heap profiler Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/655f3abb Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/655f3abb Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/655f3abb Branch: refs/heads/master Commit: 655f3abb63b250ad14b8915b3daa373e772fa2eb Parents: 1480e32 Author: Bryan Call <[email protected]> Authored: Tue Sep 1 10:48:31 2015 -0700 Committer: Bryan Call <[email protected]> Committed: Tue Sep 1 10:48:31 2015 -0700 ---------------------------------------------------------------------- proxy/Main.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/655f3abb/proxy/Main.cc ---------------------------------------------------------------------- diff --git a/proxy/Main.cc b/proxy/Main.cc index c517af3..1ed6c54 100644 --- a/proxy/Main.cc +++ b/proxy/Main.cc @@ -97,7 +97,8 @@ extern "C" int plock(int); #include <ts/ink_cap.h> #if TS_HAS_PROFILER -#include <google/profiler.h> +#include <gperftools/profiler.h> +#include <gperftools/heap-profiler.h> #endif // @@ -335,6 +336,8 @@ proxy_signal_handler(int signo, siginfo_t *info, void *) signal_format_siginfo(signo, info, appVersionInfo.AppStr); #if TS_HAS_PROFILER + HeapProfilerDump("/tmp/ts_end.hprof"); + HeapProfilerStop(); ProfilerStop(); #endif @@ -1375,6 +1378,7 @@ int main(int /* argc ATS_UNUSED */, const char **argv) { #if TS_HAS_PROFILER + HeapProfilerStart("/tmp/ts.hprof"); ProfilerStart("/tmp/ts.prof"); #endif bool admin_user_p = false;
