From 81f56139b6964ddbe2c03232475f87f474136490 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 11 Oct 2001 07:42:52 +0000 Subject: initial kerberos/ADS/SPNEGO support in libsmb and smbclient. To activate you need to: - install krb5 libraries - run configure - build smbclient - run kinit to get a TGT - run smbclient with the -k option to choose kerberos auth (This used to be commit d33057585644e1337bac743e25ed7653bfb39eef) --- source3/include/smbprofile.h | 461 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 461 insertions(+) create mode 100644 source3/include/smbprofile.h (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h new file mode 100644 index 0000000000..fbd83d6e3e --- /dev/null +++ b/source3/include/smbprofile.h @@ -0,0 +1,461 @@ +#ifndef _PROFILE_H_ +#define _PROFILE_H_ +/* + Unix SMB/Netbios implementation. + Version 1.9. + store smbd profiling information in shared memory + Copyright (C) Andrew Tridgell 1999 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +/* + * Reasons for cache flush. + */ + +#define NUM_FLUSH_REASONS 8 /* Keep this in sync with the enum below. */ +enum flush_reason_enum { SEEK_FLUSH, READ_FLUSH, WRITE_FLUSH, READRAW_FLUSH, + OPLOCK_RELEASE_FLUSH, CLOSE_FLUSH, SYNC_FLUSH, SIZECHANGE_FLUSH }; + +/* this file defines the profile structure in the profile shared + memory area */ + +#define PROF_SHMEM_KEY ((key_t)0x07021999) +#define PROF_SHM_MAGIC 0x6349985 +#define PROF_SHM_VERSION 5 + +/* time values in the following structure are in microseconds */ + +struct profile_stats { +/* general counters */ + unsigned smb_count; /* how many SMB packets we have processed */ + unsigned uid_changes; /* how many times we change our effective uid */ +/* system call counters */ + unsigned syscall_opendir_count; + unsigned syscall_opendir_time; + unsigned syscall_readdir_count; + unsigned syscall_readdir_time; + unsigned syscall_mkdir_count; + unsigned syscall_mkdir_time; + unsigned syscall_rmdir_count; + unsigned syscall_rmdir_time; + unsigned syscall_closedir_count; + unsigned syscall_closedir_time; + unsigned syscall_open_count; + unsigned syscall_open_time; + unsigned syscall_close_count; + unsigned syscall_close_time; + unsigned syscall_read_count; + unsigned syscall_read_time; + unsigned syscall_read_bytes; /* bytes read with read syscall */ + unsigned syscall_write_count; + unsigned syscall_write_time; + unsigned syscall_write_bytes; /* bytes written with write syscall */ + unsigned syscall_lseek_count; + unsigned syscall_lseek_time; + unsigned syscall_rename_count; + unsigned syscall_rename_time; + unsigned syscall_fsync_count; + unsigned syscall_fsync_time; + unsigned syscall_stat_count; + unsigned syscall_stat_time; + unsigned syscall_fstat_count; + unsigned syscall_fstat_time; + unsigned syscall_lstat_count; + unsigned syscall_lstat_time; + unsigned syscall_unlink_count; + unsigned syscall_unlink_time; + unsigned syscall_chmod_count; + unsigned syscall_chmod_time; + unsigned syscall_fchmod_count; + unsigned syscall_fchmod_time; + unsigned syscall_chown_count; + unsigned syscall_chown_time; + unsigned syscall_fchown_count; + unsigned syscall_fchown_time; + unsigned syscall_chdir_count; + unsigned syscall_chdir_time; + unsigned syscall_getwd_count; + unsigned syscall_getwd_time; + unsigned syscall_utime_count; + unsigned syscall_utime_time; + unsigned syscall_ftruncate_count; + unsigned syscall_ftruncate_time; + unsigned syscall_fcntl_lock_count; + unsigned syscall_fcntl_lock_time; + unsigned syscall_readlink_count; + unsigned syscall_readlink_time; + unsigned syscall_symlink_count; + unsigned syscall_symlink_time; +/* stat cache counters */ + unsigned statcache_lookups; + unsigned statcache_misses; + unsigned statcache_hits; +/* write cache counters */ + unsigned writecache_read_hits; + unsigned writecache_abutted_writes; + unsigned writecache_total_writes; + unsigned writecache_non_oplock_writes; + unsigned writecache_direct_writes; + unsigned writecache_init_writes; + unsigned writecache_flushed_writes[NUM_FLUSH_REASONS]; + unsigned writecache_num_perfect_writes; + unsigned writecache_num_write_caches; + unsigned writecache_allocated_write_caches; +/* counters for individual SMB types */ + unsigned SMBmkdir_count; /* create directory */ + unsigned SMBmkdir_time; + unsigned SMBrmdir_count; /* delete directory */ + unsigned SMBrmdir_time; + unsigned SMBopen_count; /* open file */ + unsigned SMBopen_time; + unsigned SMBcreate_count; /* create file */ + unsigned SMBcreate_time; + unsigned SMBclose_count; /* close file */ + unsigned SMBclose_time; + unsigned SMBflush_count; /* flush file */ + unsigned SMBflush_time; + unsigned SMBunlink_count; /* delete file */ + unsigned SMBunlink_time; + unsigned SMBmv_count; /* rename file */ + unsigned SMBmv_time; + unsigned SMBgetatr_count; /* get file attributes */ + unsigned SMBgetatr_time; + unsigned SMBsetatr_count; /* set file attributes */ + unsigned SMBsetatr_time; + unsigned SMBread_count; /* read from file */ + unsigned SMBread_time; + unsigned SMBwrite_count; /* write to file */ + unsigned SMBwrite_time; + unsigned SMBlock_count; /* lock byte range */ + unsigned SMBlock_time; + unsigned SMBunlock_count; /* unlock byte range */ + unsigned SMBunlock_time; + unsigned SMBctemp_count; /* create temporary file */ + unsigned SMBctemp_time; + /* SMBmknew stats are currently combined with SMBcreate */ + unsigned SMBmknew_count; /* make new file */ + unsigned SMBmknew_time; + unsigned SMBchkpth_count; /* check directory path */ + unsigned SMBchkpth_time; + unsigned SMBexit_count; /* process exit */ + unsigned SMBexit_time; + unsigned SMBlseek_count; /* seek */ + unsigned SMBlseek_time; + unsigned SMBlockread_count; /* Lock a range and read */ + unsigned SMBlockread_time; + unsigned SMBwriteunlock_count; /* Unlock a range then write */ + unsigned SMBwriteunlock_time; + unsigned SMBreadbraw_count; /* read a block of data with no smb header */ + unsigned SMBreadbraw_time; + unsigned SMBreadBmpx_count; /* read block multiplexed */ + unsigned SMBreadBmpx_time; + unsigned SMBreadBs_count; /* read block (secondary response) */ + unsigned SMBreadBs_time; + unsigned SMBwritebraw_count; /* write a block of data with no smb header */ + unsigned SMBwritebraw_time; + unsigned SMBwriteBmpx_count; /* write block multiplexed */ + unsigned SMBwriteBmpx_time; + unsigned SMBwriteBs_count; /* write block (secondary request) */ + unsigned SMBwriteBs_time; + unsigned SMBwritec_count; /* secondary write request */ + unsigned SMBwritec_time; + unsigned SMBsetattrE_count; /* set file attributes expanded */ + unsigned SMBsetattrE_time; + unsigned SMBgetattrE_count; /* get file attributes expanded */ + unsigned SMBgetattrE_time; + unsigned SMBlockingX_count; /* lock/unlock byte ranges and X */ + unsigned SMBlockingX_time; + unsigned SMBtrans_count; /* transaction - name, bytes in/out */ + unsigned SMBtrans_time; + unsigned SMBtranss_count; /* transaction (secondary request/response) */ + unsigned SMBtranss_time; + unsigned SMBioctl_count; /* IOCTL */ + unsigned SMBioctl_time; + unsigned SMBioctls_count; /* IOCTL (secondary request/response) */ + unsigned SMBioctls_time; + unsigned SMBcopy_count; /* copy */ + unsigned SMBcopy_time; + unsigned SMBmove_count; /* move */ + unsigned SMBmove_time; + unsigned SMBecho_count; /* echo */ + unsigned SMBecho_time; + unsigned SMBwriteclose_count; /* write a file then close it */ + unsigned SMBwriteclose_time; + unsigned SMBopenX_count; /* open and X */ + unsigned SMBopenX_time; + unsigned SMBreadX_count; /* read and X */ + unsigned SMBreadX_time; + unsigned SMBwriteX_count; /* write and X */ + unsigned SMBwriteX_time; + unsigned SMBtrans2_count; /* TRANS2 protocol set */ + unsigned SMBtrans2_time; + unsigned SMBtranss2_count; /* TRANS2 protocol set, secondary command */ + unsigned SMBtranss2_time; + unsigned SMBfindclose_count; /* Terminate a TRANSACT2_FINDFIRST */ + unsigned SMBfindclose_time; + unsigned SMBfindnclose_count; /* Terminate a TRANSACT2_FINDNOTIFYFIRST */ + unsigned SMBfindnclose_time; + unsigned SMBtcon_count; /* tree connect */ + unsigned SMBtcon_time; + unsigned SMBtdis_count; /* tree disconnect */ + unsigned SMBtdis_time; + unsigned SMBnegprot_count; /* negotiate protocol */ + unsigned SMBnegprot_time; + unsigned SMBsesssetupX_count; /* Session Set Up & X (including User Logon) */ + unsigned SMBsesssetupX_time; + unsigned SMBulogoffX_count; /* user logoff */ + unsigned SMBulogoffX_time; + unsigned SMBtconX_count; /* tree connect and X*/ + unsigned SMBtconX_time; + unsigned SMBdskattr_count; /* get disk attributes */ + unsigned SMBdskattr_time; + unsigned SMBsearch_count; /* search directory */ + unsigned SMBsearch_time; + /* SBMffirst stats combined with SMBsearch */ + unsigned SMBffirst_count; /* find first */ + unsigned SMBffirst_time; + /* SBMfunique stats combined with SMBsearch */ + unsigned SMBfunique_count; /* find unique */ + unsigned SMBfunique_time; + unsigned SMBfclose_count; /* find close */ + unsigned SMBfclose_time; + unsigned SMBnttrans_count; /* NT transact */ + unsigned SMBnttrans_time; + unsigned SMBnttranss_count; /* NT transact secondary */ + unsigned SMBnttranss_time; + unsigned SMBntcreateX_count; /* NT create and X */ + unsigned SMBntcreateX_time; + unsigned SMBntcancel_count; /* NT cancel */ + unsigned SMBntcancel_time; + unsigned SMBsplopen_count; /* open print spool file */ + unsigned SMBsplopen_time; + unsigned SMBsplwr_count; /* write to print spool file */ + unsigned SMBsplwr_time; + unsigned SMBsplclose_count; /* close print spool file */ + unsigned SMBsplclose_time; + unsigned SMBsplretq_count; /* return print queue */ + unsigned SMBsplretq_time; + unsigned SMBsends_count; /* send single block message */ + unsigned SMBsends_time; + unsigned SMBsendb_count; /* send broadcast message */ + unsigned SMBsendb_time; + unsigned SMBfwdname_count; /* forward user name */ + unsigned SMBfwdname_time; + unsigned SMBcancelf_count; /* cancel forward */ + unsigned SMBcancelf_time; + unsigned SMBgetmac_count; /* get machine name */ + unsigned SMBgetmac_time; + unsigned SMBsendstrt_count; /* send start of multi-block message */ + unsigned SMBsendstrt_time; + unsigned SMBsendend_count; /* send end of multi-block message */ + unsigned SMBsendend_time; + unsigned SMBsendtxt_count; /* send text of multi-block message */ + unsigned SMBsendtxt_time; + unsigned SMBinvalid_count; /* invalid command */ + unsigned SMBinvalid_time; +/* Pathworks setdir command */ + unsigned pathworks_setdir_count; + unsigned pathworks_setdir_time; +/* These are the TRANS2 sub commands */ + unsigned Trans2_open_count; + unsigned Trans2_open_time; + unsigned Trans2_findfirst_count; + unsigned Trans2_findfirst_time; + unsigned Trans2_findnext_count; + unsigned Trans2_findnext_time; + unsigned Trans2_qfsinfo_count; + unsigned Trans2_qfsinfo_time; + unsigned Trans2_setfsinfo_count; + unsigned Trans2_setfsinfo_time; + unsigned Trans2_qpathinfo_count; + unsigned Trans2_qpathinfo_time; + unsigned Trans2_setpathinfo_count; + unsigned Trans2_setpathinfo_time; + unsigned Trans2_qfileinfo_count; + unsigned Trans2_qfileinfo_time; + unsigned Trans2_setfileinfo_count; + unsigned Trans2_setfileinfo_time; + unsigned Trans2_fsctl_count; + unsigned Trans2_fsctl_time; + unsigned Trans2_ioctl_count; + unsigned Trans2_ioctl_time; + unsigned Trans2_findnotifyfirst_count; + unsigned Trans2_findnotifyfirst_time; + unsigned Trans2_findnotifynext_count; + unsigned Trans2_findnotifynext_time; + unsigned Trans2_mkdir_count; + unsigned Trans2_mkdir_time; + unsigned Trans2_session_setup_count; + unsigned Trans2_session_setup_time; + unsigned Trans2_get_dfs_referral_count; + unsigned Trans2_get_dfs_referral_time; + unsigned Trans2_report_dfs_inconsistancy_count; + unsigned Trans2_report_dfs_inconsistancy_time; +/* These are the NT transact sub commands. */ + unsigned NT_transact_create_count; + unsigned NT_transact_create_time; + unsigned NT_transact_ioctl_count; + unsigned NT_transact_ioctl_time; + unsigned NT_transact_set_security_desc_count; + unsigned NT_transact_set_security_desc_time; + unsigned NT_transact_notify_change_count; + unsigned NT_transact_notify_change_time; + unsigned NT_transact_rename_count; + unsigned NT_transact_rename_time; + unsigned NT_transact_query_security_desc_count; + unsigned NT_transact_query_security_desc_time; +/* These are ACL manipulation calls */ + unsigned get_nt_acl_count; + unsigned get_nt_acl_time; + unsigned fget_nt_acl_count; + unsigned fget_nt_acl_time; + unsigned set_nt_acl_count; + unsigned set_nt_acl_time; + unsigned fset_nt_acl_count; + unsigned fset_nt_acl_time; + unsigned chmod_acl_count; + unsigned chmod_acl_time; + unsigned fchmod_acl_count; + unsigned fchmod_acl_time; +/* These are nmbd stats */ + unsigned name_release_count; + unsigned name_release_time; + unsigned name_refresh_count; + unsigned name_refresh_time; + unsigned name_registration_count; + unsigned name_registration_time; + unsigned node_status_count; + unsigned node_status_time; + unsigned name_query_count; + unsigned name_query_time; + unsigned host_announce_count; + unsigned host_announce_time; + unsigned workgroup_announce_count; + unsigned workgroup_announce_time; + unsigned local_master_announce_count; + unsigned local_master_announce_time; + unsigned master_browser_announce_count; + unsigned master_browser_announce_time; + unsigned lm_host_announce_count; + unsigned lm_host_announce_time; + unsigned get_backup_list_count; + unsigned get_backup_list_time; + unsigned reset_browser_count; + unsigned reset_browser_time; + unsigned announce_request_count; + unsigned announce_request_time; + unsigned lm_announce_request_count; + unsigned lm_announce_request_time; + unsigned domain_logon_count; + unsigned domain_logon_time; + unsigned sync_browse_lists_count; + unsigned sync_browse_lists_time; + unsigned run_elections_count; + unsigned run_elections_time; + unsigned election_count; + unsigned election_time; +}; + +struct profile_header { + int prof_shm_magic; + int prof_shm_version; + struct profile_stats stats; +}; + +extern struct profile_header *profile_h; +extern struct profile_stats *profile_p; +extern struct timeval profile_starttime; +extern struct timeval profile_endtime; +extern struct timeval profile_starttime_nested; +extern struct timeval profile_endtime_nested; +extern BOOL do_profile_flag; +extern BOOL do_profile_times; + +/* these are helper macros - do not call them directly in the code + * use the DO_PROFILE_* START_PROFILE and END_PROFILE ones + * below which test for the profile flage first + */ +#define INC_PROFILE_COUNT(x) profile_p->x++ +#define DEC_PROFILE_COUNT(x) profile_p->x-- +#define ADD_PROFILE_COUNT(x,y) profile_p->x += (y) +#define PROFILE_TIME \ + ((profile_endtime.tv_sec - profile_starttime.tv_sec) *1000000 + \ + ((int)profile_endtime.tv_usec - (int)profile_starttime.tv_usec)) +#define PROFILE_TIME_NESTED \ + ((profile_endtime_nested.tv_sec - profile_starttime_nested.tv_sec) *1000000 + \ + ((int)profile_endtime_nested.tv_usec - (int)profile_starttime_nested.tv_usec)) + +#ifdef WITH_PROFILE +#define DO_PROFILE_INC(x) \ + if (do_profile_flag) { \ + INC_PROFILE_COUNT(x); \ + } +#define DO_PROFILE_DEC(x) \ + if (do_profile_flag) { \ + DEC_PROFILE_COUNT(x); \ + } +#define DO_PROFILE_DEC_INC(x,y) \ + if (do_profile_flag) { \ + DEC_PROFILE_COUNT(x); \ + INC_PROFILE_COUNT(y); \ + } +#define DO_PROFILE_ADD(x,n) \ + if (do_profile_flag) { \ + ADD_PROFILE_COUNT(x,n); \ + } +#define START_PROFILE(x) \ + if (do_profile_flag) { \ + if (do_profile_times) \ + GetTimeOfDay(&profile_starttime); \ + INC_PROFILE_COUNT(x##_count); \ + } +#define START_PROFILE_NESTED(x) \ + if (do_profile_flag) { \ + if (do_profile_times) \ + GetTimeOfDay(&profile_starttime_nested); \ + INC_PROFILE_COUNT(x##_count); \ + } +#define START_PROFILE_BYTES(x,n) \ + if (do_profile_flag) { \ + if (do_profile_times) \ + GetTimeOfDay(&profile_starttime); \ + INC_PROFILE_COUNT(x##_count); \ + ADD_PROFILE_COUNT(x##_bytes,n); \ + } +#define END_PROFILE(x) \ + if (do_profile_times) { \ + GetTimeOfDay(&profile_endtime); \ + ADD_PROFILE_COUNT(x##_time,PROFILE_TIME); \ + } +#define END_PROFILE_NESTED(x) \ + if (do_profile_times) { \ + GetTimeOfDay(&profile_endtime_nested); \ + ADD_PROFILE_COUNT(x##_time,PROFILE_TIME_NESTED); \ + } +#else +#define DO_PROFILE_INC(x) +#define DO_PROFILE_DEC(x) +#define DO_PROFILE_DEC_INC(x,y) +#define DO_PROFILE_ADD(x,n) +#define START_PROFILE(x) +#define START_PROFILE_NESTED(x) +#define START_PROFILE_BYTES(x,n) +#define END_PROFILE(x) +#define END_PROFILE_NESTED(x) +#endif + +#endif -- cgit From 969d1dd4683ddaf7a54db50f8d5a2b2ebcf13c51 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 10 Jan 2002 19:40:40 +0000 Subject: added structure members referred to by recent changes in vfs-wrap.c (This used to be commit c5e14d73dffee86ef2dabcf7031eea0da9e32f3d) --- source3/include/smbprofile.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index fbd83d6e3e..719318195e 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -35,7 +35,7 @@ enum flush_reason_enum { SEEK_FLUSH, READ_FLUSH, WRITE_FLUSH, READRAW_FLUSH, #define PROF_SHMEM_KEY ((key_t)0x07021999) #define PROF_SHM_MAGIC 0x6349985 -#define PROF_SHM_VERSION 5 +#define PROF_SHM_VERSION 6 /* time values in the following structure are in microseconds */ @@ -100,6 +100,10 @@ struct profile_stats { unsigned syscall_readlink_time; unsigned syscall_symlink_count; unsigned syscall_symlink_time; + unsigned syscall_link_count; + unsigned syscall_link_time; + unsigned syscall_mknod_count; + unsigned syscall_mknod_time; /* stat cache counters */ unsigned statcache_lookups; unsigned statcache_misses; -- cgit From cd68afe31256ad60748b34f7318a180cfc2127cc Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 30 Jan 2002 06:08:46 +0000 Subject: Removed version number from file header. Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa) --- source3/include/smbprofile.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index 719318195e..3b18b9614e 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -1,8 +1,7 @@ #ifndef _PROFILE_H_ #define _PROFILE_H_ /* - Unix SMB/Netbios implementation. - Version 1.9. + Unix SMB/CIFS implementation. store smbd profiling information in shared memory Copyright (C) Andrew Tridgell 1999 -- cgit From d3cc77901080dab5c33c0b45d8e0a9e2b4fc98a3 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 21 Mar 2002 04:25:31 +0000 Subject: Compile fix for --with-profiling-data (This used to be commit 1ae07c42a449f4d4049c15f349f0829b73c12b5e) --- source3/include/smbprofile.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index 3b18b9614e..82017cee85 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -103,6 +103,8 @@ struct profile_stats { unsigned syscall_link_time; unsigned syscall_mknod_count; unsigned syscall_mknod_time; + unsigned syscall_realpath_count; + unsigned syscall_realpath_time; /* stat cache counters */ unsigned statcache_lookups; unsigned statcache_misses; -- cgit From a834a73e341059be154426390304a42e4a011f72 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 25 Sep 2002 15:19:00 +0000 Subject: sync'ing up for 3.0alpha20 release (This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139) --- source3/include/smbprofile.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index 82017cee85..e501de8c0e 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -34,7 +34,7 @@ enum flush_reason_enum { SEEK_FLUSH, READ_FLUSH, WRITE_FLUSH, READRAW_FLUSH, #define PROF_SHMEM_KEY ((key_t)0x07021999) #define PROF_SHM_MAGIC 0x6349985 -#define PROF_SHM_VERSION 6 +#define PROF_SHM_VERSION 7 /* time values in the following structure are in microseconds */ @@ -65,6 +65,9 @@ struct profile_stats { unsigned syscall_write_bytes; /* bytes written with write syscall */ unsigned syscall_lseek_count; unsigned syscall_lseek_time; + unsigned syscall_sendfile_count; + unsigned syscall_sendfile_time; + unsigned syscall_sendfile_bytes; /* bytes read with sendfile syscall */ unsigned syscall_rename_count; unsigned syscall_rename_time; unsigned syscall_fsync_count; -- cgit From e8573c8fa928602fd979d5ac45c692e7464f0aad Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Mon, 12 May 2003 01:20:17 +0000 Subject: Add NT quota support. Patch from Stefan (metze) Metzemacher 1. Allows to change quota settings for shared mount points from Win2K and WinXP from Explorer properties tab 2. Disabled by default and when requested, will be probed and enabled only on Linux where it works 3. Was tested for approx. two weeks now on Linux by two independent QA teams, have not found any bugs so far Documentation to follow (This used to be commit 4bf022ce9e45be85609426762ba2644ac2031326) --- source3/include/smbprofile.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index e501de8c0e..a64c2ce69e 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -108,6 +108,10 @@ struct profile_stats { unsigned syscall_mknod_time; unsigned syscall_realpath_count; unsigned syscall_realpath_time; + unsigned syscall_get_quota_count; + unsigned syscall_get_quota_time; + unsigned syscall_set_quota_count; + unsigned syscall_set_quota_time; /* stat cache counters */ unsigned statcache_lookups; unsigned statcache_misses; @@ -326,6 +330,10 @@ struct profile_stats { unsigned NT_transact_rename_time; unsigned NT_transact_query_security_desc_count; unsigned NT_transact_query_security_desc_time; + unsigned NT_transact_get_user_quota_count; + unsigned NT_transact_get_user_quota_time; + unsigned NT_transact_set_user_quota_count; + unsigned NT_transact_set_user_quota_time; /* These are ACL manipulation calls */ unsigned get_nt_acl_count; unsigned get_nt_acl_time; -- cgit From 0d44747df99f2168a063feedad5039f222746f61 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 6 Jan 2004 01:22:14 +0000 Subject: Patch based on work from James Peach to convert over to using pread/pwrite. Modified a little to ensure fsp->pos is correct. Fix for #889. Jeremy. (This used to be commit 019aaaf0df091c3f67048f591e70d4353a02bb9b) --- source3/include/smbprofile.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index a64c2ce69e..c29a630fe5 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -34,7 +34,7 @@ enum flush_reason_enum { SEEK_FLUSH, READ_FLUSH, WRITE_FLUSH, READRAW_FLUSH, #define PROF_SHMEM_KEY ((key_t)0x07021999) #define PROF_SHM_MAGIC 0x6349985 -#define PROF_SHM_VERSION 7 +#define PROF_SHM_VERSION 8 /* time values in the following structure are in microseconds */ @@ -60,9 +60,15 @@ struct profile_stats { unsigned syscall_read_count; unsigned syscall_read_time; unsigned syscall_read_bytes; /* bytes read with read syscall */ + unsigned syscall_pread_count; + unsigned syscall_pread_time; + unsigned syscall_pread_bytes; /* bytes read with pread syscall */ unsigned syscall_write_count; unsigned syscall_write_time; unsigned syscall_write_bytes; /* bytes written with write syscall */ + unsigned syscall_pwrite_count; + unsigned syscall_pwrite_time; + unsigned syscall_pwrite_bytes; /* bytes written with pwrite syscall */ unsigned syscall_lseek_count; unsigned syscall_lseek_time; unsigned syscall_sendfile_count; -- cgit From b88f446352b27d71a71d61a7151694c468cfe609 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 24 Feb 2004 00:06:08 +0000 Subject: Added NTrename SMB (0xA5) - how did we miss this.... ? Jeremy. (This used to be commit dfd7d1c2b7b577a084a94926abfce82c91f20b7e) --- source3/include/smbprofile.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index c29a630fe5..e494faf7da 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -34,7 +34,7 @@ enum flush_reason_enum { SEEK_FLUSH, READ_FLUSH, WRITE_FLUSH, READRAW_FLUSH, #define PROF_SHMEM_KEY ((key_t)0x07021999) #define PROF_SHM_MAGIC 0x6349985 -#define PROF_SHM_VERSION 8 +#define PROF_SHM_VERSION 9 /* time values in the following structure are in microseconds */ @@ -259,6 +259,8 @@ struct profile_stats { unsigned SMBntcreateX_time; unsigned SMBntcancel_count; /* NT cancel */ unsigned SMBntcancel_time; + unsigned SMBntrename_count; /* NT rename file */ + unsigned SMBntrename_time; unsigned SMBsplopen_count; /* open print spool file */ unsigned SMBsplopen_time; unsigned SMBsplwr_count; /* write to print spool file */ -- cgit From c0406ae1b04a60318ba18abb168b610d8c223005 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 9 Nov 2004 22:49:28 +0000 Subject: r3642: Extend vfs to add seekdir/telldir/rewinddir. Yes I know I have to fix the modules too... First step in fixing out large directories problem. Jeremy. (This used to be commit 344e9dd33a936b429fefb67cd748ac009a1bab10) --- source3/include/smbprofile.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index e494faf7da..ed6fce9a6d 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -34,7 +34,7 @@ enum flush_reason_enum { SEEK_FLUSH, READ_FLUSH, WRITE_FLUSH, READRAW_FLUSH, #define PROF_SHMEM_KEY ((key_t)0x07021999) #define PROF_SHM_MAGIC 0x6349985 -#define PROF_SHM_VERSION 9 +#define PROF_SHM_VERSION 10 /* time values in the following structure are in microseconds */ @@ -47,6 +47,12 @@ struct profile_stats { unsigned syscall_opendir_time; unsigned syscall_readdir_count; unsigned syscall_readdir_time; + unsigned syscall_seekdir_count; + unsigned syscall_seekdir_time; + unsigned syscall_telldir_count; + unsigned syscall_telldir_time; + unsigned syscall_rewinddir_count; + unsigned syscall_rewinddir_time; unsigned syscall_mkdir_count; unsigned syscall_mkdir_time; unsigned syscall_rmdir_count; -- cgit From 22dbd67708f1651a2341d70ce576fac360affccf Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 10 Apr 2006 15:33:04 +0000 Subject: r15018: Merge Volker's ipc/trans2/nttrans changes over into 3.0. Also merge the new POSIX lock code - this is not enabled unless -DDEVELOPER is defined. This doesn't yet map onto underlying system POSIX locks. Updates vfs to allow lock queries. Jeremy. (This used to be commit 08e52ead03304ff04229e1bfe544ff40e2564fc7) --- source3/include/smbprofile.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index ed6fce9a6d..f68a1e240f 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -110,6 +110,8 @@ struct profile_stats { unsigned syscall_ftruncate_time; unsigned syscall_fcntl_lock_count; unsigned syscall_fcntl_lock_time; + unsigned syscall_fcntl_getlock_count; + unsigned syscall_fcntl_getlock_time; unsigned syscall_readlink_count; unsigned syscall_readlink_time; unsigned syscall_symlink_count; -- cgit From 4d55a81958a67d5da3227d7af79a5c630f678424 Mon Sep 17 00:00:00 2001 From: James Peach Date: Fri, 5 May 2006 07:15:45 +0000 Subject: r15450: Change profiling data macros to use stack variables rather than globals. This catches mismatched start/end calls and removes the need for special nested profiling calls. (This used to be commit ee750498812190edd3ec52ca3c750258f3b8a97a) --- source3/include/smbprofile.h | 71 +++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 37 deletions(-) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index f68a1e240f..dd171ac13e 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -21,14 +21,6 @@ */ -/* - * Reasons for cache flush. - */ - -#define NUM_FLUSH_REASONS 8 /* Keep this in sync with the enum below. */ -enum flush_reason_enum { SEEK_FLUSH, READ_FLUSH, WRITE_FLUSH, READRAW_FLUSH, - OPLOCK_RELEASE_FLUSH, CLOSE_FLUSH, SYNC_FLUSH, SIZECHANGE_FLUSH }; - /* this file defines the profile structure in the profile shared memory area */ @@ -417,6 +409,8 @@ extern struct timeval profile_endtime_nested; extern BOOL do_profile_flag; extern BOOL do_profile_times; +#ifdef WITH_PROFILE + /* these are helper macros - do not call them directly in the code * use the DO_PROFILE_* START_PROFILE and END_PROFILE ones * below which test for the profile flage first @@ -424,61 +418,63 @@ extern BOOL do_profile_times; #define INC_PROFILE_COUNT(x) profile_p->x++ #define DEC_PROFILE_COUNT(x) profile_p->x-- #define ADD_PROFILE_COUNT(x,y) profile_p->x += (y) -#define PROFILE_TIME \ - ((profile_endtime.tv_sec - profile_starttime.tv_sec) *1000000 + \ - ((int)profile_endtime.tv_usec - (int)profile_starttime.tv_usec)) -#define PROFILE_TIME_NESTED \ - ((profile_endtime_nested.tv_sec - profile_starttime_nested.tv_sec) *1000000 + \ - ((int)profile_endtime_nested.tv_usec - (int)profile_starttime_nested.tv_usec)) -#ifdef WITH_PROFILE +static inline unsigned long long profile_timestamp(void) +{ + struct timeval tv; + GetTimeOfDay(&tv); + return (tv.tv_sec * 1000000) + tv.tv_usec; +} + +/* end of helper macros */ + #define DO_PROFILE_INC(x) \ if (do_profile_flag) { \ INC_PROFILE_COUNT(x); \ } + #define DO_PROFILE_DEC(x) \ if (do_profile_flag) { \ DEC_PROFILE_COUNT(x); \ } + #define DO_PROFILE_DEC_INC(x,y) \ if (do_profile_flag) { \ DEC_PROFILE_COUNT(x); \ INC_PROFILE_COUNT(y); \ } + #define DO_PROFILE_ADD(x,n) \ if (do_profile_flag) { \ ADD_PROFILE_COUNT(x,n); \ } + #define START_PROFILE(x) \ + unsigned long long __profstamp_##x = 0; \ if (do_profile_flag) { \ - if (do_profile_times) \ - GetTimeOfDay(&profile_starttime); \ - INC_PROFILE_COUNT(x##_count); \ - } -#define START_PROFILE_NESTED(x) \ - if (do_profile_flag) { \ - if (do_profile_times) \ - GetTimeOfDay(&profile_starttime_nested); \ + __profstamp_##x = do_profile_times ? profile_timestamp() : 0;\ INC_PROFILE_COUNT(x##_count); \ - } + } + #define START_PROFILE_BYTES(x,n) \ + unsigned long long __profstamp_##x = 0; \ if (do_profile_flag) { \ - if (do_profile_times) \ - GetTimeOfDay(&profile_starttime); \ + __profstamp_##x = do_profile_times ? profile_timestamp() : 0;\ INC_PROFILE_COUNT(x##_count); \ - ADD_PROFILE_COUNT(x##_bytes,n); \ - } + ADD_PROFILE_COUNT(x##_bytes, n); \ + } + #define END_PROFILE(x) \ if (do_profile_times) { \ - GetTimeOfDay(&profile_endtime); \ - ADD_PROFILE_COUNT(x##_time,PROFILE_TIME); \ + ADD_PROFILE_COUNT(x##_time, \ + profile_timestamp() - __profstamp_##x); \ } -#define END_PROFILE_NESTED(x) \ - if (do_profile_times) { \ - GetTimeOfDay(&profile_endtime_nested); \ - ADD_PROFILE_COUNT(x##_time,PROFILE_TIME_NESTED); \ - } -#else + +#define START_PROFILE_NESTED(x) START_PROFILE(x) +#define END_PROFILE_NESTED(x) END_PROFILE(x) + +#else /* WITH_PROFILE */ + #define DO_PROFILE_INC(x) #define DO_PROFILE_DEC(x) #define DO_PROFILE_DEC_INC(x,y) @@ -488,6 +484,7 @@ extern BOOL do_profile_times; #define START_PROFILE_BYTES(x,n) #define END_PROFILE(x) #define END_PROFILE_NESTED(x) -#endif + +#endif /* WITH_PROFILE */ #endif -- cgit From 826614ed16e0fb23d30305990dbfa357b4366de2 Mon Sep 17 00:00:00 2001 From: James Peach Date: Mon, 8 May 2006 03:20:49 +0000 Subject: r15508: Use clock_gettime for profiling timstamps if it is available. Use the fastest clock available on uniprocessors. (This used to be commit d44862928206b524f826bd7c2997ab5353c0b6a0) --- source3/include/smbprofile.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index dd171ac13e..fb5fa078c1 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -419,6 +419,25 @@ extern BOOL do_profile_times; #define DEC_PROFILE_COUNT(x) profile_p->x-- #define ADD_PROFILE_COUNT(x,y) profile_p->x += (y) +#if defined(HAVE_CLOCK_GETTIME) + +extern clockid_t __profile_clock; + +static inline unsigned long long profile_timestamp(void) +{ + struct timespec ts; + + /* FIXME: On a single-CPU system, or a system where we have bound + * daemon threads to single CPUs (eg. using cpusets or processor + * affinity), it might be preferable to use CLOCK_PROCESS_CPUTIME_ID. + */ + + clock_gettime(__profile_clock, &ts); + return (ts.tv_sec * 1000000) + (ts.tv_nsec / 1000); /* usec */ +} + +#else + static inline unsigned long long profile_timestamp(void) { struct timeval tv; @@ -426,6 +445,8 @@ static inline unsigned long long profile_timestamp(void) return (tv.tv_sec * 1000000) + tv.tv_usec; } +#endif + /* end of helper macros */ #define DO_PROFILE_INC(x) \ -- cgit From a4638ab379e3e9017b5f08f2eb723e802f696f61 Mon Sep 17 00:00:00 2001 From: James Peach Date: Tue, 9 May 2006 01:34:31 +0000 Subject: r15516: Use SMB_BIG_UINT in preference to unsigned long long. (This used to be commit f06d94382fa0f501fb1da7e308012b91a9eadb44) --- source3/include/smbprofile.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index fb5fa078c1..b8a9a49be1 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -423,7 +423,7 @@ extern BOOL do_profile_times; extern clockid_t __profile_clock; -static inline unsigned long long profile_timestamp(void) +static inline SMB_BIG_UINT profile_timestamp(void) { struct timespec ts; @@ -438,7 +438,7 @@ static inline unsigned long long profile_timestamp(void) #else -static inline unsigned long long profile_timestamp(void) +static inline SMB_BIG_UINT profile_timestamp(void) { struct timeval tv; GetTimeOfDay(&tv); @@ -471,14 +471,14 @@ static inline unsigned long long profile_timestamp(void) } #define START_PROFILE(x) \ - unsigned long long __profstamp_##x = 0; \ + SMB_BIG_UINT __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) \ - unsigned long long __profstamp_##x = 0; \ + SMB_BIG_UINT __profstamp_##x = 0; \ if (do_profile_flag) { \ __profstamp_##x = do_profile_times ? profile_timestamp() : 0;\ INC_PROFILE_COUNT(x##_count); \ -- cgit From fbdcf2663b56007a438ac4f0d8d82436b1bfe688 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 11 Jul 2006 18:01:26 +0000 Subject: r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8) --- source3/include/smbprofile.h | 1041 ++++++++++++++++++++++++++++-------------- 1 file changed, 696 insertions(+), 345 deletions(-) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index b8a9a49be1..d29f066796 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -4,7 +4,8 @@ Unix SMB/CIFS implementation. store smbd profiling information in shared memory Copyright (C) Andrew Tridgell 1999 - + Copyright (C) James Peach 2006 + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -26,102 +27,711 @@ #define PROF_SHMEM_KEY ((key_t)0x07021999) #define PROF_SHM_MAGIC 0x6349985 -#define PROF_SHM_VERSION 10 +#define PROF_SHM_VERSION 11 /* time values in the following structure are in microseconds */ +#define __profile_stats_value(which, domain) domain[which] + +enum profile_stats_values +{ + PR_VALUE_SMBD_IDLE = 0, +#define smbd_idle_count __profile_stats_value(PR_VALUE_SMBD_IDLE, count) +#define smbd_idle_time __profile_stats_value(PR_VALUE_SMBD_IDLE, time) + +/* system call counters */ + PR_VALUE_SYSCALL_OPENDIR, +#define syscall_opendir_count __profile_stats_value(PR_VALUE_SYSCALL_OPENDIR, count) +#define syscall_opendir_time __profile_stats_value(PR_VALUE_SYSCALL_OPENDIR, time) + + PR_VALUE_SYSCALL_READDIR, +#define syscall_readdir_count __profile_stats_value(PR_VALUE_SYSCALL_READDIR, count) +#define syscall_readdir_time __profile_stats_value(PR_VALUE_SYSCALL_READDIR, time) + + PR_VALUE_SYSCALL_SEEKDIR, +#define syscall_seekdir_count __profile_stats_value(PR_VALUE_SYSCALL_SEEKDIR, count) +#define syscall_seekdir_time __profile_stats_value(PR_VALUE_SYSCALL_SEEKDIR, time) + + PR_VALUE_SYSCALL_TELLDIR, +#define syscall_telldir_count __profile_stats_value(PR_VALUE_SYSCALL_TELLDIR, count) +#define syscall_telldir_time __profile_stats_value(PR_VALUE_SYSCALL_TELLDIR, time) + + PR_VALUE_SYSCALL_REWINDDIR, +#define syscall_rewinddir_count __profile_stats_value(PR_VALUE_SYSCALL_REWINDDIR, count) +#define syscall_rewinddir_time __profile_stats_value(PR_VALUE_SYSCALL_REWINDDIR, time) + + PR_VALUE_SYSCALL_MKDIR, +#define syscall_mkdir_count __profile_stats_value(PR_VALUE_SYSCALL_MKDIR, count) +#define syscall_mkdir_time __profile_stats_value(PR_VALUE_SYSCALL_MKDIR, time) + + PR_VALUE_SYSCALL_RMDIR, +#define syscall_rmdir_count __profile_stats_value(PR_VALUE_SYSCALL_RMDIR, count) +#define syscall_rmdir_time __profile_stats_value(PR_VALUE_SYSCALL_RMDIR, time) + + PR_VALUE_SYSCALL_CLOSEDIR, +#define syscall_closedir_count __profile_stats_value(PR_VALUE_SYSCALL_CLOSEDIR, count) +#define syscall_closedir_time __profile_stats_value(PR_VALUE_SYSCALL_CLOSEDIR, time) + + PR_VALUE_SYSCALL_OPEN, +#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_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) + + PR_VALUE_SYSCALL_READ, +#define syscall_read_count __profile_stats_value(PR_VALUE_SYSCALL_READ, count) +#define syscall_read_time __profile_stats_value(PR_VALUE_SYSCALL_READ, time) + + PR_VALUE_SYSCALL_PREAD, +#define syscall_pread_count __profile_stats_value(PR_VALUE_SYSCALL_PREAD, count) +#define syscall_pread_time __profile_stats_value(PR_VALUE_SYSCALL_PREAD, time) + + PR_VALUE_SYSCALL_WRITE, +#define syscall_write_count __profile_stats_value(PR_VALUE_SYSCALL_WRITE, count) +#define syscall_write_time __profile_stats_value(PR_VALUE_SYSCALL_WRITE, time) + + PR_VALUE_SYSCALL_PWRITE, +#define syscall_pwrite_count __profile_stats_value(PR_VALUE_SYSCALL_PWRITE, count) +#define syscall_pwrite_time __profile_stats_value(PR_VALUE_SYSCALL_PWRITE, time) + + PR_VALUE_SYSCALL_LSEEK, +#define syscall_lseek_count __profile_stats_value(PR_VALUE_SYSCALL_LSEEK, count) +#define syscall_lseek_time __profile_stats_value(PR_VALUE_SYSCALL_LSEEK, time) + + PR_VALUE_SYSCALL_SENDFILE, +#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_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_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) + + PR_VALUE_SYSCALL_STAT, +#define syscall_stat_count __profile_stats_value(PR_VALUE_SYSCALL_STAT, count) +#define syscall_stat_time __profile_stats_value(PR_VALUE_SYSCALL_STAT, time) + + PR_VALUE_SYSCALL_FSTAT, +#define syscall_fstat_count __profile_stats_value(PR_VALUE_SYSCALL_FSTAT, count) +#define syscall_fstat_time __profile_stats_value(PR_VALUE_SYSCALL_FSTAT, time) + + PR_VALUE_SYSCALL_LSTAT, +#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_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) + + PR_VALUE_SYSCALL_CHMOD, +#define syscall_chmod_count __profile_stats_value(PR_VALUE_SYSCALL_CHMOD, count) +#define syscall_chmod_time __profile_stats_value(PR_VALUE_SYSCALL_CHMOD, time) + + PR_VALUE_SYSCALL_FCHMOD, +#define syscall_fchmod_count __profile_stats_value(PR_VALUE_SYSCALL_FCHMOD, count) +#define syscall_fchmod_time __profile_stats_value(PR_VALUE_SYSCALL_FCHMOD, time) + + PR_VALUE_SYSCALL_CHOWN, +#define syscall_chown_count __profile_stats_value(PR_VALUE_SYSCALL_CHOWN, count) +#define syscall_chown_time __profile_stats_value(PR_VALUE_SYSCALL_CHOWN, time) + + PR_VALUE_SYSCALL_FCHOWN, +#define syscall_fchown_count __profile_stats_value(PR_VALUE_SYSCALL_FCHOWN, count) +#define syscall_fchown_time __profile_stats_value(PR_VALUE_SYSCALL_FCHOWN, time) + + PR_VALUE_SYSCALL_CHDIR, +#define syscall_chdir_count __profile_stats_value(PR_VALUE_SYSCALL_CHDIR, count) +#define syscall_chdir_time __profile_stats_value(PR_VALUE_SYSCALL_CHDIR, time) + + PR_VALUE_SYSCALL_GETWD, +#define syscall_getwd_count __profile_stats_value(PR_VALUE_SYSCALL_GETWD, count) +#define syscall_getwd_time __profile_stats_value(PR_VALUE_SYSCALL_GETWD, time) + + PR_VALUE_SYSCALL_UTIME, +#define syscall_utime_count __profile_stats_value(PR_VALUE_SYSCALL_UTIME, count) +#define syscall_utime_time __profile_stats_value(PR_VALUE_SYSCALL_UTIME, time) + + PR_VALUE_SYSCALL_FTRUNCATE, +#define syscall_ftruncate_count __profile_stats_value(PR_VALUE_SYSCALL_FTRUNCATE, count) +#define syscall_ftruncate_time __profile_stats_value(PR_VALUE_SYSCALL_FTRUNCATE, time) + + PR_VALUE_SYSCALL_FCNTL_LOCK, +#define syscall_fcntl_lock_count __profile_stats_value(PR_VALUE_SYSCALL_FCNTL_LOCK, count) +#define syscall_fcntl_lock_time __profile_stats_value(PR_VALUE_SYSCALL_FCNTL_LOCK, time) + + PR_VALUE_SYSCALL_FCNTL_GETLOCK, +#define syscall_fcntl_getlock_count __profile_stats_value(PR_VALUE_SYSCALL_FCNTL_GETLOCK, count) +#define syscall_fcntl_getlock_time __profile_stats_value(PR_VALUE_SYSCALL_FCNTL_GETLOCK, time) + + PR_VALUE_SYSCALL_READLINK, +#define syscall_readlink_count __profile_stats_value(PR_VALUE_SYSCALL_READLINK, count) +#define syscall_readlink_time __profile_stats_value(PR_VALUE_SYSCALL_READLINK, time) + + PR_VALUE_SYSCALL_SYMLINK, +#define syscall_symlink_count __profile_stats_value(PR_VALUE_SYSCALL_SYMLINK, count) +#define syscall_symlink_time __profile_stats_value(PR_VALUE_SYSCALL_SYMLINK, time) + + PR_VALUE_SYSCALL_LINK, +#define syscall_link_count __profile_stats_value(PR_VALUE_SYSCALL_LINK, count) +#define syscall_link_time __profile_stats_value(PR_VALUE_SYSCALL_LINK, time) + + PR_VALUE_SYSCALL_MKNOD, +#define syscall_mknod_count __profile_stats_value(PR_VALUE_SYSCALL_MKNOD, count) +#define syscall_mknod_time __profile_stats_value(PR_VALUE_SYSCALL_MKNOD, time) + + PR_VALUE_SYSCALL_REALPATH, +#define syscall_realpath_count __profile_stats_value(PR_VALUE_SYSCALL_REALPATH, count) +#define syscall_realpath_time __profile_stats_value(PR_VALUE_SYSCALL_REALPATH, time) + + PR_VALUE_SYSCALL_GET_QUOTA, +#define syscall_get_quota_count __profile_stats_value(PR_VALUE_SYSCALL_GET_QUOTA, count) +#define syscall_get_quota_time __profile_stats_value(PR_VALUE_SYSCALL_GET_QUOTA, time) + + PR_VALUE_SYSCALL_SET_QUOTA, +#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) + +/* counters for individual SMB types */ + PR_VALUE_SMBMKDIR, +#define SMBmkdir_count __profile_stats_value(PR_VALUE_SMBMKDIR, count) +#define SMBmkdir_time __profile_stats_value(PR_VALUE_SMBMKDIR, time) + + PR_VALUE_SMBRMDIR, +#define SMBrmdir_count __profile_stats_value(PR_VALUE_SMBRMDIR, count) +#define SMBrmdir_time __profile_stats_value(PR_VALUE_SMBRMDIR, time) + + PR_VALUE_SMBOPEN, +#define SMBopen_count __profile_stats_value(PR_VALUE_SMBOPEN, count) +#define SMBopen_time __profile_stats_value(PR_VALUE_SMBOPEN, time) + + PR_VALUE_SMBCREATE, +#define SMBcreate_count __profile_stats_value(PR_VALUE_SMBCREATE, count) +#define SMBcreate_time __profile_stats_value(PR_VALUE_SMBCREATE, time) + + PR_VALUE_SMBCLOSE, +#define SMBclose_count __profile_stats_value(PR_VALUE_SMBCLOSE, count) +#define SMBclose_time __profile_stats_value(PR_VALUE_SMBCLOSE, time) + + PR_VALUE_SMBFLUSH, +#define SMBflush_count __profile_stats_value(PR_VALUE_SMBFLUSH, count) +#define SMBflush_time __profile_stats_value(PR_VALUE_SMBFLUSH, time) + + PR_VALUE_SMBUNLINK, +#define SMBunlink_count __profile_stats_value(PR_VALUE_SMBUNLINK, count) +#define SMBunlink_time __profile_stats_value(PR_VALUE_SMBUNLINK, time) + + PR_VALUE_SMBMV, +#define SMBmv_count __profile_stats_value(PR_VALUE_SMBMV, count) +#define SMBmv_time __profile_stats_value(PR_VALUE_SMBMV, time) + + PR_VALUE_SMBGETATR, +#define SMBgetatr_count __profile_stats_value(PR_VALUE_SMBGETATR, count) +#define SMBgetatr_time __profile_stats_value(PR_VALUE_SMBGETATR, time) + + PR_VALUE_SMBSETATR, +#define SMBsetatr_count __profile_stats_value(PR_VALUE_SMBSETATR, count) +#define SMBsetatr_time __profile_stats_value(PR_VALUE_SMBSETATR, time) + + PR_VALUE_SMBREAD, +#define SMBread_count __profile_stats_value(PR_VALUE_SMBREAD, count) +#define SMBread_time __profile_stats_value(PR_VALUE_SMBREAD, time) + + PR_VALUE_SMBWRITE, +#define SMBwrite_count __profile_stats_value(PR_VALUE_SMBWRITE, count) +#define SMBwrite_time __profile_stats_value(PR_VALUE_SMBWRITE, time) + + PR_VALUE_SMBLOCK, +#define SMBlock_count __profile_stats_value(PR_VALUE_SMBLOCK, count) +#define SMBlock_time __profile_stats_value(PR_VALUE_SMBLOCK, time) + + PR_VALUE_SMBUNLOCK, +#define SMBunlock_count __profile_stats_value(PR_VALUE_SMBUNLOCK, count) +#define SMBunlock_time __profile_stats_value(PR_VALUE_SMBUNLOCK, time) + + PR_VALUE_SMBCTEMP, +#define SMBctemp_count __profile_stats_value(PR_VALUE_SMBCTEMP, count) +#define SMBctemp_time __profile_stats_value(PR_VALUE_SMBCTEMP, time) + + /* SMBmknew stats are currently combined with SMBcreate */ + PR_VALUE_SMBMKNEW, +#define SMBmknew_count __profile_stats_value(PR_VALUE_SMBMKNEW, count) +#define SMBmknew_time __profile_stats_value(PR_VALUE_SMBMKNEW, time) + + PR_VALUE_SMBCHKPTH, +#define SMBchkpth_count __profile_stats_value(PR_VALUE_SMBCHKPTH, count) +#define SMBchkpth_time __profile_stats_value(PR_VALUE_SMBCHKPTH, time) + + PR_VALUE_SMBEXIT, +#define SMBexit_count __profile_stats_value(PR_VALUE_SMBEXIT, count) +#define SMBexit_time __profile_stats_value(PR_VALUE_SMBEXIT, time) + + PR_VALUE_SMBLSEEK, +#define SMBlseek_count __profile_stats_value(PR_VALUE_SMBLSEEK, count) +#define SMBlseek_time __profile_stats_value(PR_VALUE_SMBLSEEK, time) + + PR_VALUE_SMBLOCKREAD, +#define SMBlockread_count __profile_stats_value(PR_VALUE_SMBLOCKREAD, count) +#define SMBlockread_time __profile_stats_value(PR_VALUE_SMBLOCKREAD, time) + + PR_VALUE_SMBWRITEUNLOCK, +#define SMBwriteunlock_count __profile_stats_value(PR_VALUE_SMBWRITEUNLOCK, count) +#define SMBwriteunlock_time __profile_stats_value(PR_VALUE_SMBWRITEUNLOCK, time) + + PR_VALUE_SMBREADBRAW, +#define SMBreadbraw_count __profile_stats_value(PR_VALUE_SMBREADBRAW, count) +#define SMBreadbraw_time __profile_stats_value(PR_VALUE_SMBREADBRAW, time) + + PR_VALUE_SMBREADBMPX, +#define SMBreadBmpx_count __profile_stats_value(PR_VALUE_SMBREADBMPX, count) +#define SMBreadBmpx_time __profile_stats_value(PR_VALUE_SMBREADBMPX, time) + + PR_VALUE_SMBREADBS, +#define SMBreadBs_count __profile_stats_value(PR_VALUE_SMBREADBS, count) +#define SMBreadBs_time __profile_stats_value(PR_VALUE_SMBREADBS, time) + + PR_VALUE_SMBWRITEBRAW, +#define SMBwritebraw_count __profile_stats_value(PR_VALUE_SMBWRITEBRAW, count) +#define SMBwritebraw_time __profile_stats_value(PR_VALUE_SMBWRITEBRAW, time) + + PR_VALUE_SMBWRITEBMPX, +#define SMBwriteBmpx_count __profile_stats_value(PR_VALUE_SMBWRITEBMPX, count) +#define SMBwriteBmpx_time __profile_stats_value(PR_VALUE_SMBWRITEBMPX, time) + + PR_VALUE_SMBWRITEBS, +#define SMBwriteBs_count __profile_stats_value(PR_VALUE_SMBWRITEBS, count) +#define SMBwriteBs_time __profile_stats_value(PR_VALUE_SMBWRITEBS, time) + + PR_VALUE_SMBWRITEC, +#define SMBwritec_count __profile_stats_value(PR_VALUE_SMBWRITEC, count) +#define SMBwritec_time __profile_stats_value(PR_VALUE_SMBWRITEC, time) + + PR_VALUE_SMBSETATTRE, +#define SMBsetattrE_count __profile_stats_value(PR_VALUE_SMBSETATTRE, count) +#define SMBsetattrE_time __profile_stats_value(PR_VALUE_SMBSETATTRE, time) + + PR_VALUE_SMBGETATTRE, +#define SMBgetattrE_count __profile_stats_value(PR_VALUE_SMBGETATTRE, count) +#define SMBgetattrE_time __profile_stats_value(PR_VALUE_SMBGETATTRE, time) + + PR_VALUE_SMBLOCKINGX, +#define SMBlockingX_count __profile_stats_value(PR_VALUE_SMBLOCKINGX, count) +#define SMBlockingX_time __profile_stats_value(PR_VALUE_SMBLOCKINGX, time) + + PR_VALUE_SMBTRANS, +#define SMBtrans_count __profile_stats_value(PR_VALUE_SMBTRANS, count) +#define SMBtrans_time __profile_stats_value(PR_VALUE_SMBTRANS, time) + + PR_VALUE_SMBTRANSS, +#define SMBtranss_count __profile_stats_value(PR_VALUE_SMBTRANSS, count) +#define SMBtranss_time __profile_stats_value(PR_VALUE_SMBTRANSS, time) + + PR_VALUE_SMBIOCTL, +#define SMBioctl_count __profile_stats_value(PR_VALUE_SMBIOCTL, count) +#define SMBioctl_time __profile_stats_value(PR_VALUE_SMBIOCTL, time) + + PR_VALUE_SMBIOCTLS, +#define SMBioctls_count __profile_stats_value(PR_VALUE_SMBIOCTLS, count) +#define SMBioctls_time __profile_stats_value(PR_VALUE_SMBIOCTLS, time) + + PR_VALUE_SMBCOPY, +#define SMBcopy_count __profile_stats_value(PR_VALUE_SMBCOPY, count) +#define SMBcopy_time __profile_stats_value(PR_VALUE_SMBCOPY, time) + + PR_VALUE_SMBMOVE, +#define SMBmove_count __profile_stats_value(PR_VALUE_SMBMOVE, count) +#define SMBmove_time __profile_stats_value(PR_VALUE_SMBMOVE, time) + + PR_VALUE_SMBECHO, +#define SMBecho_count __profile_stats_value(PR_VALUE_SMBECHO, count) +#define SMBecho_time __profile_stats_value(PR_VALUE_SMBECHO, time) + + PR_VALUE_SMBWRITECLOSE, +#define SMBwriteclose_count __profile_stats_value(PR_VALUE_SMBWRITECLOSE, count) +#define SMBwriteclose_time __profile_stats_value(PR_VALUE_SMBWRITECLOSE, time) + + PR_VALUE_SMBOPENX, +#define SMBopenX_count __profile_stats_value(PR_VALUE_SMBOPENX, count) +#define SMBopenX_time __profile_stats_value(PR_VALUE_SMBOPENX, time) + + PR_VALUE_SMBREADX, +#define SMBreadX_count __profile_stats_value(PR_VALUE_SMBREADX, count) +#define SMBreadX_time __profile_stats_value(PR_VALUE_SMBREADX, time) + + PR_VALUE_SMBWRITEX, +#define SMBwriteX_count __profile_stats_value(PR_VALUE_SMBWRITEX, count) +#define SMBwriteX_time __profile_stats_value(PR_VALUE_SMBWRITEX, time) + + PR_VALUE_SMBTRANS2, +#define SMBtrans2_count __profile_stats_value(PR_VALUE_SMBTRANS2, count) +#define SMBtrans2_time __profile_stats_value(PR_VALUE_SMBTRANS2, time) + + PR_VALUE_SMBTRANSS2, +#define SMBtranss2_count __profile_stats_value(PR_VALUE_SMBTRANSS2, count) +#define SMBtranss2_time __profile_stats_value(PR_VALUE_SMBTRANSS2, time) + + PR_VALUE_SMBFINDCLOSE, +#define SMBfindclose_count __profile_stats_value(PR_VALUE_SMBFINDCLOSE, count) +#define SMBfindclose_time __profile_stats_value(PR_VALUE_SMBFINDCLOSE, time) + + PR_VALUE_SMBFINDNCLOSE, +#define SMBfindnclose_count __profile_stats_value(PR_VALUE_SMBFINDNCLOSE, count) +#define SMBfindnclose_time __profile_stats_value(PR_VALUE_SMBFINDNCLOSE, time) + + PR_VALUE_SMBTCON, +#define SMBtcon_count __profile_stats_value(PR_VALUE_SMBTCON, count) +#define SMBtcon_time __profile_stats_value(PR_VALUE_SMBTCON, time) + + PR_VALUE_SMBTDIS, +#define SMBtdis_count __profile_stats_value(PR_VALUE_SMBTDIS, count) +#define SMBtdis_time __profile_stats_value(PR_VALUE_SMBTDIS, time) + + PR_VALUE_SMBNEGPROT, +#define SMBnegprot_count __profile_stats_value(PR_VALUE_SMBNEGPROT, count) +#define SMBnegprot_time __profile_stats_value(PR_VALUE_SMBNEGPROT, time) + + PR_VALUE_SMBSESSSETUPX, +#define SMBsesssetupX_count __profile_stats_value(PR_VALUE_SMBSESSSETUPX, count) +#define SMBsesssetupX_time __profile_stats_value(PR_VALUE_SMBSESSSETUPX, time) + + PR_VALUE_SMBULOGOFFX, +#define SMBulogoffX_count __profile_stats_value(PR_VALUE_SMBULOGOFFX, count) +#define SMBulogoffX_time __profile_stats_value(PR_VALUE_SMBULOGOFFX, time) + + PR_VALUE_SMBTCONX, +#define SMBtconX_count __profile_stats_value(PR_VALUE_SMBTCONX, count) +#define SMBtconX_time __profile_stats_value(PR_VALUE_SMBTCONX, time) + + PR_VALUE_SMBDSKATTR, +#define SMBdskattr_count __profile_stats_value(PR_VALUE_SMBDSKATTR, count) +#define SMBdskattr_time __profile_stats_value(PR_VALUE_SMBDSKATTR, time) + + PR_VALUE_SMBSEARCH, +#define SMBsearch_count __profile_stats_value(PR_VALUE_SMBSEARCH, count) +#define SMBsearch_time __profile_stats_value(PR_VALUE_SMBSEARCH, time) + + /* SBMffirst stats combined with SMBsearch */ + PR_VALUE_SMBFFIRST, +#define SMBffirst_count __profile_stats_value(PR_VALUE_SMBFFIRST, count) +#define SMBffirst_time __profile_stats_value(PR_VALUE_SMBFFIRST, time) + + /* SBMfunique stats combined with SMBsearch */ + PR_VALUE_SMBFUNIQUE, +#define SMBfunique_count __profile_stats_value(PR_VALUE_SMBFUNIQUE, count) +#define SMBfunique_time __profile_stats_value(PR_VALUE_SMBFUNIQUE, time) + + PR_VALUE_SMBFCLOSE, +#define SMBfclose_count __profile_stats_value(PR_VALUE_SMBFCLOSE, count) +#define SMBfclose_time __profile_stats_value(PR_VALUE_SMBFCLOSE, time) + + PR_VALUE_SMBNTTRANS, +#define SMBnttrans_count __profile_stats_value(PR_VALUE_SMBNTTRANS, count) +#define SMBnttrans_time __profile_stats_value(PR_VALUE_SMBNTTRANS, time) + + PR_VALUE_SMBNTTRANSS, +#define SMBnttranss_count __profile_stats_value(PR_VALUE_SMBNTTRANSS, count) +#define SMBnttranss_time __profile_stats_value(PR_VALUE_SMBNTTRANSS, time) + + PR_VALUE_SMBNTCREATEX, +#define SMBntcreateX_count __profile_stats_value(PR_VALUE_SMBNTCREATEX, count) +#define SMBntcreateX_time __profile_stats_value(PR_VALUE_SMBNTCREATEX, time) + + PR_VALUE_SMBNTCANCEL, +#define SMBntcancel_count __profile_stats_value(PR_VALUE_SMBNTCANCEL, count) +#define SMBntcancel_time __profile_stats_value(PR_VALUE_SMBNTCANCEL, time) + + PR_VALUE_SMBNTRENAME, +#define SMBntrename_count __profile_stats_value(PR_VALUE_SMBNTRENAME, count) +#define SMBntrename_time __profile_stats_value(PR_VALUE_SMBNTRENAME, time) + + PR_VALUE_SMBSPLOPEN, +#define SMBsplopen_count __profile_stats_value(PR_VALUE_SMBSPLOPEN, count) +#define SMBsplopen_time __profile_stats_value(PR_VALUE_SMBSPLOPEN, time) + + PR_VALUE_SMBSPLWR, +#define SMBsplwr_count __profile_stats_value(PR_VALUE_SMBSPLWR, count) +#define SMBsplwr_time __profile_stats_value(PR_VALUE_SMBSPLWR, time) + + PR_VALUE_SMBSPLCLOSE, +#define SMBsplclose_count __profile_stats_value(PR_VALUE_SMBSPLCLOSE, count) +#define SMBsplclose_time __profile_stats_value(PR_VALUE_SMBSPLCLOSE, time) + + PR_VALUE_SMBSPLRETQ, +#define SMBsplretq_count __profile_stats_value(PR_VALUE_SMBSPLRETQ, count) +#define SMBsplretq_time __profile_stats_value(PR_VALUE_SMBSPLRETQ, time) + + PR_VALUE_SMBSENDS, +#define SMBsends_count __profile_stats_value(PR_VALUE_SMBSENDS, count) +#define SMBsends_time __profile_stats_value(PR_VALUE_SMBSENDS, time) + + PR_VALUE_SMBSENDB, +#define SMBsendb_count __profile_stats_value(PR_VALUE_SMBSENDB, count) +#define SMBsendb_time __profile_stats_value(PR_VALUE_SMBSENDB, time) + + PR_VALUE_SMBFWDNAME, +#define SMBfwdname_count __profile_stats_value(PR_VALUE_SMBFWDNAME, count) +#define SMBfwdname_time __profile_stats_value(PR_VALUE_SMBFWDNAME, time) + + PR_VALUE_SMBCANCELF, +#define SMBcancelf_count __profile_stats_value(PR_VALUE_SMBCANCELF, count) +#define SMBcancelf_time __profile_stats_value(PR_VALUE_SMBCANCELF, time) + + PR_VALUE_SMBGETMAC, +#define SMBgetmac_count __profile_stats_value(PR_VALUE_SMBGETMAC, count) +#define SMBgetmac_time __profile_stats_value(PR_VALUE_SMBGETMAC, time) + + PR_VALUE_SMBSENDSTRT, +#define SMBsendstrt_count __profile_stats_value(PR_VALUE_SMBSENDSTRT, count) +#define SMBsendstrt_time __profile_stats_value(PR_VALUE_SMBSENDSTRT, time) + + PR_VALUE_SMBSENDEND, +#define SMBsendend_count __profile_stats_value(PR_VALUE_SMBSENDEND, count) +#define SMBsendend_time __profile_stats_value(PR_VALUE_SMBSENDEND, time) + + PR_VALUE_SMBSENDTXT, +#define SMBsendtxt_count __profile_stats_value(PR_VALUE_SMBSENDTXT, count) +#define SMBsendtxt_time __profile_stats_value(PR_VALUE_SMBSENDTXT, time) + + PR_VALUE_SMBINVALID, +#define SMBinvalid_count __profile_stats_value(PR_VALUE_SMBINVALID, count) +#define SMBinvalid_time __profile_stats_value(PR_VALUE_SMBINVALID, time) + +/* Pathworks setdir command */ + PR_VALUE_PATHWORKS_SETDIR, +#define pathworks_setdir_count __profile_stats_value(PR_VALUE_PATHWORKS_SETDIR, count) +#define pathworks_setdir_time __profile_stats_value(PR_VALUE_PATHWORKS_SETDIR, time) + +/* These are the TRANS2 sub commands */ + PR_VALUE_TRANS2_OPEN, +#define Trans2_open_count __profile_stats_value(PR_VALUE_TRANS2_OPEN, count) +#define Trans2_open_time __profile_stats_value(PR_VALUE_TRANS2_OPEN, time) + + PR_VALUE_TRANS2_FINDFIRST, +#define Trans2_findfirst_count __profile_stats_value(PR_VALUE_TRANS2_FINDFIRST, count) +#define Trans2_findfirst_time __profile_stats_value(PR_VALUE_TRANS2_FINDFIRST, time) + + PR_VALUE_TRANS2_FINDNEXT, +#define Trans2_findnext_count __profile_stats_value(PR_VALUE_TRANS2_FINDNEXT, count) +#define Trans2_findnext_time __profile_stats_value(PR_VALUE_TRANS2_FINDNEXT, time) + + PR_VALUE_TRANS2_QFSINFO, +#define Trans2_qfsinfo_count __profile_stats_value(PR_VALUE_TRANS2_QFSINFO, count) +#define Trans2_qfsinfo_time __profile_stats_value(PR_VALUE_TRANS2_QFSINFO, time) + + PR_VALUE_TRANS2_SETFSINFO, +#define Trans2_setfsinfo_count __profile_stats_value(PR_VALUE_TRANS2_SETFSINFO, count) +#define Trans2_setfsinfo_time __profile_stats_value(PR_VALUE_TRANS2_SETFSINFO, time) + + PR_VALUE_TRANS2_QPATHINFO, +#define Trans2_qpathinfo_count __profile_stats_value(PR_VALUE_TRANS2_QPATHINFO, count) +#define Trans2_qpathinfo_time __profile_stats_value(PR_VALUE_TRANS2_QPATHINFO, time) + + PR_VALUE_TRANS2_SETPATHINFO, +#define Trans2_setpathinfo_count __profile_stats_value(PR_VALUE_TRANS2_SETPATHINFO, count) +#define Trans2_setpathinfo_time __profile_stats_value(PR_VALUE_TRANS2_SETPATHINFO, time) + + PR_VALUE_TRANS2_QFILEINFO, +#define Trans2_qfileinfo_count __profile_stats_value(PR_VALUE_TRANS2_QFILEINFO, count) +#define Trans2_qfileinfo_time __profile_stats_value(PR_VALUE_TRANS2_QFILEINFO, time) + + PR_VALUE_TRANS2_SETFILEINFO, +#define Trans2_setfileinfo_count __profile_stats_value(PR_VALUE_TRANS2_SETFILEINFO, count) +#define Trans2_setfileinfo_time __profile_stats_value(PR_VALUE_TRANS2_SETFILEINFO, time) + + PR_VALUE_TRANS2_FSCTL, +#define Trans2_fsctl_count __profile_stats_value(PR_VALUE_TRANS2_FSCTL, count) +#define Trans2_fsctl_time __profile_stats_value(PR_VALUE_TRANS2_FSCTL, time) + + PR_VALUE_TRANS2_IOCTL, +#define Trans2_ioctl_count __profile_stats_value(PR_VALUE_TRANS2_IOCTL, count) +#define Trans2_ioctl_time __profile_stats_value(PR_VALUE_TRANS2_IOCTL, time) + + PR_VALUE_TRANS2_FINDNOTIFYFIRST, +#define Trans2_findnotifyfirst_count __profile_stats_value(PR_VALUE_TRANS2_FINDNOTIFYFIRST, count) +#define Trans2_findnotifyfirst_time __profile_stats_value(PR_VALUE_TRANS2_FINDNOTIFYFIRST, time) + + PR_VALUE_TRANS2_FINDNOTIFYNEXT, +#define Trans2_findnotifynext_count __profile_stats_value(PR_VALUE_TRANS2_FINDNOTIFYNEXT, count) +#define Trans2_findnotifynext_time __profile_stats_value(PR_VALUE_TRANS2_FINDNOTIFYNEXT, time) + + PR_VALUE_TRANS2_MKDIR, +#define Trans2_mkdir_count __profile_stats_value(PR_VALUE_TRANS2_MKDIR, count) +#define Trans2_mkdir_time __profile_stats_value(PR_VALUE_TRANS2_MKDIR, time) + + PR_VALUE_TRANS2_SESSION_SETUP, +#define Trans2_session_setup_count __profile_stats_value(PR_VALUE_TRANS2_SESSION_SETUP, count) +#define Trans2_session_setup_time __profile_stats_value(PR_VALUE_TRANS2_SESSION_SETUP, time) + + PR_VALUE_TRANS2_GET_DFS_REFERRAL, +#define Trans2_get_dfs_referral_count __profile_stats_value(PR_VALUE_TRANS2_GET_DFS_REFERRAL, count) +#define Trans2_get_dfs_referral_time __profile_stats_value(PR_VALUE_TRANS2_GET_DFS_REFERRAL, time) + + PR_VALUE_TRANS2_REPORT_DFS_INCONSISTANCY, +#define Trans2_report_dfs_inconsistancy_count __profile_stats_value(PR_VALUE_TRANS2_REPORT_DFS_INCONSISTANCY, count) +#define Trans2_report_dfs_inconsistancy_time __profile_stats_value(PR_VALUE_TRANS2_REPORT_DFS_INCONSISTANCY, time) + +/* These are the NT transact sub commands. */ + PR_VALUE_NT_TRANSACT_CREATE, +#define NT_transact_create_count __profile_stats_value(PR_VALUE_NT_TRANSACT_CREATE, count) +#define NT_transact_create_time __profile_stats_value(PR_VALUE_NT_TRANSACT_CREATE, time) + + PR_VALUE_NT_TRANSACT_IOCTL, +#define NT_transact_ioctl_count __profile_stats_value(PR_VALUE_NT_TRANSACT_IOCTL, count) +#define NT_transact_ioctl_time __profile_stats_value(PR_VALUE_NT_TRANSACT_IOCTL, time) + + PR_VALUE_NT_TRANSACT_SET_SECURITY_DESC, +#define NT_transact_set_security_desc_count __profile_stats_value(PR_VALUE_NT_TRANSACT_SET_SECURITY_DESC, count) +#define NT_transact_set_security_desc_time __profile_stats_value(PR_VALUE_NT_TRANSACT_SET_SECURITY_DESC, time) + + PR_VALUE_NT_TRANSACT_NOTIFY_CHANGE, +#define NT_transact_notify_change_count __profile_stats_value(PR_VALUE_NT_TRANSACT_NOTIFY_CHANGE, count) +#define NT_transact_notify_change_time __profile_stats_value(PR_VALUE_NT_TRANSACT_NOTIFY_CHANGE, time) + + PR_VALUE_NT_TRANSACT_RENAME, +#define NT_transact_rename_count __profile_stats_value(PR_VALUE_NT_TRANSACT_RENAME, count) +#define NT_transact_rename_time __profile_stats_value(PR_VALUE_NT_TRANSACT_RENAME, time) + + PR_VALUE_NT_TRANSACT_QUERY_SECURITY_DESC, +#define NT_transact_query_security_desc_count __profile_stats_value(PR_VALUE_NT_TRANSACT_QUERY_SECURITY_DESC, count) +#define NT_transact_query_security_desc_time __profile_stats_value(PR_VALUE_NT_TRANSACT_QUERY_SECURITY_DESC, time) + + PR_VALUE_NT_TRANSACT_GET_USER_QUOTA, +#define NT_transact_get_user_quota_count __profile_stats_value(PR_VALUE_NT_TRANSACT_GET_USER_QUOTA, count) +#define NT_transact_get_user_quota_time __profile_stats_value(PR_VALUE_NT_TRANSACT_GET_USER_QUOTA, time) + + PR_VALUE_NT_TRANSACT_SET_USER_QUOTA, +#define NT_transact_set_user_quota_count __profile_stats_value(PR_VALUE_NT_TRANSACT_SET_USER_QUOTA, count) +#define NT_transact_set_user_quota_time __profile_stats_value(PR_VALUE_NT_TRANSACT_SET_USER_QUOTA, time) + +/* These are ACL manipulation calls */ + PR_VALUE_GET_NT_ACL, +#define get_nt_acl_count __profile_stats_value(PR_VALUE_GET_NT_ACL, count) +#define get_nt_acl_time __profile_stats_value(PR_VALUE_GET_NT_ACL, time) + + PR_VALUE_FGET_NT_ACL, +#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) + + PR_VALUE_CHMOD_ACL, +#define chmod_acl_count __profile_stats_value(PR_VALUE_CHMOD_ACL, count) +#define chmod_acl_time __profile_stats_value(PR_VALUE_CHMOD_ACL, time) + + PR_VALUE_FCHMOD_ACL, +#define fchmod_acl_count __profile_stats_value(PR_VALUE_FCHMOD_ACL, count) +#define fchmod_acl_time __profile_stats_value(PR_VALUE_FCHMOD_ACL, time) + +/* These are nmbd stats */ + PR_VALUE_NAME_RELEASE, +#define name_release_count __profile_stats_value(PR_VALUE_NAME_RELEASE, count) +#define name_release_time __profile_stats_value(PR_VALUE_NAME_RELEASE, time) + + PR_VALUE_NAME_REFRESH, +#define name_refresh_count __profile_stats_value(PR_VALUE_NAME_REFRESH, count) +#define name_refresh_time __profile_stats_value(PR_VALUE_NAME_REFRESH, time) + + PR_VALUE_NAME_REGISTRATION, +#define name_registration_count __profile_stats_value(PR_VALUE_NAME_REGISTRATION, count) +#define name_registration_time __profile_stats_value(PR_VALUE_NAME_REGISTRATION, time) + + PR_VALUE_NODE_STATUS, +#define node_status_count __profile_stats_value(PR_VALUE_NODE_STATUS, count) +#define node_status_time __profile_stats_value(PR_VALUE_NODE_STATUS, time) + + PR_VALUE_NAME_QUERY, +#define name_query_count __profile_stats_value(PR_VALUE_NAME_QUERY, count) +#define name_query_time __profile_stats_value(PR_VALUE_NAME_QUERY, time) + + PR_VALUE_HOST_ANNOUNCE, +#define host_announce_count __profile_stats_value(PR_VALUE_HOST_ANNOUNCE, count) +#define host_announce_time __profile_stats_value(PR_VALUE_HOST_ANNOUNCE, time) + + PR_VALUE_WORKGROUP_ANNOUNCE, +#define workgroup_announce_count __profile_stats_value(PR_VALUE_WORKGROUP_ANNOUNCE, count) +#define workgroup_announce_time __profile_stats_value(PR_VALUE_WORKGROUP_ANNOUNCE, time) + + PR_VALUE_LOCAL_MASTER_ANNOUNCE, +#define local_master_announce_count __profile_stats_value(PR_VALUE_LOCAL_MASTER_ANNOUNCE, count) +#define local_master_announce_time __profile_stats_value(PR_VALUE_LOCAL_MASTER_ANNOUNCE, time) + + PR_VALUE_MASTER_BROWSER_ANNOUNCE, +#define master_browser_announce_count __profile_stats_value(PR_VALUE_MASTER_BROWSER_ANNOUNCE, count) +#define master_browser_announce_time __profile_stats_value(PR_VALUE_MASTER_BROWSER_ANNOUNCE, time) + + PR_VALUE_LM_HOST_ANNOUNCE, +#define lm_host_announce_count __profile_stats_value(PR_VALUE_LM_HOST_ANNOUNCE, count) +#define lm_host_announce_time __profile_stats_value(PR_VALUE_LM_HOST_ANNOUNCE, time) + + PR_VALUE_GET_BACKUP_LIST, +#define get_backup_list_count __profile_stats_value(PR_VALUE_GET_BACKUP_LIST, count) +#define get_backup_list_time __profile_stats_value(PR_VALUE_GET_BACKUP_LIST, time) + + PR_VALUE_RESET_BROWSER, +#define reset_browser_count __profile_stats_value(PR_VALUE_RESET_BROWSER, count) +#define reset_browser_time __profile_stats_value(PR_VALUE_RESET_BROWSER, time) + + PR_VALUE_ANNOUNCE_REQUEST, +#define announce_request_count __profile_stats_value(PR_VALUE_ANNOUNCE_REQUEST, count) +#define announce_request_time __profile_stats_value(PR_VALUE_ANNOUNCE_REQUEST, time) + + PR_VALUE_LM_ANNOUNCE_REQUEST, +#define lm_announce_request_count __profile_stats_value(PR_VALUE_LM_ANNOUNCE_REQUEST, count) +#define lm_announce_request_time __profile_stats_value(PR_VALUE_LM_ANNOUNCE_REQUEST, time) + + PR_VALUE_DOMAIN_LOGON, +#define domain_logon_count __profile_stats_value(PR_VALUE_DOMAIN_LOGON, count) +#define domain_logon_time __profile_stats_value(PR_VALUE_DOMAIN_LOGON, time) + + PR_VALUE_SYNC_BROWSE_LISTS, +#define sync_browse_lists_count __profile_stats_value(PR_VALUE_SYNC_BROWSE_LISTS, count) +#define sync_browse_lists_time __profile_stats_value(PR_VALUE_SYNC_BROWSE_LISTS, time) + + PR_VALUE_RUN_ELECTIONS, +#define run_elections_count __profile_stats_value(PR_VALUE_RUN_ELECTIONS, count) +#define run_elections_time __profile_stats_value(PR_VALUE_RUN_ELECTIONS, time) + + PR_VALUE_ELECTION, +#define election_count __profile_stats_value(PR_VALUE_ELECTION, count) +#define election_time __profile_stats_value(PR_VALUE_ELECTION, time) + + /* This mist remain the last value. */ + PR_VALUE_MAX +}; /* enum profile_stats_values */ + +const char * profile_value_name(enum profile_stats_values val); + struct profile_stats { /* general counters */ unsigned smb_count; /* how many SMB packets we have processed */ unsigned uid_changes; /* how many times we change our effective uid */ -/* system call counters */ - unsigned syscall_opendir_count; - unsigned syscall_opendir_time; - unsigned syscall_readdir_count; - unsigned syscall_readdir_time; - unsigned syscall_seekdir_count; - unsigned syscall_seekdir_time; - unsigned syscall_telldir_count; - unsigned syscall_telldir_time; - unsigned syscall_rewinddir_count; - unsigned syscall_rewinddir_time; - unsigned syscall_mkdir_count; - unsigned syscall_mkdir_time; - unsigned syscall_rmdir_count; - unsigned syscall_rmdir_time; - unsigned syscall_closedir_count; - unsigned syscall_closedir_time; - unsigned syscall_open_count; - unsigned syscall_open_time; - unsigned syscall_close_count; - unsigned syscall_close_time; - unsigned syscall_read_count; - unsigned syscall_read_time; - unsigned syscall_read_bytes; /* bytes read with read syscall */ - unsigned syscall_pread_count; - unsigned syscall_pread_time; - unsigned syscall_pread_bytes; /* bytes read with pread syscall */ - unsigned syscall_write_count; - unsigned syscall_write_time; - unsigned syscall_write_bytes; /* bytes written with write syscall */ - unsigned syscall_pwrite_count; - unsigned syscall_pwrite_time; - unsigned syscall_pwrite_bytes; /* bytes written with pwrite syscall */ - unsigned syscall_lseek_count; - unsigned syscall_lseek_time; - unsigned syscall_sendfile_count; - unsigned syscall_sendfile_time; - unsigned syscall_sendfile_bytes; /* bytes read with sendfile syscall */ - unsigned syscall_rename_count; - unsigned syscall_rename_time; - unsigned syscall_fsync_count; - unsigned syscall_fsync_time; - unsigned syscall_stat_count; - unsigned syscall_stat_time; - unsigned syscall_fstat_count; - unsigned syscall_fstat_time; - unsigned syscall_lstat_count; - unsigned syscall_lstat_time; - unsigned syscall_unlink_count; - unsigned syscall_unlink_time; - unsigned syscall_chmod_count; - unsigned syscall_chmod_time; - unsigned syscall_fchmod_count; - unsigned syscall_fchmod_time; - unsigned syscall_chown_count; - unsigned syscall_chown_time; - unsigned syscall_fchown_count; - unsigned syscall_fchown_time; - unsigned syscall_chdir_count; - unsigned syscall_chdir_time; - unsigned syscall_getwd_count; - unsigned syscall_getwd_time; - unsigned syscall_utime_count; - unsigned syscall_utime_time; - unsigned syscall_ftruncate_count; - unsigned syscall_ftruncate_time; - unsigned syscall_fcntl_lock_count; - unsigned syscall_fcntl_lock_time; - unsigned syscall_fcntl_getlock_count; - unsigned syscall_fcntl_getlock_time; - unsigned syscall_readlink_count; - unsigned syscall_readlink_time; - unsigned syscall_symlink_count; - unsigned syscall_symlink_time; - unsigned syscall_link_count; - unsigned syscall_link_time; - unsigned syscall_mknod_count; - unsigned syscall_mknod_time; - unsigned syscall_realpath_count; - unsigned syscall_realpath_time; - unsigned syscall_get_quota_count; - unsigned syscall_get_quota_time; - unsigned syscall_set_quota_count; - unsigned syscall_set_quota_time; + +/* system call and protocol operation counters and cumulative times */ + unsigned count[PR_VALUE_MAX]; + unsigned time[PR_VALUE_MAX]; + +/* cumulative byte counts */ + unsigned syscall_pread_bytes; + unsigned syscall_pwrite_bytes; + unsigned syscall_read_bytes; + unsigned syscall_write_bytes; + unsigned syscall_sendfile_bytes; + /* stat cache counters */ unsigned statcache_lookups; unsigned statcache_misses; unsigned statcache_hits; + /* write cache counters */ unsigned writecache_read_hits; unsigned writecache_abutted_writes; @@ -133,265 +743,6 @@ struct profile_stats { unsigned writecache_num_perfect_writes; unsigned writecache_num_write_caches; unsigned writecache_allocated_write_caches; -/* counters for individual SMB types */ - unsigned SMBmkdir_count; /* create directory */ - unsigned SMBmkdir_time; - unsigned SMBrmdir_count; /* delete directory */ - unsigned SMBrmdir_time; - unsigned SMBopen_count; /* open file */ - unsigned SMBopen_time; - unsigned SMBcreate_count; /* create file */ - unsigned SMBcreate_time; - unsigned SMBclose_count; /* close file */ - unsigned SMBclose_time; - unsigned SMBflush_count; /* flush file */ - unsigned SMBflush_time; - unsigned SMBunlink_count; /* delete file */ - unsigned SMBunlink_time; - unsigned SMBmv_count; /* rename file */ - unsigned SMBmv_time; - unsigned SMBgetatr_count; /* get file attributes */ - unsigned SMBgetatr_time; - unsigned SMBsetatr_count; /* set file attributes */ - unsigned SMBsetatr_time; - unsigned SMBread_count; /* read from file */ - unsigned SMBread_time; - unsigned SMBwrite_count; /* write to file */ - unsigned SMBwrite_time; - unsigned SMBlock_count; /* lock byte range */ - unsigned SMBlock_time; - unsigned SMBunlock_count; /* unlock byte range */ - unsigned SMBunlock_time; - unsigned SMBctemp_count; /* create temporary file */ - unsigned SMBctemp_time; - /* SMBmknew stats are currently combined with SMBcreate */ - unsigned SMBmknew_count; /* make new file */ - unsigned SMBmknew_time; - unsigned SMBchkpth_count; /* check directory path */ - unsigned SMBchkpth_time; - unsigned SMBexit_count; /* process exit */ - unsigned SMBexit_time; - unsigned SMBlseek_count; /* seek */ - unsigned SMBlseek_time; - unsigned SMBlockread_count; /* Lock a range and read */ - unsigned SMBlockread_time; - unsigned SMBwriteunlock_count; /* Unlock a range then write */ - unsigned SMBwriteunlock_time; - unsigned SMBreadbraw_count; /* read a block of data with no smb header */ - unsigned SMBreadbraw_time; - unsigned SMBreadBmpx_count; /* read block multiplexed */ - unsigned SMBreadBmpx_time; - unsigned SMBreadBs_count; /* read block (secondary response) */ - unsigned SMBreadBs_time; - unsigned SMBwritebraw_count; /* write a block of data with no smb header */ - unsigned SMBwritebraw_time; - unsigned SMBwriteBmpx_count; /* write block multiplexed */ - unsigned SMBwriteBmpx_time; - unsigned SMBwriteBs_count; /* write block (secondary request) */ - unsigned SMBwriteBs_time; - unsigned SMBwritec_count; /* secondary write request */ - unsigned SMBwritec_time; - unsigned SMBsetattrE_count; /* set file attributes expanded */ - unsigned SMBsetattrE_time; - unsigned SMBgetattrE_count; /* get file attributes expanded */ - unsigned SMBgetattrE_time; - unsigned SMBlockingX_count; /* lock/unlock byte ranges and X */ - unsigned SMBlockingX_time; - unsigned SMBtrans_count; /* transaction - name, bytes in/out */ - unsigned SMBtrans_time; - unsigned SMBtranss_count; /* transaction (secondary request/response) */ - unsigned SMBtranss_time; - unsigned SMBioctl_count; /* IOCTL */ - unsigned SMBioctl_time; - unsigned SMBioctls_count; /* IOCTL (secondary request/response) */ - unsigned SMBioctls_time; - unsigned SMBcopy_count; /* copy */ - unsigned SMBcopy_time; - unsigned SMBmove_count; /* move */ - unsigned SMBmove_time; - unsigned SMBecho_count; /* echo */ - unsigned SMBecho_time; - unsigned SMBwriteclose_count; /* write a file then close it */ - unsigned SMBwriteclose_time; - unsigned SMBopenX_count; /* open and X */ - unsigned SMBopenX_time; - unsigned SMBreadX_count; /* read and X */ - unsigned SMBreadX_time; - unsigned SMBwriteX_count; /* write and X */ - unsigned SMBwriteX_time; - unsigned SMBtrans2_count; /* TRANS2 protocol set */ - unsigned SMBtrans2_time; - unsigned SMBtranss2_count; /* TRANS2 protocol set, secondary command */ - unsigned SMBtranss2_time; - unsigned SMBfindclose_count; /* Terminate a TRANSACT2_FINDFIRST */ - unsigned SMBfindclose_time; - unsigned SMBfindnclose_count; /* Terminate a TRANSACT2_FINDNOTIFYFIRST */ - unsigned SMBfindnclose_time; - unsigned SMBtcon_count; /* tree connect */ - unsigned SMBtcon_time; - unsigned SMBtdis_count; /* tree disconnect */ - unsigned SMBtdis_time; - unsigned SMBnegprot_count; /* negotiate protocol */ - unsigned SMBnegprot_time; - unsigned SMBsesssetupX_count; /* Session Set Up & X (including User Logon) */ - unsigned SMBsesssetupX_time; - unsigned SMBulogoffX_count; /* user logoff */ - unsigned SMBulogoffX_time; - unsigned SMBtconX_count; /* tree connect and X*/ - unsigned SMBtconX_time; - unsigned SMBdskattr_count; /* get disk attributes */ - unsigned SMBdskattr_time; - unsigned SMBsearch_count; /* search directory */ - unsigned SMBsearch_time; - /* SBMffirst stats combined with SMBsearch */ - unsigned SMBffirst_count; /* find first */ - unsigned SMBffirst_time; - /* SBMfunique stats combined with SMBsearch */ - unsigned SMBfunique_count; /* find unique */ - unsigned SMBfunique_time; - unsigned SMBfclose_count; /* find close */ - unsigned SMBfclose_time; - unsigned SMBnttrans_count; /* NT transact */ - unsigned SMBnttrans_time; - unsigned SMBnttranss_count; /* NT transact secondary */ - unsigned SMBnttranss_time; - unsigned SMBntcreateX_count; /* NT create and X */ - unsigned SMBntcreateX_time; - unsigned SMBntcancel_count; /* NT cancel */ - unsigned SMBntcancel_time; - unsigned SMBntrename_count; /* NT rename file */ - unsigned SMBntrename_time; - unsigned SMBsplopen_count; /* open print spool file */ - unsigned SMBsplopen_time; - unsigned SMBsplwr_count; /* write to print spool file */ - unsigned SMBsplwr_time; - unsigned SMBsplclose_count; /* close print spool file */ - unsigned SMBsplclose_time; - unsigned SMBsplretq_count; /* return print queue */ - unsigned SMBsplretq_time; - unsigned SMBsends_count; /* send single block message */ - unsigned SMBsends_time; - unsigned SMBsendb_count; /* send broadcast message */ - unsigned SMBsendb_time; - unsigned SMBfwdname_count; /* forward user name */ - unsigned SMBfwdname_time; - unsigned SMBcancelf_count; /* cancel forward */ - unsigned SMBcancelf_time; - unsigned SMBgetmac_count; /* get machine name */ - unsigned SMBgetmac_time; - unsigned SMBsendstrt_count; /* send start of multi-block message */ - unsigned SMBsendstrt_time; - unsigned SMBsendend_count; /* send end of multi-block message */ - unsigned SMBsendend_time; - unsigned SMBsendtxt_count; /* send text of multi-block message */ - unsigned SMBsendtxt_time; - unsigned SMBinvalid_count; /* invalid command */ - unsigned SMBinvalid_time; -/* Pathworks setdir command */ - unsigned pathworks_setdir_count; - unsigned pathworks_setdir_time; -/* These are the TRANS2 sub commands */ - unsigned Trans2_open_count; - unsigned Trans2_open_time; - unsigned Trans2_findfirst_count; - unsigned Trans2_findfirst_time; - unsigned Trans2_findnext_count; - unsigned Trans2_findnext_time; - unsigned Trans2_qfsinfo_count; - unsigned Trans2_qfsinfo_time; - unsigned Trans2_setfsinfo_count; - unsigned Trans2_setfsinfo_time; - unsigned Trans2_qpathinfo_count; - unsigned Trans2_qpathinfo_time; - unsigned Trans2_setpathinfo_count; - unsigned Trans2_setpathinfo_time; - unsigned Trans2_qfileinfo_count; - unsigned Trans2_qfileinfo_time; - unsigned Trans2_setfileinfo_count; - unsigned Trans2_setfileinfo_time; - unsigned Trans2_fsctl_count; - unsigned Trans2_fsctl_time; - unsigned Trans2_ioctl_count; - unsigned Trans2_ioctl_time; - unsigned Trans2_findnotifyfirst_count; - unsigned Trans2_findnotifyfirst_time; - unsigned Trans2_findnotifynext_count; - unsigned Trans2_findnotifynext_time; - unsigned Trans2_mkdir_count; - unsigned Trans2_mkdir_time; - unsigned Trans2_session_setup_count; - unsigned Trans2_session_setup_time; - unsigned Trans2_get_dfs_referral_count; - unsigned Trans2_get_dfs_referral_time; - unsigned Trans2_report_dfs_inconsistancy_count; - unsigned Trans2_report_dfs_inconsistancy_time; -/* These are the NT transact sub commands. */ - unsigned NT_transact_create_count; - unsigned NT_transact_create_time; - unsigned NT_transact_ioctl_count; - unsigned NT_transact_ioctl_time; - unsigned NT_transact_set_security_desc_count; - unsigned NT_transact_set_security_desc_time; - unsigned NT_transact_notify_change_count; - unsigned NT_transact_notify_change_time; - unsigned NT_transact_rename_count; - unsigned NT_transact_rename_time; - unsigned NT_transact_query_security_desc_count; - unsigned NT_transact_query_security_desc_time; - unsigned NT_transact_get_user_quota_count; - unsigned NT_transact_get_user_quota_time; - unsigned NT_transact_set_user_quota_count; - unsigned NT_transact_set_user_quota_time; -/* These are ACL manipulation calls */ - unsigned get_nt_acl_count; - unsigned get_nt_acl_time; - unsigned fget_nt_acl_count; - unsigned fget_nt_acl_time; - unsigned set_nt_acl_count; - unsigned set_nt_acl_time; - unsigned fset_nt_acl_count; - unsigned fset_nt_acl_time; - unsigned chmod_acl_count; - unsigned chmod_acl_time; - unsigned fchmod_acl_count; - unsigned fchmod_acl_time; -/* These are nmbd stats */ - unsigned name_release_count; - unsigned name_release_time; - unsigned name_refresh_count; - unsigned name_refresh_time; - unsigned name_registration_count; - unsigned name_registration_time; - unsigned node_status_count; - unsigned node_status_time; - unsigned name_query_count; - unsigned name_query_time; - unsigned host_announce_count; - unsigned host_announce_time; - unsigned workgroup_announce_count; - unsigned workgroup_announce_time; - unsigned local_master_announce_count; - unsigned local_master_announce_time; - unsigned master_browser_announce_count; - unsigned master_browser_announce_time; - unsigned lm_host_announce_count; - unsigned lm_host_announce_time; - unsigned get_backup_list_count; - unsigned get_backup_list_time; - unsigned reset_browser_count; - unsigned reset_browser_time; - unsigned announce_request_count; - unsigned announce_request_time; - unsigned lm_announce_request_count; - unsigned lm_announce_request_time; - unsigned domain_logon_count; - unsigned domain_logon_time; - unsigned sync_browse_lists_count; - unsigned sync_browse_lists_time; - unsigned run_elections_count; - unsigned run_elections_time; - unsigned election_count; - unsigned election_time; }; struct profile_header { -- cgit From 4fe70bcee2ec8515f123d8c826631b54bbf793e7 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Thu, 9 Nov 2006 20:29:31 +0000 Subject: r19647: Add some GPFS support in a vfs mod. Also adds the kernel flock op to the vfs layer, since gpfs supports it. Thanks to Volker, Christian, Mathias, Chetan, and Peter. (This used to be commit 0620658890fa9c68a9848538728023192319c81a) --- source3/include/smbprofile.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index d29f066796..39f02ec9f5 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -164,6 +164,10 @@ enum profile_stats_values #define syscall_fcntl_lock_count __profile_stats_value(PR_VALUE_SYSCALL_FCNTL_LOCK, count) #define syscall_fcntl_lock_time __profile_stats_value(PR_VALUE_SYSCALL_FCNTL_LOCK, time) + PR_VALUE_SYSCALL_KERNEL_FLOCK, +#define syscall_kernel_flock_count __profile_stats_value(PR_VALUE_SYSCALL_KERNEL_FLOCK, count) +#define syscall_kernel_flock_time __profile_stats_value(PR_VALUE_SYSCALL_KERNEL_FLOCK, time) + PR_VALUE_SYSCALL_FCNTL_GETLOCK, #define syscall_fcntl_getlock_count __profile_stats_value(PR_VALUE_SYSCALL_FCNTL_GETLOCK, count) #define syscall_fcntl_getlock_time __profile_stats_value(PR_VALUE_SYSCALL_FCNTL_GETLOCK, time) -- cgit From ab46f9cdd232cc08b4c2f57c3fe7add652f6ce38 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 13 Jan 2007 22:10:18 +0000 Subject: r20742: Rename chkpth -> checkpath for sanity's sake :-). Start removing unneeded "BOOL ok" from this reply.c (this logic is old, old, old..... :-). Jeremy. (This used to be commit 3d52268095c605a80dfcd371769198a332baa0a5) --- source3/include/smbprofile.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index 39f02ec9f5..867f87515e 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -266,9 +266,9 @@ enum profile_stats_values #define SMBmknew_count __profile_stats_value(PR_VALUE_SMBMKNEW, count) #define SMBmknew_time __profile_stats_value(PR_VALUE_SMBMKNEW, time) - PR_VALUE_SMBCHKPTH, -#define SMBchkpth_count __profile_stats_value(PR_VALUE_SMBCHKPTH, count) -#define SMBchkpth_time __profile_stats_value(PR_VALUE_SMBCHKPTH, time) + PR_VALUE_SMBCHECKPATH, +#define SMBcheckpath_count __profile_stats_value(PR_VALUE_SMBCHECKPATH, count) +#define SMBcheckpath_time __profile_stats_value(PR_VALUE_SMBCHECKPATH, time) PR_VALUE_SMBEXIT, #define SMBexit_count __profile_stats_value(PR_VALUE_SMBEXIT, count) -- cgit From 109bebe1f877ab2981a5c0d14ad0982a62436520 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Wed, 24 Jan 2007 14:53:03 +0000 Subject: r21002: Get rid of unused macros - merge change from 3_0_24 (This used to be commit 9d23cf0cc4a8974bf0cf74b219a1138383083360) --- source3/include/smbprofile.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index 867f87515e..48a44948dc 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -757,10 +757,6 @@ struct profile_header { extern struct profile_header *profile_h; extern struct profile_stats *profile_p; -extern struct timeval profile_starttime; -extern struct timeval profile_endtime; -extern struct timeval profile_starttime_nested; -extern struct timeval profile_endtime_nested; extern BOOL do_profile_flag; extern BOOL do_profile_times; @@ -846,8 +842,6 @@ static inline SMB_BIG_UINT profile_timestamp(void) profile_timestamp() - __profstamp_##x); \ } -#define START_PROFILE_NESTED(x) START_PROFILE(x) -#define END_PROFILE_NESTED(x) END_PROFILE(x) #else /* WITH_PROFILE */ @@ -856,10 +850,8 @@ static inline SMB_BIG_UINT profile_timestamp(void) #define DO_PROFILE_DEC_INC(x,y) #define DO_PROFILE_ADD(x,n) #define START_PROFILE(x) -#define START_PROFILE_NESTED(x) #define START_PROFILE_BYTES(x,n) #define END_PROFILE(x) -#define END_PROFILE_NESTED(x) #endif /* WITH_PROFILE */ -- cgit From 5a052edf031d2c02b018743f0947a12b4df16c2d Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Wed, 14 Feb 2007 02:37:14 +0000 Subject: r21324: Add linux setlease to the vfs layer. Next round, as Volker points out, it should be abstracted a little higher up so other os'es can have an entry, but it will take a bit more work. Thanks to Chetan Shringarpure and Mathias Dietz. I didn't increment the vfs number again because the kernel change notify stuff hasn't been released yet anyway. (This used to be commit 9463211bf3b46ee408b88dfbf42d498e3839d4cc) --- source3/include/smbprofile.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index 48a44948dc..fa7c6e4a5a 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -168,6 +168,10 @@ enum profile_stats_values #define syscall_kernel_flock_count __profile_stats_value(PR_VALUE_SYSCALL_KERNEL_FLOCK, count) #define syscall_kernel_flock_time __profile_stats_value(PR_VALUE_SYSCALL_KERNEL_FLOCK, time) + PR_VALUE_SYSCALL_LINUX_SETLEASE, +#define syscall_linux_setlease_count __profile_stats_value(PR_VALUE_SYSCALL_LINUX_SETLEASE, count) +#define syscall_linux_setlease_time __profile_stats_value(PR_VALUE_SYSCALL_LINUX_SETLEASE, time) + PR_VALUE_SYSCALL_FCNTL_GETLOCK, #define syscall_fcntl_getlock_count __profile_stats_value(PR_VALUE_SYSCALL_FCNTL_GETLOCK, count) #define syscall_fcntl_getlock_time __profile_stats_value(PR_VALUE_SYSCALL_FCNTL_GETLOCK, time) -- cgit From 4952fe368a40b239140b3035db6075427d237bb9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 5 Mar 2007 23:40:03 +0000 Subject: r21714: Change the VFS interface to use struct timespec for utimes - change the call to ntimes. This preserves nsec timestamps we get from stat (if the system supports it) and only maps back down to usec or sec resolution on time set. Looks bigger than it is as I had to move lots of internal code from using time_t and struct utimebuf to struct timespec. Jeremy. (This used to be commit 8f3d530c5a748ea90f42ed8fbe68ae92178d4875) --- source3/include/smbprofile.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index fa7c6e4a5a..cc501739c1 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -152,9 +152,9 @@ enum profile_stats_values #define syscall_getwd_count __profile_stats_value(PR_VALUE_SYSCALL_GETWD, count) #define syscall_getwd_time __profile_stats_value(PR_VALUE_SYSCALL_GETWD, time) - PR_VALUE_SYSCALL_UTIME, -#define syscall_utime_count __profile_stats_value(PR_VALUE_SYSCALL_UTIME, count) -#define syscall_utime_time __profile_stats_value(PR_VALUE_SYSCALL_UTIME, time) + PR_VALUE_SYSCALL_NTIMES, +#define syscall_ntimes_count __profile_stats_value(PR_VALUE_SYSCALL_NTIMES, count) +#define syscall_ntimes_time __profile_stats_value(PR_VALUE_SYSCALL_NTIMES, time) PR_VALUE_SYSCALL_FTRUNCATE, #define syscall_ftruncate_count __profile_stats_value(PR_VALUE_SYSCALL_FTRUNCATE, count) -- cgit From 57d6318a0b5ecc0154547a04acef8ac222c1d28f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 23 May 2007 23:55:12 +0000 Subject: r23105: Add lchown to the vfs layer. We need this in the POSIX code. Jeremy. (This used to be commit 932523cbb508db869b726768e86bfa8e248f768b) --- source3/include/smbprofile.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index cc501739c1..7b04a185b4 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -144,6 +144,10 @@ enum profile_stats_values #define syscall_fchown_count __profile_stats_value(PR_VALUE_SYSCALL_FCHOWN, count) #define syscall_fchown_time __profile_stats_value(PR_VALUE_SYSCALL_FCHOWN, time) + PR_VALUE_SYSCALL_LCHOWN, +#define syscall_lchown_count __profile_stats_value(PR_VALUE_SYSCALL_LCHOWN, count) +#define syscall_lchown_time __profile_stats_value(PR_VALUE_SYSCALL_LCHOWN, time) + PR_VALUE_SYSCALL_CHDIR, #define syscall_chdir_count __profile_stats_value(PR_VALUE_SYSCALL_CHDIR, count) #define syscall_chdir_time __profile_stats_value(PR_VALUE_SYSCALL_CHDIR, time) -- cgit From d824b98f80ba186030cbb70b3a1e5daf80469ecd Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 9 Jul 2007 19:25:36 +0000 Subject: r23779: Change from v2 or later to v3 or later. Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3) --- source3/include/smbprofile.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index 7b04a185b4..1635f913a7 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -8,7 +8,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -- cgit From 5e54558c6dea67b56bbfaba5698f3a434d3dffb6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 00:52:41 +0000 Subject: r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text (This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07) --- source3/include/smbprofile.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index 1635f913a7..2c25a69601 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -17,8 +17,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ -- cgit From 30191d1a5704ad2b158386b511558972d539ce47 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Oct 2007 17:40:25 -0700 Subject: RIP BOOL. Convert BOOL -> bool. I found a few interesting bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f) --- source3/include/smbprofile.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index 2c25a69601..c89815598b 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -764,8 +764,8 @@ struct profile_header { extern struct profile_header *profile_h; extern struct profile_stats *profile_p; -extern BOOL do_profile_flag; -extern BOOL do_profile_times; +extern bool do_profile_flag; +extern bool do_profile_times; #ifdef WITH_PROFILE -- cgit From 488b59cfac244ec8cfc60df687fcd153d693509c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 29 Oct 2007 17:16:13 -0700 Subject: Add in the recvfile entry to the VFS layer with a default implementation. Needed for the zero-copy write code. Jeremy. (This used to be commit bfbdb6324c5d13bfde8b742e9c5a0e0c9092bd86) --- source3/include/smbprofile.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index c89815598b..acd8460965 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -103,6 +103,10 @@ 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) -- cgit From 92d8a53b4597487fb8d23a8b2334d854c87ad7e3 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 1 Nov 2007 10:21:27 -0700 Subject: Add missing recvfile_bytes element - noticed by Kukks. Jeremy. (This used to be commit 5cf2811e8e1d9e6a1114bbdff89c333d5b374282) --- source3/include/smbprofile.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index acd8460965..864f2bf90f 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -741,6 +741,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; -- cgit From 00b2cdf75e9bea25034440054b4acd91a179c86d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 8 May 2008 18:09:07 -0700 Subject: Yay ! Remove a VFS entry. Removed the set_nt_acl() call, this can only be done via fset_nt_acl() using an open file/directory handle. I'd like to do the same with get_nt_acl() but am concerned about efficiency problems with "hide unreadable/hide unwritable" when doing a directory listing (this would mean opening every file in the dir on list). Moving closer to rationalizing the ACL model and maybe moving the POSIX calls into a posix_acl VFS module rather than having them as first class citizens of the VFS. Jeremy. (This used to be commit f487f742cb903a06fbf2be006ddc9ce9063339ed) --- source3/include/smbprofile.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source3/include/smbprofile.h') diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index 864f2bf90f..f58a6452bf 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -631,10 +631,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) -- cgit