25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

* src/ejabberd_debug.erl: Handled fprof based profiling (EJABS-872).

* src/ejabberd_app.erl: Likewise.

SVN Revision: 2070
This commit is contained in:
Mickaël Rémond 2009-05-11 16:48:56 +00:00
parent 7e370d0201
commit 077b9cd4db
2 changed files with 6 additions and 2 deletions

View File

@ -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(),

View File

@ -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() ->