mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
* src/ejabberd_debug.erl: Handled fprof based profiling (EJABS-872).
* src/ejabberd_app.erl: Likewise. SVN Revision: 2075
This commit is contained in:
parent
c12b1870b7
commit
3ca2d4dab3
@ -61,7 +61,7 @@ start(normal, _Args) ->
|
|||||||
cyrsasl:start(),
|
cyrsasl:start(),
|
||||||
% Profiling
|
% Profiling
|
||||||
%ejabberd_debug:eprof_start(),
|
%ejabberd_debug:eprof_start(),
|
||||||
%fprof:trace([start, {file, "/tmp/fprof"}, {procs, ejabberd_debug:pids()}]),
|
%ejabberd_debug:fprof_start(),
|
||||||
maybe_add_nameservers(),
|
maybe_add_nameservers(),
|
||||||
start_modules(),
|
start_modules(),
|
||||||
ejabberd_listener:start_listeners(),
|
ejabberd_listener:start_listeners(),
|
||||||
|
@ -26,16 +26,20 @@
|
|||||||
|
|
||||||
-module(ejabberd_debug).
|
-module(ejabberd_debug).
|
||||||
|
|
||||||
-export([eprof_start/0, stop/0]).
|
-export([eprof_start/0, fprof_start/0, stop/0]).
|
||||||
-export([pids/0]).
|
-export([pids/0]).
|
||||||
|
|
||||||
eprof_start() ->
|
eprof_start() ->
|
||||||
eprof:start(),
|
eprof:start(),
|
||||||
eprof:profile(pids()).
|
eprof:profile(pids()).
|
||||||
|
|
||||||
|
fprof_start() ->
|
||||||
|
fprof:trace([start, {file, "/tmp/fprof"}, {procs, pids()}]).
|
||||||
|
|
||||||
%% Stop all profilers
|
%% Stop all profilers
|
||||||
stop() ->
|
stop() ->
|
||||||
catch eprof:stop(),
|
catch eprof:stop(),
|
||||||
|
catch fprof:stop(),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
pids() ->
|
pids() ->
|
||||||
|
Loading…
Reference in New Issue
Block a user