summaryrefslogtreecommitdiffstats
path: root/source/smbd/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/smbd/server.c')
-rw-r--r--source/smbd/server.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/smbd/server.c b/source/smbd/server.c
index ab32d656d38..99fe2348b11 100644
--- a/source/smbd/server.c
+++ b/source/smbd/server.c
@@ -833,6 +833,7 @@ extern void build_options(BOOL screen);
static BOOL no_process_group = False;
static BOOL log_stdout = False;
static char *ports = NULL;
+ static char *profile_level = NULL;
int opt;
poptContext pc;
@@ -845,6 +846,7 @@ extern void build_options(BOOL screen);
{"log-stdout", 'S', POPT_ARG_VAL, &log_stdout, True, "Log to stdout" },
{"build-options", 'b', POPT_ARG_NONE, NULL, 'b', "Print build options" },
{"port", 'p', POPT_ARG_STRING, &ports, 0, "Listen on the specified ports"},
+ {"profiling-level", 'P', POPT_ARG_STRING, &profile_level, 0, "Set profiling level","PROFILE_LEVEL"},
POPT_COMMON_SAMBA
POPT_COMMON_DYNCONFIG
POPT_TABLEEND
@@ -967,6 +969,14 @@ extern void build_options(BOOL screen);
DEBUG(0,("ERROR: failed to setup profiling\n"));
return -1;
}
+ if (profile_level != NULL) {
+ int pl = atoi(profile_level);
+ struct process_id src;
+
+ DEBUG(1, ("setting profiling level: %s\n",profile_level));
+ src.pid = getpid();
+ set_profile_level(pl, src);
+ }
#endif
DEBUG(3,( "loaded services\n"));