00001 #ifndef _PROFILE_H_
00002 #define _PROFILE_H_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #define PROF_SHMEM_KEY ((key_t)0x07021999)
00029 #define PROF_SHM_MAGIC 0x6349985
00030 #define PROF_SHM_VERSION 11
00031
00032
00033
00034 #define __profile_stats_value(which, domain) domain[which]
00035
00036 enum profile_stats_values
00037 {
00038 PR_VALUE_SMBD_IDLE = 0,
00039 #define smbd_idle_count __profile_stats_value(PR_VALUE_SMBD_IDLE, count)
00040 #define smbd_idle_time __profile_stats_value(PR_VALUE_SMBD_IDLE, time)
00041
00042
00043 PR_VALUE_SYSCALL_OPENDIR,
00044 #define syscall_opendir_count __profile_stats_value(PR_VALUE_SYSCALL_OPENDIR, count)
00045 #define syscall_opendir_time __profile_stats_value(PR_VALUE_SYSCALL_OPENDIR, time)
00046
00047 PR_VALUE_SYSCALL_READDIR,
00048 #define syscall_readdir_count __profile_stats_value(PR_VALUE_SYSCALL_READDIR, count)
00049 #define syscall_readdir_time __profile_stats_value(PR_VALUE_SYSCALL_READDIR, time)
00050
00051 PR_VALUE_SYSCALL_SEEKDIR,
00052 #define syscall_seekdir_count __profile_stats_value(PR_VALUE_SYSCALL_SEEKDIR, count)
00053 #define syscall_seekdir_time __profile_stats_value(PR_VALUE_SYSCALL_SEEKDIR, time)
00054
00055 PR_VALUE_SYSCALL_TELLDIR,
00056 #define syscall_telldir_count __profile_stats_value(PR_VALUE_SYSCALL_TELLDIR, count)
00057 #define syscall_telldir_time __profile_stats_value(PR_VALUE_SYSCALL_TELLDIR, time)
00058
00059 PR_VALUE_SYSCALL_REWINDDIR,
00060 #define syscall_rewinddir_count __profile_stats_value(PR_VALUE_SYSCALL_REWINDDIR, count)
00061 #define syscall_rewinddir_time __profile_stats_value(PR_VALUE_SYSCALL_REWINDDIR, time)
00062
00063 PR_VALUE_SYSCALL_MKDIR,
00064 #define syscall_mkdir_count __profile_stats_value(PR_VALUE_SYSCALL_MKDIR, count)
00065 #define syscall_mkdir_time __profile_stats_value(PR_VALUE_SYSCALL_MKDIR, time)
00066
00067 PR_VALUE_SYSCALL_RMDIR,
00068 #define syscall_rmdir_count __profile_stats_value(PR_VALUE_SYSCALL_RMDIR, count)
00069 #define syscall_rmdir_time __profile_stats_value(PR_VALUE_SYSCALL_RMDIR, time)
00070
00071 PR_VALUE_SYSCALL_CLOSEDIR,
00072 #define syscall_closedir_count __profile_stats_value(PR_VALUE_SYSCALL_CLOSEDIR, count)
00073 #define syscall_closedir_time __profile_stats_value(PR_VALUE_SYSCALL_CLOSEDIR, time)
00074
00075 PR_VALUE_SYSCALL_OPEN,
00076 #define syscall_open_count __profile_stats_value(PR_VALUE_SYSCALL_OPEN, count)
00077 #define syscall_open_time __profile_stats_value(PR_VALUE_SYSCALL_OPEN, time)
00078
00079 PR_VALUE_SYSCALL_CLOSE,
00080 #define syscall_close_count __profile_stats_value(PR_VALUE_SYSCALL_CLOSE, count)
00081 #define syscall_close_time __profile_stats_value(PR_VALUE_SYSCALL_CLOSE, time)
00082
00083 PR_VALUE_SYSCALL_READ,
00084 #define syscall_read_count __profile_stats_value(PR_VALUE_SYSCALL_READ, count)
00085 #define syscall_read_time __profile_stats_value(PR_VALUE_SYSCALL_READ, time)
00086
00087 PR_VALUE_SYSCALL_PREAD,
00088 #define syscall_pread_count __profile_stats_value(PR_VALUE_SYSCALL_PREAD, count)
00089 #define syscall_pread_time __profile_stats_value(PR_VALUE_SYSCALL_PREAD, time)
00090
00091 PR_VALUE_SYSCALL_WRITE,
00092 #define syscall_write_count __profile_stats_value(PR_VALUE_SYSCALL_WRITE, count)
00093 #define syscall_write_time __profile_stats_value(PR_VALUE_SYSCALL_WRITE, time)
00094
00095 PR_VALUE_SYSCALL_PWRITE,
00096 #define syscall_pwrite_count __profile_stats_value(PR_VALUE_SYSCALL_PWRITE, count)
00097 #define syscall_pwrite_time __profile_stats_value(PR_VALUE_SYSCALL_PWRITE, time)
00098
00099 PR_VALUE_SYSCALL_LSEEK,
00100 #define syscall_lseek_count __profile_stats_value(PR_VALUE_SYSCALL_LSEEK, count)
00101 #define syscall_lseek_time __profile_stats_value(PR_VALUE_SYSCALL_LSEEK, time)
00102
00103 PR_VALUE_SYSCALL_SENDFILE,
00104 #define syscall_sendfile_count __profile_stats_value(PR_VALUE_SYSCALL_SENDFILE, count)
00105 #define syscall_sendfile_time __profile_stats_value(PR_VALUE_SYSCALL_SENDFILE, time)
00106
00107 PR_VALUE_SYSCALL_RENAME,
00108 #define syscall_rename_count __profile_stats_value(PR_VALUE_SYSCALL_RENAME, count)
00109 #define syscall_rename_time __profile_stats_value(PR_VALUE_SYSCALL_RENAME, time)
00110
00111 PR_VALUE_SYSCALL_FSYNC,
00112 #define syscall_fsync_count __profile_stats_value(PR_VALUE_SYSCALL_FSYNC, count)
00113 #define syscall_fsync_time __profile_stats_value(PR_VALUE_SYSCALL_FSYNC, time)
00114
00115 PR_VALUE_SYSCALL_STAT,
00116 #define syscall_stat_count __profile_stats_value(PR_VALUE_SYSCALL_STAT, count)
00117 #define syscall_stat_time __profile_stats_value(PR_VALUE_SYSCALL_STAT, time)
00118
00119 PR_VALUE_SYSCALL_FSTAT,
00120 #define syscall_fstat_count __profile_stats_value(PR_VALUE_SYSCALL_FSTAT, count)
00121 #define syscall_fstat_time __profile_stats_value(PR_VALUE_SYSCALL_FSTAT, time)
00122
00123 PR_VALUE_SYSCALL_LSTAT,
00124 #define syscall_lstat_count __profile_stats_value(PR_VALUE_SYSCALL_LSTAT, count)
00125 #define syscall_lstat_time __profile_stats_value(PR_VALUE_SYSCALL_LSTAT, time)
00126
00127 PR_VALUE_SYSCALL_UNLINK,
00128 #define syscall_unlink_count __profile_stats_value(PR_VALUE_SYSCALL_UNLINK, count)
00129 #define syscall_unlink_time __profile_stats_value(PR_VALUE_SYSCALL_UNLINK, time)
00130
00131 PR_VALUE_SYSCALL_CHMOD,
00132 #define syscall_chmod_count __profile_stats_value(PR_VALUE_SYSCALL_CHMOD, count)
00133 #define syscall_chmod_time __profile_stats_value(PR_VALUE_SYSCALL_CHMOD, time)
00134
00135 PR_VALUE_SYSCALL_FCHMOD,
00136 #define syscall_fchmod_count __profile_stats_value(PR_VALUE_SYSCALL_FCHMOD, count)
00137 #define syscall_fchmod_time __profile_stats_value(PR_VALUE_SYSCALL_FCHMOD, time)
00138
00139 PR_VALUE_SYSCALL_CHOWN,
00140 #define syscall_chown_count __profile_stats_value(PR_VALUE_SYSCALL_CHOWN, count)
00141 #define syscall_chown_time __profile_stats_value(PR_VALUE_SYSCALL_CHOWN, time)
00142
00143 PR_VALUE_SYSCALL_FCHOWN,
00144 #define syscall_fchown_count __profile_stats_value(PR_VALUE_SYSCALL_FCHOWN, count)
00145 #define syscall_fchown_time __profile_stats_value(PR_VALUE_SYSCALL_FCHOWN, time)
00146
00147 PR_VALUE_SYSCALL_CHDIR,
00148 #define syscall_chdir_count __profile_stats_value(PR_VALUE_SYSCALL_CHDIR, count)
00149 #define syscall_chdir_time __profile_stats_value(PR_VALUE_SYSCALL_CHDIR, time)
00150
00151 PR_VALUE_SYSCALL_GETWD,
00152 #define syscall_getwd_count __profile_stats_value(PR_VALUE_SYSCALL_GETWD, count)
00153 #define syscall_getwd_time __profile_stats_value(PR_VALUE_SYSCALL_GETWD, time)
00154
00155 PR_VALUE_SYSCALL_NTIMES,
00156 #define syscall_ntimes_count __profile_stats_value(PR_VALUE_SYSCALL_NTIMES, count)
00157 #define syscall_ntimes_time __profile_stats_value(PR_VALUE_SYSCALL_NTIMES, time)
00158
00159 PR_VALUE_SYSCALL_FTRUNCATE,
00160 #define syscall_ftruncate_count __profile_stats_value(PR_VALUE_SYSCALL_FTRUNCATE, count)
00161 #define syscall_ftruncate_time __profile_stats_value(PR_VALUE_SYSCALL_FTRUNCATE, time)
00162
00163 PR_VALUE_SYSCALL_FCNTL_LOCK,
00164 #define syscall_fcntl_lock_count __profile_stats_value(PR_VALUE_SYSCALL_FCNTL_LOCK, count)
00165 #define syscall_fcntl_lock_time __profile_stats_value(PR_VALUE_SYSCALL_FCNTL_LOCK, time)
00166
00167 PR_VALUE_SYSCALL_KERNEL_FLOCK,
00168 #define syscall_kernel_flock_count __profile_stats_value(PR_VALUE_SYSCALL_KERNEL_FLOCK, count)
00169 #define syscall_kernel_flock_time __profile_stats_value(PR_VALUE_SYSCALL_KERNEL_FLOCK, time)
00170
00171 PR_VALUE_SYSCALL_LINUX_SETLEASE,
00172 #define syscall_linux_setlease_count __profile_stats_value(PR_VALUE_SYSCALL_LINUX_SETLEASE, count)
00173 #define syscall_linux_setlease_time __profile_stats_value(PR_VALUE_SYSCALL_LINUX_SETLEASE, time)
00174
00175 PR_VALUE_SYSCALL_FCNTL_GETLOCK,
00176 #define syscall_fcntl_getlock_count __profile_stats_value(PR_VALUE_SYSCALL_FCNTL_GETLOCK, count)
00177 #define syscall_fcntl_getlock_time __profile_stats_value(PR_VALUE_SYSCALL_FCNTL_GETLOCK, time)
00178
00179 PR_VALUE_SYSCALL_READLINK,
00180 #define syscall_readlink_count __profile_stats_value(PR_VALUE_SYSCALL_READLINK, count)
00181 #define syscall_readlink_time __profile_stats_value(PR_VALUE_SYSCALL_READLINK, time)
00182
00183 PR_VALUE_SYSCALL_SYMLINK,
00184 #define syscall_symlink_count __profile_stats_value(PR_VALUE_SYSCALL_SYMLINK, count)
00185 #define syscall_symlink_time __profile_stats_value(PR_VALUE_SYSCALL_SYMLINK, time)
00186
00187 PR_VALUE_SYSCALL_LINK,
00188 #define syscall_link_count __profile_stats_value(PR_VALUE_SYSCALL_LINK, count)
00189 #define syscall_link_time __profile_stats_value(PR_VALUE_SYSCALL_LINK, time)
00190
00191 PR_VALUE_SYSCALL_MKNOD,
00192 #define syscall_mknod_count __profile_stats_value(PR_VALUE_SYSCALL_MKNOD, count)
00193 #define syscall_mknod_time __profile_stats_value(PR_VALUE_SYSCALL_MKNOD, time)
00194
00195 PR_VALUE_SYSCALL_REALPATH,
00196 #define syscall_realpath_count __profile_stats_value(PR_VALUE_SYSCALL_REALPATH, count)
00197 #define syscall_realpath_time __profile_stats_value(PR_VALUE_SYSCALL_REALPATH, time)
00198
00199 PR_VALUE_SYSCALL_GET_QUOTA,
00200 #define syscall_get_quota_count __profile_stats_value(PR_VALUE_SYSCALL_GET_QUOTA, count)
00201 #define syscall_get_quota_time __profile_stats_value(PR_VALUE_SYSCALL_GET_QUOTA, time)
00202
00203 PR_VALUE_SYSCALL_SET_QUOTA,
00204 #define syscall_set_quota_count __profile_stats_value(PR_VALUE_SYSCALL_SET_QUOTA, count)
00205 #define syscall_set_quota_time __profile_stats_value(PR_VALUE_SYSCALL_SET_QUOTA, time)
00206
00207
00208 PR_VALUE_SMBMKDIR,
00209 #define SMBmkdir_count __profile_stats_value(PR_VALUE_SMBMKDIR, count)
00210 #define SMBmkdir_time __profile_stats_value(PR_VALUE_SMBMKDIR, time)
00211
00212 PR_VALUE_SMBRMDIR,
00213 #define SMBrmdir_count __profile_stats_value(PR_VALUE_SMBRMDIR, count)
00214 #define SMBrmdir_time __profile_stats_value(PR_VALUE_SMBRMDIR, time)
00215
00216 PR_VALUE_SMBOPEN,
00217 #define SMBopen_count __profile_stats_value(PR_VALUE_SMBOPEN, count)
00218 #define SMBopen_time __profile_stats_value(PR_VALUE_SMBOPEN, time)
00219
00220 PR_VALUE_SMBCREATE,
00221 #define SMBcreate_count __profile_stats_value(PR_VALUE_SMBCREATE, count)
00222 #define SMBcreate_time __profile_stats_value(PR_VALUE_SMBCREATE, time)
00223
00224 PR_VALUE_SMBCLOSE,
00225 #define SMBclose_count __profile_stats_value(PR_VALUE_SMBCLOSE, count)
00226 #define SMBclose_time __profile_stats_value(PR_VALUE_SMBCLOSE, time)
00227
00228 PR_VALUE_SMBFLUSH,
00229 #define SMBflush_count __profile_stats_value(PR_VALUE_SMBFLUSH, count)
00230 #define SMBflush_time __profile_stats_value(PR_VALUE_SMBFLUSH, time)
00231
00232 PR_VALUE_SMBUNLINK,
00233 #define SMBunlink_count __profile_stats_value(PR_VALUE_SMBUNLINK, count)
00234 #define SMBunlink_time __profile_stats_value(PR_VALUE_SMBUNLINK, time)
00235
00236 PR_VALUE_SMBMV,
00237 #define SMBmv_count __profile_stats_value(PR_VALUE_SMBMV, count)
00238 #define SMBmv_time __profile_stats_value(PR_VALUE_SMBMV, time)
00239
00240 PR_VALUE_SMBGETATR,
00241 #define SMBgetatr_count __profile_stats_value(PR_VALUE_SMBGETATR, count)
00242 #define SMBgetatr_time __profile_stats_value(PR_VALUE_SMBGETATR, time)
00243
00244 PR_VALUE_SMBSETATR,
00245 #define SMBsetatr_count __profile_stats_value(PR_VALUE_SMBSETATR, count)
00246 #define SMBsetatr_time __profile_stats_value(PR_VALUE_SMBSETATR, time)
00247
00248 PR_VALUE_SMBREAD,
00249 #define SMBread_count __profile_stats_value(PR_VALUE_SMBREAD, count)
00250 #define SMBread_time __profile_stats_value(PR_VALUE_SMBREAD, time)
00251
00252 PR_VALUE_SMBWRITE,
00253 #define SMBwrite_count __profile_stats_value(PR_VALUE_SMBWRITE, count)
00254 #define SMBwrite_time __profile_stats_value(PR_VALUE_SMBWRITE, time)
00255
00256 PR_VALUE_SMBLOCK,
00257 #define SMBlock_count __profile_stats_value(PR_VALUE_SMBLOCK, count)
00258 #define SMBlock_time __profile_stats_value(PR_VALUE_SMBLOCK, time)
00259
00260 PR_VALUE_SMBUNLOCK,
00261 #define SMBunlock_count __profile_stats_value(PR_VALUE_SMBUNLOCK, count)
00262 #define SMBunlock_time __profile_stats_value(PR_VALUE_SMBUNLOCK, time)
00263
00264 PR_VALUE_SMBCTEMP,
00265 #define SMBctemp_count __profile_stats_value(PR_VALUE_SMBCTEMP, count)
00266 #define SMBctemp_time __profile_stats_value(PR_VALUE_SMBCTEMP, time)
00267
00268
00269 PR_VALUE_SMBMKNEW,
00270 #define SMBmknew_count __profile_stats_value(PR_VALUE_SMBMKNEW, count)
00271 #define SMBmknew_time __profile_stats_value(PR_VALUE_SMBMKNEW, time)
00272
00273 PR_VALUE_SMBCHECKPATH,
00274 #define SMBcheckpath_count __profile_stats_value(PR_VALUE_SMBCHECKPATH, count)
00275 #define SMBcheckpath_time __profile_stats_value(PR_VALUE_SMBCHECKPATH, time)
00276
00277 PR_VALUE_SMBEXIT,
00278 #define SMBexit_count __profile_stats_value(PR_VALUE_SMBEXIT, count)
00279 #define SMBexit_time __profile_stats_value(PR_VALUE_SMBEXIT, time)
00280
00281 PR_VALUE_SMBLSEEK,
00282 #define SMBlseek_count __profile_stats_value(PR_VALUE_SMBLSEEK, count)
00283 #define SMBlseek_time __profile_stats_value(PR_VALUE_SMBLSEEK, time)
00284
00285 PR_VALUE_SMBLOCKREAD,
00286 #define SMBlockread_count __profile_stats_value(PR_VALUE_SMBLOCKREAD, count)
00287 #define SMBlockread_time __profile_stats_value(PR_VALUE_SMBLOCKREAD, time)
00288
00289 PR_VALUE_SMBWRITEUNLOCK,
00290 #define SMBwriteunlock_count __profile_stats_value(PR_VALUE_SMBWRITEUNLOCK, count)
00291 #define SMBwriteunlock_time __profile_stats_value(PR_VALUE_SMBWRITEUNLOCK, time)
00292
00293 PR_VALUE_SMBREADBRAW,
00294 #define SMBreadbraw_count __profile_stats_value(PR_VALUE_SMBREADBRAW, count)
00295 #define SMBreadbraw_time __profile_stats_value(PR_VALUE_SMBREADBRAW, time)
00296
00297 PR_VALUE_SMBREADBMPX,
00298 #define SMBreadBmpx_count __profile_stats_value(PR_VALUE_SMBREADBMPX, count)
00299 #define SMBreadBmpx_time __profile_stats_value(PR_VALUE_SMBREADBMPX, time)
00300
00301 PR_VALUE_SMBREADBS,
00302 #define SMBreadBs_count __profile_stats_value(PR_VALUE_SMBREADBS, count)
00303 #define SMBreadBs_time __profile_stats_value(PR_VALUE_SMBREADBS, time)
00304
00305 PR_VALUE_SMBWRITEBRAW,
00306 #define SMBwritebraw_count __profile_stats_value(PR_VALUE_SMBWRITEBRAW, count)
00307 #define SMBwritebraw_time __profile_stats_value(PR_VALUE_SMBWRITEBRAW, time)
00308
00309 PR_VALUE_SMBWRITEBMPX,
00310 #define SMBwriteBmpx_count __profile_stats_value(PR_VALUE_SMBWRITEBMPX, count)
00311 #define SMBwriteBmpx_time __profile_stats_value(PR_VALUE_SMBWRITEBMPX, time)
00312
00313 PR_VALUE_SMBWRITEBS,
00314 #define SMBwriteBs_count __profile_stats_value(PR_VALUE_SMBWRITEBS, count)
00315 #define SMBwriteBs_time __profile_stats_value(PR_VALUE_SMBWRITEBS, time)
00316
00317 PR_VALUE_SMBWRITEC,
00318 #define SMBwritec_count __profile_stats_value(PR_VALUE_SMBWRITEC, count)
00319 #define SMBwritec_time __profile_stats_value(PR_VALUE_SMBWRITEC, time)
00320
00321 PR_VALUE_SMBSETATTRE,
00322 #define SMBsetattrE_count __profile_stats_value(PR_VALUE_SMBSETATTRE, count)
00323 #define SMBsetattrE_time __profile_stats_value(PR_VALUE_SMBSETATTRE, time)
00324
00325 PR_VALUE_SMBGETATTRE,
00326 #define SMBgetattrE_count __profile_stats_value(PR_VALUE_SMBGETATTRE, count)
00327 #define SMBgetattrE_time __profile_stats_value(PR_VALUE_SMBGETATTRE, time)
00328
00329 PR_VALUE_SMBLOCKINGX,
00330 #define SMBlockingX_count __profile_stats_value(PR_VALUE_SMBLOCKINGX, count)
00331 #define SMBlockingX_time __profile_stats_value(PR_VALUE_SMBLOCKINGX, time)
00332
00333 PR_VALUE_SMBTRANS,
00334 #define SMBtrans_count __profile_stats_value(PR_VALUE_SMBTRANS, count)
00335 #define SMBtrans_time __profile_stats_value(PR_VALUE_SMBTRANS, time)
00336
00337 PR_VALUE_SMBTRANSS,
00338 #define SMBtranss_count __profile_stats_value(PR_VALUE_SMBTRANSS, count)
00339 #define SMBtranss_time __profile_stats_value(PR_VALUE_SMBTRANSS, time)
00340
00341 PR_VALUE_SMBIOCTL,
00342 #define SMBioctl_count __profile_stats_value(PR_VALUE_SMBIOCTL, count)
00343 #define SMBioctl_time __profile_stats_value(PR_VALUE_SMBIOCTL, time)
00344
00345 PR_VALUE_SMBIOCTLS,
00346 #define SMBioctls_count __profile_stats_value(PR_VALUE_SMBIOCTLS, count)
00347 #define SMBioctls_time __profile_stats_value(PR_VALUE_SMBIOCTLS, time)
00348
00349 PR_VALUE_SMBCOPY,
00350 #define SMBcopy_count __profile_stats_value(PR_VALUE_SMBCOPY, count)
00351 #define SMBcopy_time __profile_stats_value(PR_VALUE_SMBCOPY, time)
00352
00353 PR_VALUE_SMBMOVE,
00354 #define SMBmove_count __profile_stats_value(PR_VALUE_SMBMOVE, count)
00355 #define SMBmove_time __profile_stats_value(PR_VALUE_SMBMOVE, time)
00356
00357 PR_VALUE_SMBECHO,
00358 #define SMBecho_count __profile_stats_value(PR_VALUE_SMBECHO, count)
00359 #define SMBecho_time __profile_stats_value(PR_VALUE_SMBECHO, time)
00360
00361 PR_VALUE_SMBWRITECLOSE,
00362 #define SMBwriteclose_count __profile_stats_value(PR_VALUE_SMBWRITECLOSE, count)
00363 #define SMBwriteclose_time __profile_stats_value(PR_VALUE_SMBWRITECLOSE, time)
00364
00365 PR_VALUE_SMBOPENX,
00366 #define SMBopenX_count __profile_stats_value(PR_VALUE_SMBOPENX, count)
00367 #define SMBopenX_time __profile_stats_value(PR_VALUE_SMBOPENX, time)
00368
00369 PR_VALUE_SMBREADX,
00370 #define SMBreadX_count __profile_stats_value(PR_VALUE_SMBREADX, count)
00371 #define SMBreadX_time __profile_stats_value(PR_VALUE_SMBREADX, time)
00372
00373 PR_VALUE_SMBWRITEX,
00374 #define SMBwriteX_count __profile_stats_value(PR_VALUE_SMBWRITEX, count)
00375 #define SMBwriteX_time __profile_stats_value(PR_VALUE_SMBWRITEX, time)
00376
00377 PR_VALUE_SMBTRANS2,
00378 #define SMBtrans2_count __profile_stats_value(PR_VALUE_SMBTRANS2, count)
00379 #define SMBtrans2_time __profile_stats_value(PR_VALUE_SMBTRANS2, time)
00380
00381 PR_VALUE_SMBTRANSS2,
00382 #define SMBtranss2_count __profile_stats_value(PR_VALUE_SMBTRANSS2, count)
00383 #define SMBtranss2_time __profile_stats_value(PR_VALUE_SMBTRANSS2, time)
00384
00385 PR_VALUE_SMBFINDCLOSE,
00386 #define SMBfindclose_count __profile_stats_value(PR_VALUE_SMBFINDCLOSE, count)
00387 #define SMBfindclose_time __profile_stats_value(PR_VALUE_SMBFINDCLOSE, time)
00388
00389 PR_VALUE_SMBFINDNCLOSE,
00390 #define SMBfindnclose_count __profile_stats_value(PR_VALUE_SMBFINDNCLOSE, count)
00391 #define SMBfindnclose_time __profile_stats_value(PR_VALUE_SMBFINDNCLOSE, time)
00392
00393 PR_VALUE_SMBTCON,
00394 #define SMBtcon_count __profile_stats_value(PR_VALUE_SMBTCON, count)
00395 #define SMBtcon_time __profile_stats_value(PR_VALUE_SMBTCON, time)
00396
00397 PR_VALUE_SMBTDIS,
00398 #define SMBtdis_count __profile_stats_value(PR_VALUE_SMBTDIS, count)
00399 #define SMBtdis_time __profile_stats_value(PR_VALUE_SMBTDIS, time)
00400
00401 PR_VALUE_SMBNEGPROT,
00402 #define SMBnegprot_count __profile_stats_value(PR_VALUE_SMBNEGPROT, count)
00403 #define SMBnegprot_time __profile_stats_value(PR_VALUE_SMBNEGPROT, time)
00404
00405 PR_VALUE_SMBSESSSETUPX,
00406 #define SMBsesssetupX_count __profile_stats_value(PR_VALUE_SMBSESSSETUPX, count)
00407 #define SMBsesssetupX_time __profile_stats_value(PR_VALUE_SMBSESSSETUPX, time)
00408
00409 PR_VALUE_SMBULOGOFFX,
00410 #define SMBulogoffX_count __profile_stats_value(PR_VALUE_SMBULOGOFFX, count)
00411 #define SMBulogoffX_time __profile_stats_value(PR_VALUE_SMBULOGOFFX, time)
00412
00413 PR_VALUE_SMBTCONX,
00414 #define SMBtconX_count __profile_stats_value(PR_VALUE_SMBTCONX, count)
00415 #define SMBtconX_time __profile_stats_value(PR_VALUE_SMBTCONX, time)
00416
00417 PR_VALUE_SMBDSKATTR,
00418 #define SMBdskattr_count __profile_stats_value(PR_VALUE_SMBDSKATTR, count)
00419 #define SMBdskattr_time __profile_stats_value(PR_VALUE_SMBDSKATTR, time)
00420
00421 PR_VALUE_SMBSEARCH,
00422 #define SMBsearch_count __profile_stats_value(PR_VALUE_SMBSEARCH, count)
00423 #define SMBsearch_time __profile_stats_value(PR_VALUE_SMBSEARCH, time)
00424
00425
00426 PR_VALUE_SMBFFIRST,
00427 #define SMBffirst_count __profile_stats_value(PR_VALUE_SMBFFIRST, count)
00428 #define SMBffirst_time __profile_stats_value(PR_VALUE_SMBFFIRST, time)
00429
00430
00431 PR_VALUE_SMBFUNIQUE,
00432 #define SMBfunique_count __profile_stats_value(PR_VALUE_SMBFUNIQUE, count)
00433 #define SMBfunique_time __profile_stats_value(PR_VALUE_SMBFUNIQUE, time)
00434
00435 PR_VALUE_SMBFCLOSE,
00436 #define SMBfclose_count __profile_stats_value(PR_VALUE_SMBFCLOSE, count)
00437 #define SMBfclose_time __profile_stats_value(PR_VALUE_SMBFCLOSE, time)
00438
00439 PR_VALUE_SMBNTTRANS,
00440 #define SMBnttrans_count __profile_stats_value(PR_VALUE_SMBNTTRANS, count)
00441 #define SMBnttrans_time __profile_stats_value(PR_VALUE_SMBNTTRANS, time)
00442
00443 PR_VALUE_SMBNTTRANSS,
00444 #define SMBnttranss_count __profile_stats_value(PR_VALUE_SMBNTTRANSS, count)
00445 #define SMBnttranss_time __profile_stats_value(PR_VALUE_SMBNTTRANSS, time)
00446
00447 PR_VALUE_SMBNTCREATEX,
00448 #define SMBntcreateX_count __profile_stats_value(PR_VALUE_SMBNTCREATEX, count)
00449 #define SMBntcreateX_time __profile_stats_value(PR_VALUE_SMBNTCREATEX, time)
00450
00451 PR_VALUE_SMBNTCANCEL,
00452 #define SMBntcancel_count __profile_stats_value(PR_VALUE_SMBNTCANCEL, count)
00453 #define SMBntcancel_time __profile_stats_value(PR_VALUE_SMBNTCANCEL, time)
00454
00455 PR_VALUE_SMBNTRENAME,
00456 #define SMBntrename_count __profile_stats_value(PR_VALUE_SMBNTRENAME, count)
00457 #define SMBntrename_time __profile_stats_value(PR_VALUE_SMBNTRENAME, time)
00458
00459 PR_VALUE_SMBSPLOPEN,
00460 #define SMBsplopen_count __profile_stats_value(PR_VALUE_SMBSPLOPEN, count)
00461 #define SMBsplopen_time __profile_stats_value(PR_VALUE_SMBSPLOPEN, time)
00462
00463 PR_VALUE_SMBSPLWR,
00464 #define SMBsplwr_count __profile_stats_value(PR_VALUE_SMBSPLWR, count)
00465 #define SMBsplwr_time __profile_stats_value(PR_VALUE_SMBSPLWR, time)
00466
00467 PR_VALUE_SMBSPLCLOSE,
00468 #define SMBsplclose_count __profile_stats_value(PR_VALUE_SMBSPLCLOSE, count)
00469 #define SMBsplclose_time __profile_stats_value(PR_VALUE_SMBSPLCLOSE, time)
00470
00471 PR_VALUE_SMBSPLRETQ,
00472 #define SMBsplretq_count __profile_stats_value(PR_VALUE_SMBSPLRETQ, count)
00473 #define SMBsplretq_time __profile_stats_value(PR_VALUE_SMBSPLRETQ, time)
00474
00475 PR_VALUE_SMBSENDS,
00476 #define SMBsends_count __profile_stats_value(PR_VALUE_SMBSENDS, count)
00477 #define SMBsends_time __profile_stats_value(PR_VALUE_SMBSENDS, time)
00478
00479 PR_VALUE_SMBSENDB,
00480 #define SMBsendb_count __profile_stats_value(PR_VALUE_SMBSENDB, count)
00481 #define SMBsendb_time __profile_stats_value(PR_VALUE_SMBSENDB, time)
00482
00483 PR_VALUE_SMBFWDNAME,
00484 #define SMBfwdname_count __profile_stats_value(PR_VALUE_SMBFWDNAME, count)
00485 #define SMBfwdname_time __profile_stats_value(PR_VALUE_SMBFWDNAME, time)
00486
00487 PR_VALUE_SMBCANCELF,
00488 #define SMBcancelf_count __profile_stats_value(PR_VALUE_SMBCANCELF, count)
00489 #define SMBcancelf_time __profile_stats_value(PR_VALUE_SMBCANCELF, time)
00490
00491 PR_VALUE_SMBGETMAC,
00492 #define SMBgetmac_count __profile_stats_value(PR_VALUE_SMBGETMAC, count)
00493 #define SMBgetmac_time __profile_stats_value(PR_VALUE_SMBGETMAC, time)
00494
00495 PR_VALUE_SMBSENDSTRT,
00496 #define SMBsendstrt_count __profile_stats_value(PR_VALUE_SMBSENDSTRT, count)
00497 #define SMBsendstrt_time __profile_stats_value(PR_VALUE_SMBSENDSTRT, time)
00498
00499 PR_VALUE_SMBSENDEND,
00500 #define SMBsendend_count __profile_stats_value(PR_VALUE_SMBSENDEND, count)
00501 #define SMBsendend_time __profile_stats_value(PR_VALUE_SMBSENDEND, time)
00502
00503 PR_VALUE_SMBSENDTXT,
00504 #define SMBsendtxt_count __profile_stats_value(PR_VALUE_SMBSENDTXT, count)
00505 #define SMBsendtxt_time __profile_stats_value(PR_VALUE_SMBSENDTXT, time)
00506
00507 PR_VALUE_SMBINVALID,
00508 #define SMBinvalid_count __profile_stats_value(PR_VALUE_SMBINVALID, count)
00509 #define SMBinvalid_time __profile_stats_value(PR_VALUE_SMBINVALID, time)
00510
00511
00512 PR_VALUE_PATHWORKS_SETDIR,
00513 #define pathworks_setdir_count __profile_stats_value(PR_VALUE_PATHWORKS_SETDIR, count)
00514 #define pathworks_setdir_time __profile_stats_value(PR_VALUE_PATHWORKS_SETDIR, time)
00515
00516
00517 PR_VALUE_TRANS2_OPEN,
00518 #define Trans2_open_count __profile_stats_value(PR_VALUE_TRANS2_OPEN, count)
00519 #define Trans2_open_time __profile_stats_value(PR_VALUE_TRANS2_OPEN, time)
00520
00521 PR_VALUE_TRANS2_FINDFIRST,
00522 #define Trans2_findfirst_count __profile_stats_value(PR_VALUE_TRANS2_FINDFIRST, count)
00523 #define Trans2_findfirst_time __profile_stats_value(PR_VALUE_TRANS2_FINDFIRST, time)
00524
00525 PR_VALUE_TRANS2_FINDNEXT,
00526 #define Trans2_findnext_count __profile_stats_value(PR_VALUE_TRANS2_FINDNEXT, count)
00527 #define Trans2_findnext_time __profile_stats_value(PR_VALUE_TRANS2_FINDNEXT, time)
00528
00529 PR_VALUE_TRANS2_QFSINFO,
00530 #define Trans2_qfsinfo_count __profile_stats_value(PR_VALUE_TRANS2_QFSINFO, count)
00531 #define Trans2_qfsinfo_time __profile_stats_value(PR_VALUE_TRANS2_QFSINFO, time)
00532
00533 PR_VALUE_TRANS2_SETFSINFO,
00534 #define Trans2_setfsinfo_count __profile_stats_value(PR_VALUE_TRANS2_SETFSINFO, count)
00535 #define Trans2_setfsinfo_time __profile_stats_value(PR_VALUE_TRANS2_SETFSINFO, time)
00536
00537 PR_VALUE_TRANS2_QPATHINFO,
00538 #define Trans2_qpathinfo_count __profile_stats_value(PR_VALUE_TRANS2_QPATHINFO, count)
00539 #define Trans2_qpathinfo_time __profile_stats_value(PR_VALUE_TRANS2_QPATHINFO, time)
00540
00541 PR_VALUE_TRANS2_SETPATHINFO,
00542 #define Trans2_setpathinfo_count __profile_stats_value(PR_VALUE_TRANS2_SETPATHINFO, count)
00543 #define Trans2_setpathinfo_time __profile_stats_value(PR_VALUE_TRANS2_SETPATHINFO, time)
00544
00545 PR_VALUE_TRANS2_QFILEINFO,
00546 #define Trans2_qfileinfo_count __profile_stats_value(PR_VALUE_TRANS2_QFILEINFO, count)
00547 #define Trans2_qfileinfo_time __profile_stats_value(PR_VALUE_TRANS2_QFILEINFO, time)
00548
00549 PR_VALUE_TRANS2_SETFILEINFO,
00550 #define Trans2_setfileinfo_count __profile_stats_value(PR_VALUE_TRANS2_SETFILEINFO, count)
00551 #define Trans2_setfileinfo_time __profile_stats_value(PR_VALUE_TRANS2_SETFILEINFO, time)
00552
00553 PR_VALUE_TRANS2_FSCTL,
00554 #define Trans2_fsctl_count __profile_stats_value(PR_VALUE_TRANS2_FSCTL, count)
00555 #define Trans2_fsctl_time __profile_stats_value(PR_VALUE_TRANS2_FSCTL, time)
00556
00557 PR_VALUE_TRANS2_IOCTL,
00558 #define Trans2_ioctl_count __profile_stats_value(PR_VALUE_TRANS2_IOCTL, count)
00559 #define Trans2_ioctl_time __profile_stats_value(PR_VALUE_TRANS2_IOCTL, time)
00560
00561 PR_VALUE_TRANS2_FINDNOTIFYFIRST,
00562 #define Trans2_findnotifyfirst_count __profile_stats_value(PR_VALUE_TRANS2_FINDNOTIFYFIRST, count)
00563 #define Trans2_findnotifyfirst_time __profile_stats_value(PR_VALUE_TRANS2_FINDNOTIFYFIRST, time)
00564
00565 PR_VALUE_TRANS2_FINDNOTIFYNEXT,
00566 #define Trans2_findnotifynext_count __profile_stats_value(PR_VALUE_TRANS2_FINDNOTIFYNEXT, count)
00567 #define Trans2_findnotifynext_time __profile_stats_value(PR_VALUE_TRANS2_FINDNOTIFYNEXT, time)
00568
00569 PR_VALUE_TRANS2_MKDIR,
00570 #define Trans2_mkdir_count __profile_stats_value(PR_VALUE_TRANS2_MKDIR, count)
00571 #define Trans2_mkdir_time __profile_stats_value(PR_VALUE_TRANS2_MKDIR, time)
00572
00573 PR_VALUE_TRANS2_SESSION_SETUP,
00574 #define Trans2_session_setup_count __profile_stats_value(PR_VALUE_TRANS2_SESSION_SETUP, count)
00575 #define Trans2_session_setup_time __profile_stats_value(PR_VALUE_TRANS2_SESSION_SETUP, time)
00576
00577 PR_VALUE_TRANS2_GET_DFS_REFERRAL,
00578 #define Trans2_get_dfs_referral_count __profile_stats_value(PR_VALUE_TRANS2_GET_DFS_REFERRAL, count)
00579 #define Trans2_get_dfs_referral_time __profile_stats_value(PR_VALUE_TRANS2_GET_DFS_REFERRAL, time)
00580
00581 PR_VALUE_TRANS2_REPORT_DFS_INCONSISTANCY,
00582 #define Trans2_report_dfs_inconsistancy_count __profile_stats_value(PR_VALUE_TRANS2_REPORT_DFS_INCONSISTANCY, count)
00583 #define Trans2_report_dfs_inconsistancy_time __profile_stats_value(PR_VALUE_TRANS2_REPORT_DFS_INCONSISTANCY, time)
00584
00585
00586 PR_VALUE_NT_TRANSACT_CREATE,
00587 #define NT_transact_create_count __profile_stats_value(PR_VALUE_NT_TRANSACT_CREATE, count)
00588 #define NT_transact_create_time __profile_stats_value(PR_VALUE_NT_TRANSACT_CREATE, time)
00589
00590 PR_VALUE_NT_TRANSACT_IOCTL,
00591 #define NT_transact_ioctl_count __profile_stats_value(PR_VALUE_NT_TRANSACT_IOCTL, count)
00592 #define NT_transact_ioctl_time __profile_stats_value(PR_VALUE_NT_TRANSACT_IOCTL, time)
00593
00594 PR_VALUE_NT_TRANSACT_SET_SECURITY_DESC,
00595 #define NT_transact_set_security_desc_count __profile_stats_value(PR_VALUE_NT_TRANSACT_SET_SECURITY_DESC, count)
00596 #define NT_transact_set_security_desc_time __profile_stats_value(PR_VALUE_NT_TRANSACT_SET_SECURITY_DESC, time)
00597
00598 PR_VALUE_NT_TRANSACT_NOTIFY_CHANGE,
00599 #define NT_transact_notify_change_count __profile_stats_value(PR_VALUE_NT_TRANSACT_NOTIFY_CHANGE, count)
00600 #define NT_transact_notify_change_time __profile_stats_value(PR_VALUE_NT_TRANSACT_NOTIFY_CHANGE, time)
00601
00602 PR_VALUE_NT_TRANSACT_RENAME,
00603 #define NT_transact_rename_count __profile_stats_value(PR_VALUE_NT_TRANSACT_RENAME, count)
00604 #define NT_transact_rename_time __profile_stats_value(PR_VALUE_NT_TRANSACT_RENAME, time)
00605
00606 PR_VALUE_NT_TRANSACT_QUERY_SECURITY_DESC,
00607 #define NT_transact_query_security_desc_count __profile_stats_value(PR_VALUE_NT_TRANSACT_QUERY_SECURITY_DESC, count)
00608 #define NT_transact_query_security_desc_time __profile_stats_value(PR_VALUE_NT_TRANSACT_QUERY_SECURITY_DESC, time)
00609
00610 PR_VALUE_NT_TRANSACT_GET_USER_QUOTA,
00611 #define NT_transact_get_user_quota_count __profile_stats_value(PR_VALUE_NT_TRANSACT_GET_USER_QUOTA, count)
00612 #define NT_transact_get_user_quota_time __profile_stats_value(PR_VALUE_NT_TRANSACT_GET_USER_QUOTA, time)
00613
00614 PR_VALUE_NT_TRANSACT_SET_USER_QUOTA,
00615 #define NT_transact_set_user_quota_count __profile_stats_value(PR_VALUE_NT_TRANSACT_SET_USER_QUOTA, count)
00616 #define NT_transact_set_user_quota_time __profile_stats_value(PR_VALUE_NT_TRANSACT_SET_USER_QUOTA, time)
00617
00618
00619 PR_VALUE_GET_NT_ACL,
00620 #define get_nt_acl_count __profile_stats_value(PR_VALUE_GET_NT_ACL, count)
00621 #define get_nt_acl_time __profile_stats_value(PR_VALUE_GET_NT_ACL, time)
00622
00623 PR_VALUE_FGET_NT_ACL,
00624 #define fget_nt_acl_count __profile_stats_value(PR_VALUE_FGET_NT_ACL, count)
00625 #define fget_nt_acl_time __profile_stats_value(PR_VALUE_FGET_NT_ACL, time)
00626
00627 PR_VALUE_SET_NT_ACL,
00628 #define set_nt_acl_count __profile_stats_value(PR_VALUE_SET_NT_ACL, count)
00629 #define set_nt_acl_time __profile_stats_value(PR_VALUE_SET_NT_ACL, time)
00630
00631 PR_VALUE_FSET_NT_ACL,
00632 #define fset_nt_acl_count __profile_stats_value(PR_VALUE_FSET_NT_ACL, count)
00633 #define fset_nt_acl_time __profile_stats_value(PR_VALUE_FSET_NT_ACL, time)
00634
00635 PR_VALUE_CHMOD_ACL,
00636 #define chmod_acl_count __profile_stats_value(PR_VALUE_CHMOD_ACL, count)
00637 #define chmod_acl_time __profile_stats_value(PR_VALUE_CHMOD_ACL, time)
00638
00639 PR_VALUE_FCHMOD_ACL,
00640 #define fchmod_acl_count __profile_stats_value(PR_VALUE_FCHMOD_ACL, count)
00641 #define fchmod_acl_time __profile_stats_value(PR_VALUE_FCHMOD_ACL, time)
00642
00643
00644 PR_VALUE_NAME_RELEASE,
00645 #define name_release_count __profile_stats_value(PR_VALUE_NAME_RELEASE, count)
00646 #define name_release_time __profile_stats_value(PR_VALUE_NAME_RELEASE, time)
00647
00648 PR_VALUE_NAME_REFRESH,
00649 #define name_refresh_count __profile_stats_value(PR_VALUE_NAME_REFRESH, count)
00650 #define name_refresh_time __profile_stats_value(PR_VALUE_NAME_REFRESH, time)
00651
00652 PR_VALUE_NAME_REGISTRATION,
00653 #define name_registration_count __profile_stats_value(PR_VALUE_NAME_REGISTRATION, count)
00654 #define name_registration_time __profile_stats_value(PR_VALUE_NAME_REGISTRATION, time)
00655
00656 PR_VALUE_NODE_STATUS,
00657 #define node_status_count __profile_stats_value(PR_VALUE_NODE_STATUS, count)
00658 #define node_status_time __profile_stats_value(PR_VALUE_NODE_STATUS, time)
00659
00660 PR_VALUE_NAME_QUERY,
00661 #define name_query_count __profile_stats_value(PR_VALUE_NAME_QUERY, count)
00662 #define name_query_time __profile_stats_value(PR_VALUE_NAME_QUERY, time)
00663
00664 PR_VALUE_HOST_ANNOUNCE,
00665 #define host_announce_count __profile_stats_value(PR_VALUE_HOST_ANNOUNCE, count)
00666 #define host_announce_time __profile_stats_value(PR_VALUE_HOST_ANNOUNCE, time)
00667
00668 PR_VALUE_WORKGROUP_ANNOUNCE,
00669 #define workgroup_announce_count __profile_stats_value(PR_VALUE_WORKGROUP_ANNOUNCE, count)
00670 #define workgroup_announce_time __profile_stats_value(PR_VALUE_WORKGROUP_ANNOUNCE, time)
00671
00672 PR_VALUE_LOCAL_MASTER_ANNOUNCE,
00673 #define local_master_announce_count __profile_stats_value(PR_VALUE_LOCAL_MASTER_ANNOUNCE, count)
00674 #define local_master_announce_time __profile_stats_value(PR_VALUE_LOCAL_MASTER_ANNOUNCE, time)
00675
00676 PR_VALUE_MASTER_BROWSER_ANNOUNCE,
00677 #define master_browser_announce_count __profile_stats_value(PR_VALUE_MASTER_BROWSER_ANNOUNCE, count)
00678 #define master_browser_announce_time __profile_stats_value(PR_VALUE_MASTER_BROWSER_ANNOUNCE, time)
00679
00680 PR_VALUE_LM_HOST_ANNOUNCE,
00681 #define lm_host_announce_count __profile_stats_value(PR_VALUE_LM_HOST_ANNOUNCE, count)
00682 #define lm_host_announce_time __profile_stats_value(PR_VALUE_LM_HOST_ANNOUNCE, time)
00683
00684 PR_VALUE_GET_BACKUP_LIST,
00685 #define get_backup_list_count __profile_stats_value(PR_VALUE_GET_BACKUP_LIST, count)
00686 #define get_backup_list_time __profile_stats_value(PR_VALUE_GET_BACKUP_LIST, time)
00687
00688 PR_VALUE_RESET_BROWSER,
00689 #define reset_browser_count __profile_stats_value(PR_VALUE_RESET_BROWSER, count)
00690 #define reset_browser_time __profile_stats_value(PR_VALUE_RESET_BROWSER, time)
00691
00692 PR_VALUE_ANNOUNCE_REQUEST,
00693 #define announce_request_count __profile_stats_value(PR_VALUE_ANNOUNCE_REQUEST, count)
00694 #define announce_request_time __profile_stats_value(PR_VALUE_ANNOUNCE_REQUEST, time)
00695
00696 PR_VALUE_LM_ANNOUNCE_REQUEST,
00697 #define lm_announce_request_count __profile_stats_value(PR_VALUE_LM_ANNOUNCE_REQUEST, count)
00698 #define lm_announce_request_time __profile_stats_value(PR_VALUE_LM_ANNOUNCE_REQUEST, time)
00699
00700 PR_VALUE_DOMAIN_LOGON,
00701 #define domain_logon_count __profile_stats_value(PR_VALUE_DOMAIN_LOGON, count)
00702 #define domain_logon_time __profile_stats_value(PR_VALUE_DOMAIN_LOGON, time)
00703
00704 PR_VALUE_SYNC_BROWSE_LISTS,
00705 #define sync_browse_lists_count __profile_stats_value(PR_VALUE_SYNC_BROWSE_LISTS, count)
00706 #define sync_browse_lists_time __profile_stats_value(PR_VALUE_SYNC_BROWSE_LISTS, time)
00707
00708 PR_VALUE_RUN_ELECTIONS,
00709 #define run_elections_count __profile_stats_value(PR_VALUE_RUN_ELECTIONS, count)
00710 #define run_elections_time __profile_stats_value(PR_VALUE_RUN_ELECTIONS, time)
00711
00712 PR_VALUE_ELECTION,
00713 #define election_count __profile_stats_value(PR_VALUE_ELECTION, count)
00714 #define election_time __profile_stats_value(PR_VALUE_ELECTION, time)
00715
00716
00717 PR_VALUE_MAX
00718 };
00719
00720 const char * profile_value_name(enum profile_stats_values val);
00721
00722 struct profile_stats {
00723
00724 unsigned smb_count;
00725 unsigned uid_changes;
00726
00727
00728 unsigned count[PR_VALUE_MAX];
00729 unsigned time[PR_VALUE_MAX];
00730
00731
00732 unsigned syscall_pread_bytes;
00733 unsigned syscall_pwrite_bytes;
00734 unsigned syscall_read_bytes;
00735 unsigned syscall_write_bytes;
00736 unsigned syscall_sendfile_bytes;
00737
00738
00739 unsigned statcache_lookups;
00740 unsigned statcache_misses;
00741 unsigned statcache_hits;
00742
00743
00744 unsigned writecache_read_hits;
00745 unsigned writecache_abutted_writes;
00746 unsigned writecache_total_writes;
00747 unsigned writecache_non_oplock_writes;
00748 unsigned writecache_direct_writes;
00749 unsigned writecache_init_writes;
00750 unsigned writecache_flushed_writes[NUM_FLUSH_REASONS];
00751 unsigned writecache_num_perfect_writes;
00752 unsigned writecache_num_write_caches;
00753 unsigned writecache_allocated_write_caches;
00754 };
00755
00756 struct profile_header {
00757 int prof_shm_magic;
00758 int prof_shm_version;
00759 struct profile_stats stats;
00760 };
00761
00762 extern struct profile_header *profile_h;
00763 extern struct profile_stats *profile_p;
00764 extern BOOL do_profile_flag;
00765 extern BOOL do_profile_times;
00766
00767 #ifdef WITH_PROFILE
00768
00769
00770
00771
00772
00773 #define INC_PROFILE_COUNT(x) profile_p->x++
00774 #define DEC_PROFILE_COUNT(x) profile_p->x--
00775 #define ADD_PROFILE_COUNT(x,y) profile_p->x += (y)
00776
00777 #if defined(HAVE_CLOCK_GETTIME)
00778
00779 extern clockid_t __profile_clock;
00780
00781 static inline SMB_BIG_UINT profile_timestamp(void)
00782 {
00783 struct timespec ts;
00784
00785
00786
00787
00788
00789
00790 clock_gettime(__profile_clock, &ts);
00791 return (ts.tv_sec * 1000000) + (ts.tv_nsec / 1000);
00792 }
00793
00794 #else
00795
00796 static inline SMB_BIG_UINT profile_timestamp(void)
00797 {
00798 struct timeval tv;
00799 GetTimeOfDay(&tv);
00800 return (tv.tv_sec * 1000000) + tv.tv_usec;
00801 }
00802
00803 #endif
00804
00805
00806
00807 #define DO_PROFILE_INC(x) \
00808 if (do_profile_flag) { \
00809 INC_PROFILE_COUNT(x); \
00810 }
00811
00812 #define DO_PROFILE_DEC(x) \
00813 if (do_profile_flag) { \
00814 DEC_PROFILE_COUNT(x); \
00815 }
00816
00817 #define DO_PROFILE_DEC_INC(x,y) \
00818 if (do_profile_flag) { \
00819 DEC_PROFILE_COUNT(x); \
00820 INC_PROFILE_COUNT(y); \
00821 }
00822
00823 #define DO_PROFILE_ADD(x,n) \
00824 if (do_profile_flag) { \
00825 ADD_PROFILE_COUNT(x,n); \
00826 }
00827
00828 #define START_PROFILE(x) \
00829 SMB_BIG_UINT __profstamp_##x = 0; \
00830 if (do_profile_flag) { \
00831 __profstamp_##x = do_profile_times ? profile_timestamp() : 0;\
00832 INC_PROFILE_COUNT(x##_count); \
00833 }
00834
00835 #define START_PROFILE_BYTES(x,n) \
00836 SMB_BIG_UINT __profstamp_##x = 0; \
00837 if (do_profile_flag) { \
00838 __profstamp_##x = do_profile_times ? profile_timestamp() : 0;\
00839 INC_PROFILE_COUNT(x##_count); \
00840 ADD_PROFILE_COUNT(x##_bytes, n); \
00841 }
00842
00843 #define END_PROFILE(x) \
00844 if (do_profile_times) { \
00845 ADD_PROFILE_COUNT(x##_time, \
00846 profile_timestamp() - __profstamp_##x); \
00847 }
00848
00849
00850 #else
00851
00852 #define DO_PROFILE_INC(x)
00853 #define DO_PROFILE_DEC(x)
00854 #define DO_PROFILE_DEC_INC(x,y)
00855 #define DO_PROFILE_ADD(x,n)
00856 #define START_PROFILE(x)
00857 #define START_PROFILE_BYTES(x,n)
00858 #define END_PROFILE(x)
00859
00860 #endif
00861
00862 #endif