Merge branch 'master' of git://git.samba.org/samba into teventfix
[samba.git] / source3 / include / smbprofile.h
index c89815598b4520c3319638b61529801f2a016025..f9a0436546fa52355b43b427d529cec215114750 100644 (file)
@@ -75,6 +75,10 @@ enum profile_stats_values
 #define syscall_open_count __profile_stats_value(PR_VALUE_SYSCALL_OPEN, count)
 #define syscall_open_time __profile_stats_value(PR_VALUE_SYSCALL_OPEN, time)
 
+       PR_VALUE_SYSCALL_CREATEFILE,
+#define syscall_createfile_count __profile_stats_value(PR_VALUE_SYSCALL_CREATEFILE, count)
+#define syscall_createfile_time __profile_stats_value(PR_VALUE_SYSCALL_CREATEFILE, time)
+
        PR_VALUE_SYSCALL_CLOSE,
 #define syscall_close_count __profile_stats_value(PR_VALUE_SYSCALL_CLOSE, count)
 #define syscall_close_time __profile_stats_value(PR_VALUE_SYSCALL_CLOSE, time)
@@ -103,10 +107,18 @@ enum profile_stats_values
 #define syscall_sendfile_count __profile_stats_value(PR_VALUE_SYSCALL_SENDFILE, count)
 #define syscall_sendfile_time __profile_stats_value(PR_VALUE_SYSCALL_SENDFILE, time)
 
+       PR_VALUE_SYSCALL_RECVFILE,
+#define syscall_recvfile_count __profile_stats_value(PR_VALUE_SYSCALL_RECVFILE, count)
+#define syscall_recvfile_time __profile_stats_value(PR_VALUE_SYSCALL_RECVFILE, time)
+
        PR_VALUE_SYSCALL_RENAME,
 #define syscall_rename_count __profile_stats_value(PR_VALUE_SYSCALL_RENAME, count)
 #define syscall_rename_time __profile_stats_value(PR_VALUE_SYSCALL_RENAME, time)
 
+       PR_VALUE_SYSCALL_RENAME_AT,
+#define syscall_rename_at_count __profile_stats_value(PR_VALUE_SYSCALL_RENAME_AT, count)
+#define syscall_rename_at_time __profile_stats_value(PR_VALUE_SYSCALL_RENAME_AT, time)
+
        PR_VALUE_SYSCALL_FSYNC,
 #define syscall_fsync_count __profile_stats_value(PR_VALUE_SYSCALL_FSYNC, count)
 #define syscall_fsync_time __profile_stats_value(PR_VALUE_SYSCALL_FSYNC, time)
@@ -123,6 +135,10 @@ enum profile_stats_values
 #define syscall_lstat_count __profile_stats_value(PR_VALUE_SYSCALL_LSTAT, count)
 #define syscall_lstat_time __profile_stats_value(PR_VALUE_SYSCALL_LSTAT, time)
 
+       PR_VALUE_SYSCALL_GET_ALLOC_SIZE,
+#define syscall_get_alloc_size_count __profile_stats_value(PR_VALUE_SYSCALL_GET_ALLOC_SIZE, count)
+#define syscall_get_alloc_size_time __profile_stats_value(PR_VALUE_SYSCALL_GET_ALLOC_SIZE, time)
+
        PR_VALUE_SYSCALL_UNLINK,
 #define syscall_unlink_count __profile_stats_value(PR_VALUE_SYSCALL_UNLINK, count)
 #define syscall_unlink_time __profile_stats_value(PR_VALUE_SYSCALL_UNLINK, time)
@@ -207,6 +223,26 @@ enum profile_stats_values
 #define syscall_set_quota_count __profile_stats_value(PR_VALUE_SYSCALL_SET_QUOTA, count)
 #define syscall_set_quota_time __profile_stats_value(PR_VALUE_SYSCALL_SET_QUOTA, time)
 
