From 3ca2d4dab306df85756012aacbce8bb2a5527301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Wed, 13 May 2009 12:36:37 +0000 Subject: [PATCH] * src/ejabberd_debug.erl: Handled fprof based profiling (EJABS-872). * src/ejabberd_app.erl: Likewise. SVN Revision: 2075 --- src/ejabberd_app.erl | 2 +- src/ejabberd_debug.erl | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ejabberd_app.erl b/src/ejabberd_app.erl index d20e6cd99..7ea43fc2c 100644 --- a/src/ejabberd_app.erl +++ b/src/ejabberd_app.erl @@ -61,7 +61,7 @@ start(normal, _Args) -> cyrsasl:start(), % Profiling %ejabberd_debug:eprof_start(), - %fprof:trace([start, {file, "/tmp/fprof"}, {procs, ejabberd_debug:pids()}]), + %ejabberd_debug:fprof_start(), maybe_add_nameservers(), start_modules(), ejabberd_listener:start_listeners(), diff --git a/src/ejabberd_debug.erl b/src/ejabberd_debug.erl index 62641d6f5..f2152d851 100644 --- a/src/ejabberd_debug.erl +++ b/src/ejabberd_debug.erl @@ -26,16 +26,20 @@ -module(ejabberd_debug). --export([eprof_start/0, stop/0]). +-export([eprof_start/0, fprof_start/0, stop/0]). -export([pids/0]). eprof_start() -> eprof:start(), eprof:profile(pids()). +fprof_start() -> + fprof:trace([start, {file, "/tmp/fprof"}, {procs, pids()}]). + %% Stop all profilers stop() -> catch eprof:stop(), + catch fprof:stop(), ok. pids() ->