From: Vsevolod Stakhov Date: Mon, 6 Apr 2015 14:06:03 +0000 (+0100) Subject: Save profile for the main process. X-Git-Tag: 0.9.0~325 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=489ec47bd8b9c5f34e506e78e392a0bc689ab2b5;p=thirdparty%2Frspamd.git Save profile for the main process. --- diff --git a/src/main.c b/src/main.c index 2d6216b1fd..505b52343c 100644 --- a/src/main.c +++ b/src/main.c @@ -1322,6 +1322,8 @@ main (gint argc, gchar **argv, gchar **env) return res ? EXIT_SUCCESS : EXIT_FAILURE; } + gperf_profiler_init (rspamd_main->cfg, "main"); + msg_info ("rspamd " RVERSION " is starting, build id: " RID); rspamd_main->cfg->cfg_name = rspamd_mempool_strdup ( rspamd_main->cfg->cfg_pool, @@ -1391,6 +1393,9 @@ main (gint argc, gchar **argv, gchar **env) rspamd_main->cfg->history_file); } +#if defined(WITH_GPERF_TOOLS) + ProfilerStop (); +#endif /* Spawn workers */ rspamd_main->workers = g_hash_table_new (g_direct_hash, g_direct_equal); spawn_workers (rspamd_main);