+       PR_VALUE_SYSCALL_GET_SD,
+#define syscall_get_sd_count __profile_stats_value(PR_VALUE_SYSCALL_GET_SD, count)
+#define syscall_get_sd_time __profile_stats_value(PR_VALUE_SYSCALL_GET_SD, time)
+
+       PR_VALUE_SYSCALL_SET_SD,
+#define syscall_set_sd_count __profile_stats_value(PR_VALUE_SYSCALL_SET_SD, count)
+#define syscall_set_sd_time __profile_stats_value(PR_VALUE_SYSCALL_SET_SD, time)
+
+       PR_VALUE_SYSCALL_BRL_LOCK,
+#define syscall_brl_lock_count __profile_stats_value(PR_VALUE_SYSCALL_BRL_LOCK, count)
+#define syscall_brl_lock_time __profile_stats_value(PR_VALUE_SYSCALL_BRL_LOCK, time)
+
+       PR_VALUE_SYSCALL_BRL_UNLOCK,
+#define syscall_brl_unlock_count __profile_stats_value(PR_VALUE_SYSCALL_BRL_UNLOCK, count)
+#define syscall_brl_unlock_time __profile_stats_value(PR_VALUE_SYSCALL_BRL_UNLOCK, time)
+
+       PR_VALUE_SYSCALL_BRL_CANCEL,
+#define syscall_brl_cancel_count __profile_stats_value(PR_VALUE_SYSCALL_BRL_CANCEL, count)
+#define syscall_brl_cancel_time __profile_stats_value(PR_VALUE_SYSCALL_BRL_CANCEL, time)
+
 /* counters for individual SMB types */
        PR_VALUE_SMBMKDIR,
 #define SMBmkdir_count __profile_stats_value(PR_VALUE_SMBMKDIR, count)
@@ -627,10 +663,6 @@ enum profile_stats_values
 #define fget_nt_acl_count __profile_stats_value(PR_VALUE_FGET_NT_ACL, count)
 #define fget_nt_acl_time __profile_stats_value(PR_VALUE_FGET_NT_ACL, time)
 
-       PR_VALUE_SET_NT_ACL,
-#define set_nt_acl_count __profile_stats_value(PR_VALUE_SET_NT_ACL, count)
-#define set_nt_acl_time __profile_stats_value(PR_VALUE_SET_NT_ACL, time)
-
        PR_VALUE_FSET_NT_ACL,
 #define fset_nt_acl_count __profile_stats_value(PR_VALUE_FSET_NT_ACL, count)
 #define fset_nt_acl_time __profile_stats_value(PR_VALUE_FSET_NT_ACL, time)
@@ -737,6 +769,7 @@ struct profile_stats {
        unsigned syscall_read_bytes;
        unsigned syscall_write_bytes;
        unsigned syscall_sendfile_bytes;
+       unsigned syscall_recvfile_bytes;
 
 /* stat cache counters */
        unsigned statcache_lookups;
@@ -781,7 +814,7 @@ extern bool do_profile_times;
 
 extern clockid_t __profile_clock;
 
-static inline SMB_BIG_UINT profile_timestamp(void)
+static inline uint64_t profile_timestamp(void)
 {
        struct timespec ts;
 
@@ -796,7 +829,7 @@ static inline SMB_BIG_UINT profile_timestamp(void)
 
 #else
 
-static inline SMB_BIG_UINT profile_timestamp(void)
+static inline uint64_t profile_timestamp(void)
 {
        struct timeval tv;
        GetTimeOfDay(&tv);
@@ -829,14 +862,14 @@ static inline SMB_BIG_UINT profile_timestamp(void)
        }
 
 #define START_PROFILE(x) \
-       SMB_BIG_UINT __profstamp_##x = 0; \
+       uint64_t __profstamp_##x = 0; \
        if (do_profile_flag) { \
                __profstamp_##x = do_profile_times ? profile_timestamp() : 0;\
                INC_PROFILE_COUNT(x##_count); \
        }
 
 #define START_PROFILE_BYTES(x,n) \
-       SMB_BIG_UINT __profstamp_##x = 0; \
+       uint64_t __profstamp_##x = 0; \
        if (do_profile_flag) { \
                __profstamp_##x = do_profile_times ? profile_timestamp() : 0;\
                INC_PROFILE_COUNT(x##_count); \