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 | d330c907bdc5d8e3c242cea76dfafaae84041270 (patch) | |
tree | d5a1381ca1adbe412bdb25084632ffc6b053f2c1 /source3/include/includes.h | |
parent | a8aff598f42a7479a2c43cbd04064cbbcf150599 (diff) | |
download | samba-d330c907bdc5d8e3c242cea76dfafaae84041270.tar.gz samba-d330c907bdc5d8e3c242cea76dfafaae84041270.tar.xz samba-d330c907bdc5d8e3c242cea76dfafaae84041270.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.
(This used to be commit ef3d61a80ad0b87c196a63ef2bd4fe8fc3863bd0)
Diffstat (limited to 'source3/include/includes.h')
-rw-r--r-- | source3/include/includes.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h index 0d2561f6bc..b880689600 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -46,16 +46,12 @@ #endif -/* if we have both SYSV IPC and shared mmap then we need to choose. For most - systems it is much faster to use SYSV IPC, but under Linux it is - about 5 times faster to use fcntl, so for Linux systems we force - fcntl based locking */ +/* if we have both SYSV IPC and shared mmap then we need to + choose. For most systems it is much faster to use SYSV IPC. We used + to make an exception for Linux, but now Linux 2.2 has made it + better to use sysv if possible */ #if (defined(HAVE_SYSV_IPC) && defined(HAVE_SHARED_MMAP)) -# ifdef LINUX -# undef HAVE_SYSV_IPC -# else # undef HAVE_SHARED_MMAP -# endif #endif @@ -572,6 +568,10 @@ extern int errno; #include "nterr.h" +#ifdef WITH_PROFILE +#include "profile.h" +#endif + #ifndef MAXCODEPAGELINES #define MAXCODEPAGELINES 256 #endif @@ -705,6 +705,14 @@ union semun { #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR) #endif +#ifndef SHM_R +#define SHM_R (0400) +#endif + +#ifndef SHM_W +#define SHM_W (0200) +#endif + #if defined(HAVE_CRYPT16) && defined(HAVE_GETAUTHUID) #define ULTRIX_AUTH 1 #endif |