diff options
author | Andrew Tridgell <tridge@samba.org> | 1999-04-01 05:22:58 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1999-04-01 05:22:58 +0000 |
commit | ef3d61a80ad0b87c196a63ef2bd4fe8fc3863bd0 (patch) | |
tree | 498b412b5423f0585e9977fd1935f4d7c1d0a0fb /source/smbd/server.c | |
parent | dfcfeb743a7667c9dedf3d2b04587c497af12893 (diff) | |
download | samba-ef3d61a80ad0b87c196a63ef2bd4fe8fc3863bd0.tar.gz samba-ef3d61a80ad0b87c196a63ef2bd4fe8fc3863bd0.tar.xz samba-ef3d61a80ad0b87c196a63ef2bd4fe8fc3863bd0.zip |
Ken McDonell from SGI was interested in adding some profiling
capabilities to Samba so that Samba could talk to the SGI PCP
(Performance Co-Pilot) apps.
This change adds a profiling shared memory area and uses it to count
two fairly trivial things, the number of uid switches and the number
of SMB packets processes. To add more just edit include/profile.h and
then increment it at the right place.
I've also added a -P switch to smbstatus to dump the profile area.
Diffstat (limited to 'source/smbd/server.c')
-rw-r--r-- | source/smbd/server.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/smbd/server.c b/source/smbd/server.c index 9b397bcdeb7..dcc53cb8d0c 100644 --- a/source/smbd/server.c +++ b/source/smbd/server.c @@ -618,7 +618,14 @@ static void usage(char *pname) return(-1); init_structs(); - + +#ifdef WITH_PROFILE + if (!profile_setup(False)) { + DEBUG(0,("ERROR: failed to setup profiling\n")); + return -1; + } +#endif + /* * Set the machine NETBIOS name if not already * set from the config file. |