s3: we have clock_gettime everywhere, remove ifdefs
[nivanova/samba-autobuild/.git] / source3 / profile / profile.c
index bdbd8057183b835abb14c2680bc12f83672f0e12..4a61753ea388e553011d19af8128bc97ac36d792 100644 (file)
@@ -20,6 +20,7 @@
 */
 
 #include "includes.h"
+#include "librpc/gen_ndr/messaging.h"
 
 #ifdef WITH_PROFILE
 #define IPC_PERMS ((S_IRUSR | S_IWUSR) | S_IRGRP | S_IROTH)
 #ifdef WITH_PROFILE
 static int shm_id;
 static bool read_only;
-#if defined(HAVE_CLOCK_GETTIME)
 clockid_t __profile_clock;
 bool have_profiling_clock = False;
 #endif
-#endif
 
 struct profile_header *profile_h;
 struct profile_stats *profile_p;
@@ -137,8 +136,6 @@ static void reqprofile_message(struct messaging_context *msg_ctx,
   open the profiling shared memory area
   ******************************************************************/
 
-#ifdef HAVE_CLOCK_GETTIME
-
 /* Find a clock. Just because the definition for a particular clock ID is
  * present doesn't mean the system actually supports it.
  */
@@ -194,7 +191,6 @@ static void init_clock_gettime(void)
                ("could not find a working clock for profiling"));
        return;
 }
-#endif
 
 bool profile_setup(struct messaging_context *msg_ctx, bool rdonly)
 {
@@ -202,9 +198,7 @@ bool profile_setup(struct messaging_context *msg_ctx, bool rdonly)
 
        read_only = rdonly;
 
-#ifdef HAVE_CLOCK_GETTIME
        init_clock_gettime();
-#endif
 
  again:
        /* try to use an existing key */
@@ -227,7 +221,7 @@ bool profile_setup(struct messaging_context *msg_ctx, bool rdonly)
        
        profile_h = (struct profile_header *)shmat(shm_id, 0, 
                                                   read_only?SHM_RDONLY:0);
-       if ((long)profile_p == -1) {
+       if ((long)profile_h == -1) {
                DEBUG(0,("Can't attach to IPC area. Error was %s\n", 
                         strerror(errno)));
                return False;
@@ -290,6 +284,7 @@ bool profile_setup(struct messaging_context *msg_ctx, bool rdonly)
            "syscall_rmdir",            /* PR_VALUE_SYSCALL_RMDIR */
            "syscall_closedir",         /* PR_VALUE_SYSCALL_CLOSEDIR */
            "syscall_open",             /* PR_VALUE_SYSCALL_OPEN */
+           "syscall_createfile",       /* PR_VALUE_SYSCALL_CREATEFILE */
            "syscall_close",            /* PR_VALUE_SYSCALL_CLOSE */
            "syscall_read",             /* PR_VALUE_SYSCALL_READ */
            "syscall_pread",            /* PR_VALUE_SYSCALL_PREAD */
@@ -299,6 +294,7 @@ bool profile_setup(struct messaging_context *msg_ctx, bool rdonly)
            "syscall_sendfile",         /* PR_VALUE_SYSCALL_SENDFILE */
            "syscall_recvfile",         /* PR_VALUE_SYSCALL_RECVFILE */
            "syscall_rename",           /* PR_VALUE_SYSCALL_RENAME */
+           "syscall_rename_at",        /* PR_VALUE_SYSCALL_RENAME_AT */
            "syscall_fsync",            /* PR_VALUE_SYSCALL_FSYNC */
            "syscall_stat",             /* PR_VALUE_SYSCALL_STAT */
            "syscall_fstat",            /* PR_VALUE_SYSCALL_FSTAT */
@@ -323,6 +319,11 @@ bool profile_setup(struct messaging_context *msg_ctx, bool rdonly)
            "syscall_realpath",         /* PR_VALUE_SYSCALL_REALPATH */
            "syscall_get_quota",        /* PR_VALUE_SYSCALL_GET_QUOTA */
            "syscall_set_quota",        /* PR_VALUE_SYSCALL_SET_QUOTA */
+           "syscall_get_sd",           /* PR_VALUE_SYSCALL_GET_SD */
+           "syscall_set_sd",           /* PR_VALUE_SYSCALL_SET_SD */
+           "syscall_brl_lock",         /* PR_VALUE_SYSCALL_BRL_LOCK */
+           "syscall_brl_unlock",       /* PR_VALUE_SYSCALL_BRL_UNLOCK */
+           "syscall_brl_cancel",       /* PR_VALUE_SYSCALL_BRL_CANCEL */
            "SMBmkdir",         /* PR_VALUE_SMBMKDIR */
            "SMBrmdir",         /* PR_VALUE_SMBRMDIR */
            "SMBopen",          /* PR_VALUE_SMBOPEN */
@@ -447,6 +448,25 @@ bool profile_setup(struct messaging_context *msg_ctx, bool rdonly)
            "sync_browse_lists",        /* PR_VALUE_SYNC_BROWSE_LISTS */
            "run_elections",            /* PR_VALUE_RUN_ELECTIONS */
            "election",                 /* PR_VALUE_ELECTION */
+           "smb2_negprot",             /* PR_VALUE_SMB2_NEGPROT */
+           "smb2_sesssetup",           /* PR_VALUE_SMB2_SESSETUP */
+           "smb2_logoff",              /* PR_VALUE_SMB2_LOGOFF */
+           "smb2_tcon",                /* PR_VALUE_SMB2_TCON */
+           "smb2_tdis",                /* PR_VALUE_SMB2_TDIS */
+           "smb2_create",              /* PR_VALUE_SMB2_CREATE */
+           "smb2_close",               /* PR_VALUE_SMB2_CLOSE */
+           "smb2_flush",               /* PR_VALUE_SMB2_FLUSH */
+           "smb2_read",                /* PR_VALUE_SMB2_READ */
+           "smb2_write",               /* PR_VALUE_SMB2_WRITE */
+           "smb2_lock",                /* PR_VALUE_SMB2_LOCK */
+           "smb2_ioctl",               /* PR_VALUE_SMB2_IOCTL */
+           "smb2_cancel",              /* PR_VALUE_SMB2_CANCEL */
+           "smb2_keepalive",           /* PR_VALUE_SMB2_KEEPALIVE */
+           "smb2_find",                /* PR_VALUE_SMB2_FIND */
+           "smb2_notify",              /* PR_VALUE_SMB2_NOTIFY */
+           "smb2_getinfo",             /* PR_VALUE_SMB2_GETINFO */
+           "smb2_setinfo"              /* PR_VALUE_SMB2_SETINFO */
+           "smb2_break",               /* PR_VALUE_SMB2_BREAK */
            "" /* PR_VALUE_MAX */
        };